
js
淡乄
这个作者很懒,什么都没留下…
展开
-
cocos creator 加载zip里的图片
let path = ""; // 在zip里的文件名称let zipData = "";// zip文件letjsZip=require('jszip.min');letnewZip=newJSZip();newZip.loadAsync(zipData).then((zip)=>{ let zipFile=zip; if(!zipFile|| zipFile.file(path)){ return; } zipFi...原创 2021-09-01 15:35:52 · 1261 阅读 · 0 评论 -
数组的组合(取出n个数据进行组合)
letcmn=function(nums,n,currentIndex=0,choseArr=[],result=[]){letmaxLen=nums.length;if(currentIndex+n>maxLen){return[]};for(leti=currentIndex;i<maxLen;++i){if(n===1){result.push([...c...原创 2021-04-19 16:29:24 · 461 阅读 · 0 评论 -
简单的A*寻路(js版本)
已知可走的路径坐标,不存在行动力的消耗/** * 相邻位置的偏移量 8个方位 * 左,左下,下,右下,右,右上,上,左上 * */ let NearGridOffsets = [-1, 99, 100, 101, 1, -99, -100, -101];/* 可以行走的路径位置点(r,c,r,c...) */ let points = [ 8,3,8,4,8,5,8,7,8,8,8,9,8,10,8,11,8,12,8,13,8,14,8,15,8,17,8,18,原创 2021-01-01 15:49:46 · 228 阅读 · 0 评论 -
facebook、Googleplay接入相关知识点
facebook:获取28位秘钥:CMD命令:keytool -exportcert -alias 《秘钥别名》 -keystore 《秘钥路径》 | openssl sha1 -binary | openssl base64问题:openssl未定义解决:下载工具链接,下载完成后,cd进入工具bin目录下,运行命令即可googleplay:Play Install Referrer API,可以获取用户来源https://developer.android.com/googl...原创 2020-11-27 12:23:18 · 1402 阅读 · 0 评论 -
Python tinypng 压缩脚本
# -*- coding: utf-8 -*-"""脚本功能说明:使用 tinypng,一键批量压缩指定文件(夹)所有文件"""import osimport sysimport tinifytinify.key = "你自己申请的 key" # AppKeydef get_file_dir(file): """获取文件目录通用函数""" fullpath =...转载 2020-11-25 15:01:57 · 437 阅读 · 0 评论