增加分享

This commit is contained in:
YZ\249929363 2024-07-10 18:24:08 +08:00
parent db52c529e6
commit 5d62702007
3412 changed files with 377585 additions and 4562 deletions

View File

@ -6096,8 +6096,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "最高难度系数",
"_N$string": "最高难度系数",
"_string": "平均难度系数",
"_N$string": "平均难度系数",
"_fontSize": 32,
"_lineHeight": 32,
"_enableWrapText": true,

View File

@ -92,7 +92,7 @@ export default class GameData extends cc.Component {
gameId:'100001',
userId:"",
guide:true, //是否有引导
url:"http://dev.api.sparkus.cn",
url:"https://dev.api.sparkus.cn",
custom: 0,
//从这开始

View File

@ -358,7 +358,8 @@ export default class GameManager extends cc.Component {
.to(time,{x:num})
.call(() =>{
if(type == 1 || type == 5){
this.Player.getComponent("Player").jumpPause = true;
if(type == 1) this.Player.getComponent("Player").jumpPause = true;
this.tipShow(tip,type,false);
}

View File

@ -9,6 +9,7 @@ import GameData from "./GameData";
import AudioManager from "./tool/AudioManager";
import { GameTool } from "./tool/GameTool";
import { StorageMessage } from "./tool/Storage";
import { WeChat } from "./tool/share";
const {ccclass, property} = cc._decorator;
@ -25,6 +26,7 @@ export default class NewClass extends cc.Component {
start () {
GameTool.Authentication();
WeChat.setShare(location.href);
}
click(){
@ -37,6 +39,8 @@ export default class NewClass extends cc.Component {
}
}
openRank(){
AudioManager._instance.playMusicGame();
cc.director.loadScene("RankScene");

View File

@ -362,7 +362,6 @@ export default class NewClass extends cc.Component {
}
xinAction(){
// console.log("生命:",GameData._instance.GM_INFO.life);
if(GameData._instance.GM_INFO.life >= 0){
let xin = this.node.getChildByName("xin");
xin.y = 120;

View File

@ -9,13 +9,18 @@ const {ccclass, property} = cc._decorator;
@ccclass
export default class HttpUtil extends cc.Component {
static async getShareInfo(shareUrl: string): Promise<any> {
console.log("设置分享链接:",shareUrl);
const time = Math.floor((new Date().getTime()) / 1000)
const url = HttpUtil.apiSign(`/api/share/cfg?gameId=${config.gameId}&time=${time}&url=${shareUrl}`,{})
return this.httpPost(url,null,null);
}
//排行榜type2为获取type1为上传
static async rankData(type,callback,data): Promise<any> {
data.gameId = GameData._instance.GM_INFO.gameId;
data.userId = GameData._instance.GM_INFO.userId;
const time = Math.floor((new Date().getTime()) / 1000)
const url = apiSign(`/api/get/rank/data?gameId=${config.gameId}&dataType=${type}&time=${time}`, data)
const url = HttpUtil.apiSign(`/api/get/rank/data?gameId=${config.gameId}&dataType=${type}&time=${time}`, data)
this.httpPost(url,data,callback);
}
@ -31,14 +36,17 @@ export default class HttpUtil extends cc.Component {
data.gameId = GameData._instance.GM_INFO.gameId;
data.userId = GameData._instance.GM_INFO.userId;
const time = Math.floor((new Date().getTime()) / 1000)
const url = apiSign(`/api/get/user/data?gameId=${config.gameId}&time=${time}`, data)
const url = HttpUtil.apiSign(`/api/get/user/data?gameId=${config.gameId}&time=${time}`, data)
this.httpPost(url,data,callback);
}
static httpPost(url,data,callBack){
data.gameId = GameData._instance.GM_INFO.gameId;
data.userId = GameData._instance.GM_INFO.userId;
var urlData = "http://api.sparkus.cn" + url;
if(data){
data.gameId = GameData._instance.GM_INFO.gameId;
data.userId = GameData._instance.GM_INFO.userId;
}
var urlData = "https://api.sparkus.cn" + url;
// console.log("params:",JSON.stringify(data));
let xhr = new XMLHttpRequest();
xhr.open('POST', urlData);
@ -47,24 +55,25 @@ export default class HttpUtil extends cc.Component {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if(!data){
// console.log("初始化失败");
console.log("初始化失败");
return;
}
console.log(data);
var json = JSON.parse(data);
// console.log('http success:' + json);
callBack(json);
console.log('http success:' + json);
if(callBack)callBack(json);
}
else{
// var json = JSON.parse(data);
// console.log('http fail:' + url);
callBack(json);
if(callBack)callBack(json);
}
};
xhr.send(JSON.stringify(data));
}
static httpGet(url,callBack){
var urlData = "http://api.sparkus.cn" + url;
var urlData = "https://api.sparkus.cn" + url;
console.log(urlData);
let xhr = new XMLHttpRequest();
xhr.open('GET', urlData);
@ -76,17 +85,44 @@ export default class HttpUtil extends cc.Component {
if(data){
var json = JSON.parse(data);
console.info('http success:' + json);
callBack(json);
if(callBack)callBack(json);
}
else callBack(data);
else{
if(callBack)callBack(json);
}
}
else{
console.info('http fail:' + url);
callBack(null);
if(callBack)callBack(null);;
}
};
xhr.send();
}
/**
*
* @param url {string}
* @param params {object}
*/
static apiSign(url: string, params = {}) {
let convertUrl = url.trim()
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?'
}
// 传入参数转换拼接字符串
let postStr = getQueryString(params)
const signedStr = genSignStr(convertUrl, postStr)
const encryptStr = `sign=${signedStr}`
let encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey)
encryptSignStr = encodeURIComponent(encryptSignStr)
return `${urlencode(convertUrl)}&_p=${encryptSignStr}`
}
}
function responseHandler(response: { data: any }) {
@ -230,27 +266,5 @@ function urlencode(url: string): string {
return `${baseUrl}?${params.toString()}`;
}
/**
*
* @param url {string}
* @param params {object}
*/
function apiSign(url: string, params = {}) {
let convertUrl = url.trim()
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?'
}
// 传入参数转换拼接字符串
let postStr = getQueryString(params)
const signedStr = genSignStr(convertUrl, postStr)
const encryptStr = `sign=${signedStr}`
let encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey)
encryptSignStr = encodeURIComponent(encryptSignStr)
return `${urlencode(convertUrl)}&_p=${encryptSignStr}`
}

View File

@ -19,7 +19,7 @@ var GameTool = {
let name = "user_" + GameData._instance.GM_INFO.gameId;
var data = JSON.parse(localStorage.getItem(name));
if(data == "undifend" || data==null || data == ""){
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
window.location.href = url;
}
else{

107
assets/Script/tool/share.ts Normal file
View File

@ -0,0 +1,107 @@
import HttpUtil from '../crypto/HttpUtil';
import GameData from '../GameData';
var shareConfig = {
gameId: "100001",
shareLine: "zDLsruVI",
EK:"hui231%1"
};
// 定义微信配置数据的接口
interface IWeChatConfig {
appId: string;
timestamp: number;
nonceStr: string;
signature: string;
jsApiList: [];
}
// 微信操作类
export class WeChat {
static setShare(url) {
var urlTemp = this.removeQueryParams(url);
shareConfig.shareLine = urlTemp;
WeChat.getSignature(url);
}
static getResult(res){
if(res){
var data = res.data;
wx.config({
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: ['onMenuShareTimeline','updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
});
wx.checkJsApi({
jsApiList: ['updateAppMessageShareData'], // 需要检测的JS接口列表所有JS接口列表见附录2,
success: function(res) {
console.log("检查api",res);
// 以键值对的形式返回可用的api值true不可用为false
// 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
}
});
setTimeout(() => {
WeChat.changeShare();
}, 100);
setTimeout(() => {
WeChat.changeShare();
}, 200);
}
}
static changeShare(){
wx.ready(() => {
wx.updateAppMessageShareData({
title: '手眼协调练习', // 分享标题
desc: '脑雾导致你的手眼协调变慢和估测不准吗?', // 分享描述
link: shareConfig.shareLine, // 分享链接该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: 'https://static.sparkus.cn/public/flyup.jpg', // 分享图标
success: function () {
// 设置成功
console.log("分享好友成功回调");
}
});
wx.updateTimelineShareData({
title: '手眼协调练习', // 分享标题
link: shareConfig.shareLine, // 分享链接该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: 'https://static.sparkus.cn/public/flyup.jpg', // 分享图标
success: function () {
// 设置成功
console.log("分享朋友圈成功回调");
}
})
});
}
static getSignature(url: string): Promise<IWeChatConfig> {
return new Promise((resolve) => {
WeChat.getShareInfo((encodeURIComponent(url)),WeChat.getResult);
});
}
static async getShareInfo(shareUrl: string, callback:Function): Promise<any> {
const time = Math.floor((new Date().getTime()) / 1000)
const url = HttpUtil.apiSign(`/api/share/cfg?gameId=${GameData._instance.GM_INFO.gameId}&time=${time}&url=${shareUrl}`,{})
return HttpUtil.httpGet(url,callback)
}
static containsNanana(str) {
return /test/i.test(str);
}
static removeQueryParams(url) {
return url.replace(/\?.*$/, '');
}
}

View File

@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "850e9d92-5c95-43da-b719-e418ab0dcf5b",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -43,6 +43,8 @@
<link rel="stylesheet" type="text/css" href="style-mobile.css"/>
<link rel="icon" href="favicon.ico"/>
<style>
@font-face {
font-family: 'MyFont';
@ -141,11 +143,15 @@
<script src="main.js" charset="utf-8"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">
(function () {
// open web debugger console
window.wxsdk = document.createElement("script");
window.wxsdk.async = true;
window.wxsdk.src ="https://res.wx.qq.com/open/js/jweixin-1.6.0.js";
document.body.appendChild(window.wxsdk);
if (typeof VConsole !== 'undefined') {
window.vConsole = new VConsole();
}
@ -188,7 +194,7 @@
function setUserId(name){
let userId = getUserId();
if(userId == null){
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
window.location.href = url;
}
else{

View File

@ -1,4 +1,4 @@
var remote_url="http://static.sparkus.cn/shoot-sun/assets/";
var remote_url="https://static.sparkus.cn/shoot-sun/assets/";
window.boot = function () {
var settings = window._CCSettings;

Binary file not shown.

View File

@ -1 +1 @@
{"paths":{},"types":[],"uuids":["61cyPdEfRN047sDK9rO0W5","71VhFCTINJM6/Ky3oX9nBT","7driQBusNH+IvNuPI898jP","905NFM3gBJkLy5S16w+cYK","92gzt+/yFLq4Tqw5UJpNKx","a2MjXRFdtLlYQ5ouAFv/+R","b4P/PCArtIdIH38t6mlw8Y","d608qFRoFHwbXd0Dap056i","d8HsitJHxOYqo801xBk8ev","deSiGTc8JDzYNZNj9lTnWf","e8Ueib+qJEhL6mXAHdnwbi","012y8iMjlH9LPzYA29IZFH","02delMVqdBD70a/HSD99FK","05howSluxD46CBLX/ZnslG","07KlE5zmdA45F5MXX4tn9v","0dqhqBaopO2Lry9uZ22P/n","0eMoA/FR5HI6YzPvZVxQgP","0fs5U/1H1Kz6hVPTJDIcD6","0fywWxsY9JMrsJlDAwW41z","13l0c3fepPzrdo8UkZ6s2s","18NhvHdGFKxKwrougZlKY/","1cbBR+9BZDmakR2ztuM3kE","29FYIk+N1GYaeWH/q1NxQO","2dZEG9VWtNwrCLXrYMS5hw","2d/rEocc1JwatG4288s85D","31TGCewvhAeYWto4aQi5K1","39xzZtFr5M/acEKWIrq6cD","3bAXuMqSFLuqZf4MEH4bKb","42wTrzp9VL/KgP+q5Snsfz","45zGM6kzNNyqCzHBSeH+jZ","476NNhXXBJioJtzBpXYise","4cjU79RPBBrasMHLDBNsa+","4d2p1BwfdARKIOEeJDBlrN","52e8CGTclIaJaIBf9Hv5l0","543AZJJRJNe74aRSOA/3jd","59gVJrAjVOg5VE8K3Ujzlm","5abBNMMpZBR7vxJDcBQvfE","5acAP5kBJNIq86XuKHIhnw","5cO7kybDxGj4ipyMYdRYZB","5f5dyqtRNNxaFmVzYns6FZ","61RXdTYpxOF4WRDyrNwZFy","68vQp8xUlNf59MVET05m+d","6dbB2vS8xAbZr+Ea0SE2pp","6dfggYQOpNj77kZgggqBuN","79EEpVmG5Ofrf4dzYSv0mf","7a/QZLET9IDreTiBfRn2PD","7bPZFIpvxDz790SV/uquvE","7dew4A8lxPAb6UXs8/8hDU","7d50AODeVNILIcpV/wWtNs","80p0i1It1Jnqkx1Eq6/tjY","81kTyAtYxBG5KiXvC09e2F","84YJ/y5+dGTZCyXrXmIV4s","84wjQCxHFO0KkAKZ9lX2la","85fsVivv9OWICMxb5V/nAe","8av2UppB1GLrFE7foRFNht","8bu7JSDHhB4Ylq2OW1dnPA","8cTTjwpoVNppnt9C5+bTLH","92ACsV8KlNCaPLzdwGvm8c","92fGwMmkBCY5k5VoquaR1+","93DPpMxKVBEZM995IYAktf","93GxQ0tzVDRLJzory0GyLs","95GA3w6h5IAbwc9mRay+cB","9bvaMerUlDyary99mJa6xp","9dN/HK+xVFAK8rOdF0ycf2","9ek+N5QBJJ7bZRvDbIuhMh","a3PqQUiTxHcoYRWepGiyDW","a3x2KFXlRBDL1yV31B5T0l","a32pHCIe9MoqDGzJ5ELQ66","a35WcKLdNBzpEGLBw0FGrq","a5x0ZIVsdNoq+eDLofss7P","a5+VXEpKdC8YAlvdO00kp3","a7GUBGKxNNn5n3Bd1G1/7H","adVjW5ul5J459XvvWIwB3K","aeItzF5mJGJqDQmlqCvIOM","aehgdAqf5K97NRleRunskJ","b3Qw97PiRLTKWa+VuH25ai","b9ISRpubBHKoSDaDOwhq0q","b9XZYB0kFMaYGIVwIzKDW6","bbODDEAMlJAYAhPtN+WjwK","bdFeIR8hBOCanOEDKhjNfF","c3/KjBwH1OfbdG1xkmP5ZU","c43Hs4oAZKeJ//MqMDDarb","c7lG371dZGYLVDWJFIeH2Y","cbvcD+cP5HE6KccuPsfiUR","d6ck6JPlFDParbM+Bd9ci9","d72tmW9ydN4JWZvmf7dWoa","d8BSo7tlZAzKAF6oZCy8E5","d8RPO7qIhCAb5HQbIZgaIU","d9HN6kEbVDCIKVAeTIU14c","dccw1zl/NId7x7keVQwrRQ","e97GVMl6JHh5Ml5qEDdSGa","ecpdLyjvZBwrvm+cedCcQy","f0BIwQ8D5Ml7nTNQbh1YlS","f2I7Pm7elK3Y3OuzUcxpgp","f4H1++vG1Apbak/TfMl5q0","f4QySXWtBKCbSlCEmr2Squ","f48kauGftDgJTF1A+WuyXj","f6Vggt1ZlA+J5lp/yPdtQr","f6j3VD4tBGBJ43J9e8txaS","f9ddP1G7BMirAPTQSjbjHC","faruncavtPIop38CByX5uN"],"scenes":{"db://assets/Scene/GameScene.fire":3,"db://assets/Scene/GuideScene.fire":2,"db://assets/Scene/LoadScene.fire":9,"db://assets/Scene/RankScene.fire":4},"redirect":[12,0,13,1,14,1,15,1,16,1,17,1,18,1,19,1,21,1,23,1,25,1,26,1,27,1,28,1,29,1,30,1,31,1,32,1,33,1,34,1,35,1,36,1,37,1,40,1,42,1,43,1,44,1,45,0,47,1,48,1,49,1,50,1,51,1,53,1,54,1,55,1,56,1,57,1,58,1,59,1,60,1,61,1,63,1,65,1,66,1,68,1,70,1,71,1,72,1,73,1,74,1,75,1,77,1,78,1,82,1,83,1,84,1,85,1,86,1,88,1,89,1,91,0,93,1,94,1,95,1,96,1,97,1,98,1,99,1,100,1],"deps":["internal","resources"],"packs":{"049667bf5":[22,3,5,90,92],"08e56b8fe":[11,20,24,41,46,52,64,67,69,76,79,80,81],"0a50a0981":[2,5,87],"0b3ae8af1":[0,1,6,7,8,10],"0f197f47b":[38,39,4,62]},"name":"main","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["049667bf5","6f853","08e56b8fe","98081","0a50a0981","053c6","0b3ae8af1","7c178","0f197f47b","d393c",9,"f4b63"],"native":[0,"6d707",1,"c06a9",6,"83fcc",7,"d55c2",8,"cdbc9",10,"90cf4"]}}
{"paths":{},"types":[],"uuids":["61cyPdEfRN047sDK9rO0W5","71VhFCTINJM6/Ky3oX9nBT","7driQBusNH+IvNuPI898jP","905NFM3gBJkLy5S16w+cYK","92gzt+/yFLq4Tqw5UJpNKx","a2MjXRFdtLlYQ5ouAFv/+R","b4P/PCArtIdIH38t6mlw8Y","d608qFRoFHwbXd0Dap056i","d8HsitJHxOYqo801xBk8ev","deSiGTc8JDzYNZNj9lTnWf","e8Ueib+qJEhL6mXAHdnwbi","012y8iMjlH9LPzYA29IZFH","02delMVqdBD70a/HSD99FK","05howSluxD46CBLX/ZnslG","07KlE5zmdA45F5MXX4tn9v","0dqhqBaopO2Lry9uZ22P/n","0eMoA/FR5HI6YzPvZVxQgP","0fs5U/1H1Kz6hVPTJDIcD6","0fywWxsY9JMrsJlDAwW41z","13l0c3fepPzrdo8UkZ6s2s","18NhvHdGFKxKwrougZlKY/","1cbBR+9BZDmakR2ztuM3kE","29FYIk+N1GYaeWH/q1NxQO","2dZEG9VWtNwrCLXrYMS5hw","2d/rEocc1JwatG4288s85D","31TGCewvhAeYWto4aQi5K1","39xzZtFr5M/acEKWIrq6cD","3bAXuMqSFLuqZf4MEH4bKb","42wTrzp9VL/KgP+q5Snsfz","45zGM6kzNNyqCzHBSeH+jZ","476NNhXXBJioJtzBpXYise","4cjU79RPBBrasMHLDBNsa+","4d2p1BwfdARKIOEeJDBlrN","52e8CGTclIaJaIBf9Hv5l0","543AZJJRJNe74aRSOA/3jd","59gVJrAjVOg5VE8K3Ujzlm","5abBNMMpZBR7vxJDcBQvfE","5acAP5kBJNIq86XuKHIhnw","5cO7kybDxGj4ipyMYdRYZB","5f5dyqtRNNxaFmVzYns6FZ","61RXdTYpxOF4WRDyrNwZFy","68vQp8xUlNf59MVET05m+d","6dbB2vS8xAbZr+Ea0SE2pp","6dfggYQOpNj77kZgggqBuN","79EEpVmG5Ofrf4dzYSv0mf","7a/QZLET9IDreTiBfRn2PD","7bPZFIpvxDz790SV/uquvE","7dew4A8lxPAb6UXs8/8hDU","7d50AODeVNILIcpV/wWtNs","80p0i1It1Jnqkx1Eq6/tjY","81kTyAtYxBG5KiXvC09e2F","84YJ/y5+dGTZCyXrXmIV4s","84wjQCxHFO0KkAKZ9lX2la","85fsVivv9OWICMxb5V/nAe","8av2UppB1GLrFE7foRFNht","8bu7JSDHhB4Ylq2OW1dnPA","8cTTjwpoVNppnt9C5+bTLH","92ACsV8KlNCaPLzdwGvm8c","92fGwMmkBCY5k5VoquaR1+","93DPpMxKVBEZM995IYAktf","93GxQ0tzVDRLJzory0GyLs","95GA3w6h5IAbwc9mRay+cB","9bvaMerUlDyary99mJa6xp","9dN/HK+xVFAK8rOdF0ycf2","9ek+N5QBJJ7bZRvDbIuhMh","a3PqQUiTxHcoYRWepGiyDW","a3x2KFXlRBDL1yV31B5T0l","a32pHCIe9MoqDGzJ5ELQ66","a35WcKLdNBzpEGLBw0FGrq","a5x0ZIVsdNoq+eDLofss7P","a5+VXEpKdC8YAlvdO00kp3","a7GUBGKxNNn5n3Bd1G1/7H","adVjW5ul5J459XvvWIwB3K","aeItzF5mJGJqDQmlqCvIOM","aehgdAqf5K97NRleRunskJ","b3Qw97PiRLTKWa+VuH25ai","b9ISRpubBHKoSDaDOwhq0q","b9XZYB0kFMaYGIVwIzKDW6","bbODDEAMlJAYAhPtN+WjwK","bdFeIR8hBOCanOEDKhjNfF","c3/KjBwH1OfbdG1xkmP5ZU","c43Hs4oAZKeJ//MqMDDarb","c7lG371dZGYLVDWJFIeH2Y","cbvcD+cP5HE6KccuPsfiUR","d6ck6JPlFDParbM+Bd9ci9","d72tmW9ydN4JWZvmf7dWoa","d8BSo7tlZAzKAF6oZCy8E5","d8RPO7qIhCAb5HQbIZgaIU","d9HN6kEbVDCIKVAeTIU14c","dccw1zl/NId7x7keVQwrRQ","e97GVMl6JHh5Ml5qEDdSGa","ecpdLyjvZBwrvm+cedCcQy","f0BIwQ8D5Ml7nTNQbh1YlS","f2I7Pm7elK3Y3OuzUcxpgp","f4H1++vG1Apbak/TfMl5q0","f4QySXWtBKCbSlCEmr2Squ","f48kauGftDgJTF1A+WuyXj","f6Vggt1ZlA+J5lp/yPdtQr","f6j3VD4tBGBJ43J9e8txaS","f9ddP1G7BMirAPTQSjbjHC","faruncavtPIop38CByX5uN"],"scenes":{"db://assets/Scene/GameScene.fire":3,"db://assets/Scene/GuideScene.fire":2,"db://assets/Scene/LoadScene.fire":9,"db://assets/Scene/RankScene.fire":4},"redirect":[12,0,13,1,14,1,15,1,16,1,17,1,18,1,19,1,21,1,23,1,25,1,26,1,27,1,28,1,29,1,30,1,31,1,32,1,33,1,34,1,35,1,36,1,37,1,40,1,42,1,43,1,44,1,45,0,47,1,48,1,49,1,50,1,51,1,53,1,54,1,55,1,56,1,57,1,58,1,59,1,60,1,61,1,63,1,65,1,66,1,68,1,70,1,71,1,72,1,73,1,74,1,75,1,77,1,78,1,82,1,83,1,84,1,85,1,86,1,88,1,89,1,91,0,93,1,94,1,95,1,96,1,97,1,98,1,99,1,100,1],"deps":["internal","resources"],"packs":{"049667bf5":[22,3,5,90,92],"08e56b8fe":[11,20,24,41,46,52,64,67,69,76,79,80,81],"0a50a0981":[2,5,87],"0b3ae8af1":[0,1,6,7,8,10],"0f197f47b":[38,39,4,62]},"name":"main","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["049667bf5","b6a67","08e56b8fe","98081","0a50a0981","053c6","0b3ae8af1","7c178","0f197f47b","d393c",9,"f4b63"],"native":[0,"6d707",1,"c06a9",6,"83fcc",7,"d55c2",8,"cdbc9",10,"90cf4"]}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -43,6 +43,8 @@
<link rel="stylesheet" type="text/css" href="style-mobile.4be81.css"/>
<link rel="icon" href="favicon.8de18.ico"/>
<style>
@font-face {
font-family: 'MyFont';
@ -137,15 +139,19 @@
</div>
<canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
<script src="src/settings.5ff26.js" charset="utf-8"></script>
<script src="src/settings.accac.js" charset="utf-8"></script>
<script src="main.4fa9f.js" charset="utf-8"></script>
<script src="main.87d43.js" charset="utf-8"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">
(function () {
// open web debugger console
window.wxsdk = document.createElement("script");
window.wxsdk.async = true;
window.wxsdk.src ="https://res.wx.qq.com/open/js/jweixin-1.6.0.js";
document.body.appendChild(window.wxsdk);
if (typeof VConsole !== 'undefined') {
window.vConsole = new VConsole();
}
@ -188,7 +194,7 @@
function setUserId(name){
let userId = getUserId();
if(userId == null){
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
window.location.href = url;
}
else{

View File

@ -1,4 +1,4 @@
var remote_url="http://static.sparkus.cn/shoot-sun/assets/";
var remote_url="https://static.sparkus.cn/shoot-sun/assets/";
window.boot = function () {
var settings = window._CCSettings;
@ -118,7 +118,7 @@ window.boot = function () {
if (window.jsb) {
var isRuntime = (typeof loadRuntime === 'function');
if (isRuntime) {
require('src/settings.5ff26.js');
require('src/settings.accac.js');
require('src/cocos2d-runtime.js');
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
require('src/physics.js');
@ -126,7 +126,7 @@ if (window.jsb) {
require('jsb-adapter/engine/index.js');
}
else {
require('src/settings.5ff26.js');
require('src/settings.accac.js');
require('src/cocos2d-jsb.js');
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
require('src/physics.js');

View File

@ -1 +1 @@
window._CCSettings={platform:"web-mobile",groupList:["default"],collisionMatrix:[[true]],hasResourcesBundle:true,hasStartSceneBundle:false,remoteBundles:[],subpackages:[],launchScene:"db://assets/Scene/LoadScene.fire",orientation:"portrait",jsList:[],bundleVers:{internal:"d0832",resources:"af6f5",main:"bb7bf"}};
window._CCSettings={platform:"web-mobile",groupList:["default"],collisionMatrix:[[true]],hasResourcesBundle:true,hasStartSceneBundle:false,remoteBundles:[],subpackages:[],launchScene:"db://assets/Scene/LoadScene.fire",orientation:"portrait",jsList:[],bundleVers:{internal:"d0832",resources:"af6f5",main:"5ebf3"}};

3
creator.d.ts vendored
View File

@ -3,6 +3,9 @@
The main namespace of Cocos2d-JS, all engine core classes, functions, properties and constants are defined in this namespace.
!#zh
Cocos */
interface Window {
android: any; //全局变量名
}
declare namespace cc {
/** The current version of Cocos2d being used.<br/>
Please DO NOT remove this String, it is an important flag for bug tracking.<br/>

View File

@ -32,6 +32,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var GameData_1 = require("./GameData");
var AudioManager_1 = require("./tool/AudioManager");
var GameTool_1 = require("./tool/GameTool");
var share_1 = require("./tool/share");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
__extends(NewClass, _super);
@ -45,6 +46,7 @@ var NewClass = /** @class */ (function (_super) {
// onLoad () {}
NewClass.prototype.start = function () {
GameTool_1.GameTool.Authentication();
share_1.WeChat.setShare(location.href);
};
NewClass.prototype.click = function () {
AudioManager_1.default._instance.playMusicGame();

View File

@ -1 +1 @@
{"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;AAAA,oBAAoB;AACpB,wEAAwE;AACxE,mBAAmB;AACnB,kFAAkF;AAClF,8BAA8B;AAC9B,kFAAkF;;;;;;;;;;;;;;;;;;;;;AAElF,uCAAkC;AAClC,oDAA+C;AAC/C,4CAA2C;AAGrC,IAAA,KAAsB,EAAE,CAAC,UAAU,EAAlC,OAAO,aAAA,EAAE,QAAQ,cAAiB,CAAC;AAG1C;IAAsC,4BAAY;IAAlD;QAAA,qEA6BC;QA1BG,WAAK,GAAa,IAAI,CAAC;QAGvB,UAAI,GAAW,OAAO,CAAC;;QAsBvB,iBAAiB;IACrB,CAAC;IArBG,eAAe;IAEf,wBAAK,GAAL;QACI,mBAAQ,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAED,wBAAK,GAAL;QACI,sBAAY,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QACvC,IAAG,kBAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,EAAC;YACpC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;SACvC;aACG;YACA,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;SACtC;IACL,CAAC;IAED,2BAAQ,GAAR;QACI,sBAAY,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QACvC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAxBD;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;2CACI;IAGvB;QADC,QAAQ;0CACc;IANN,QAAQ;QAD5B,OAAO;OACa,QAAQ,CA6B5B;IAAD,eAAC;CA7BD,AA6BC,CA7BqC,EAAE,CAAC,SAAS,GA6BjD;kBA7BoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["// Learn TypeScript:\r\n// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html\r\n// Learn Attribute:\r\n// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html\r\n// Learn life-cycle callbacks:\r\n// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html\r\n\r\nimport GameData from \"./GameData\";\r\nimport AudioManager from \"./tool/AudioManager\";\r\nimport { GameTool } from \"./tool/GameTool\";\r\nimport { StorageMessage } from \"./tool/Storage\";\r\n\r\nconst {ccclass, property} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(cc.Label)\r\n label: cc.Label = null;\r\n\r\n @property\r\n text: string = 'hello';\r\n\r\n // onLoad () {}\r\n\r\n start () {\r\n GameTool.Authentication();\r\n }\r\n\r\n click(){\r\n AudioManager._instance.playMusicGame();\r\n if(GameData._instance.GM_INFO.probation){\r\n cc.director.loadScene(\"GuideScene\");\r\n }\r\n else{\r\n cc.director.loadScene(\"GameScene\");\r\n }\r\n }\r\n\r\n openRank(){\r\n AudioManager._instance.playMusicGame();\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n // update (dt) {}\r\n}\r\n"]}
{"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;AAAA,oBAAoB;AACpB,wEAAwE;AACxE,mBAAmB;AACnB,kFAAkF;AAClF,8BAA8B;AAC9B,kFAAkF;;;;;;;;;;;;;;;;;;;;;AAElF,uCAAkC;AAClC,oDAA+C;AAC/C,4CAA2C;AAE3C,sCAAsC;AAEhC,IAAA,KAAsB,EAAE,CAAC,UAAU,EAAlC,OAAO,aAAA,EAAE,QAAQ,cAAiB,CAAC;AAG1C;IAAsC,4BAAY;IAAlD;QAAA,qEAgCC;QA7BG,WAAK,GAAa,IAAI,CAAC;QAGvB,UAAI,GAAW,OAAO,CAAC;;QAyBvB,iBAAiB;IACrB,CAAC;IAxBG,eAAe;IAEf,wBAAK,GAAL;QACI,mBAAQ,CAAC,cAAc,EAAE,CAAC;QAC1B,cAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,wBAAK,GAAL;QACI,sBAAY,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QACvC,IAAG,kBAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,EAAC;YACpC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;SACvC;aACG;YACA,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;SACtC;IACL,CAAC;IAID,2BAAQ,GAAR;QACI,sBAAY,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QACvC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IA3BD;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;2CACI;IAGvB;QADC,QAAQ;0CACc;IANN,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAgC5B;IAAD,eAAC;CAhCD,AAgCC,CAhCqC,EAAE,CAAC,SAAS,GAgCjD;kBAhCoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["// Learn TypeScript:\r\n// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html\r\n// Learn Attribute:\r\n// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html\r\n// Learn life-cycle callbacks:\r\n// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html\r\n\r\nimport GameData from \"./GameData\";\r\nimport AudioManager from \"./tool/AudioManager\";\r\nimport { GameTool } from \"./tool/GameTool\";\r\nimport { StorageMessage } from \"./tool/Storage\";\r\nimport { WeChat } from \"./tool/share\";\r\n\r\nconst {ccclass, property} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(cc.Label)\r\n label: cc.Label = null;\r\n\r\n @property\r\n text: string = 'hello';\r\n\r\n // onLoad () {}\r\n\r\n start () {\r\n GameTool.Authentication();\r\n WeChat.setShare(location.href);\r\n }\r\n\r\n click(){\r\n AudioManager._instance.playMusicGame();\r\n if(GameData._instance.GM_INFO.probation){\r\n cc.director.loadScene(\"GuideScene\");\r\n }\r\n else{\r\n cc.director.loadScene(\"GameScene\");\r\n }\r\n }\r\n\r\n\r\n\r\n openRank(){\r\n AudioManager._instance.playMusicGame();\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n // update (dt) {}\r\n}\r\n"]}

View File

@ -26,7 +26,7 @@ var GameTool = {
var name = "user_" + GameData_1.default._instance.GM_INFO.gameId;
var data = JSON.parse(localStorage.getItem(name));
if (data == "undifend" || data == null || data == "") {
var url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
window.location.href = url;
}
else {

File diff suppressed because one or more lines are too long

View File

@ -363,7 +363,6 @@ var NewClass = /** @class */ (function (_super) {
}
};
NewClass.prototype.xinAction = function () {
// console.log("生命:",GameData._instance.GM_INFO.life);
if (GameData_1.default._instance.GM_INFO.life >= 0) {
var xin = this.node.getChildByName("xin");
xin.y = 120;

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,135 @@
"use strict";
cc._RF.push(module, '850e92SXJVD2rcZ5BirDc9b', 'share');
// Script/tool/share.ts
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WeChat = void 0;
var HttpUtil_1 = require("../crypto/HttpUtil");
var GameData_1 = require("../GameData");
var shareConfig = {
gameId: "100001",
shareLine: "zDLsruVI",
EK: "hui231%1"
};
// 微信操作类
var WeChat = /** @class */ (function () {
function WeChat() {
}
WeChat.setShare = function (url) {
var urlTemp = this.removeQueryParams(url);
shareConfig.shareLine = urlTemp;
WeChat.getSignature(url);
};
WeChat.getResult = function (res) {
if (res) {
var data = res.data;
wx.config({
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: ['onMenuShareTimeline', 'updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
});
wx.checkJsApi({
jsApiList: ['updateAppMessageShareData'],
success: function (res) {
console.log("检查api", res);
// 以键值对的形式返回可用的api值true不可用为false
// 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
}
});
setTimeout(function () {
WeChat.changeShare();
}, 100);
setTimeout(function () {
WeChat.changeShare();
}, 200);
}
};
WeChat.changeShare = function () {
wx.ready(function () {
wx.updateAppMessageShareData({
title: '手眼协调练习',
desc: '脑雾导致你的手眼协调变慢和估测不准吗?',
link: shareConfig.shareLine,
imgUrl: 'https://static.sparkus.cn/public/flyup.jpg',
success: function () {
// 设置成功
console.log("分享好友成功回调");
}
});
wx.updateTimelineShareData({
title: '手眼协调练习',
link: shareConfig.shareLine,
imgUrl: 'https://static.sparkus.cn/public/flyup.jpg',
success: function () {
// 设置成功
console.log("分享朋友圈成功回调");
}
});
});
};
WeChat.getSignature = function (url) {
return new Promise(function (resolve) {
WeChat.getShareInfo((encodeURIComponent(url)), WeChat.getResult);
});
};
WeChat.getShareInfo = function (shareUrl, callback) {
return __awaiter(this, void 0, Promise, function () {
var time, url;
return __generator(this, function (_a) {
time = Math.floor((new Date().getTime()) / 1000);
url = HttpUtil_1.default.apiSign("/api/share/cfg?gameId=" + GameData_1.default._instance.GM_INFO.gameId + "&time=" + time + "&url=" + shareUrl, {});
return [2 /*return*/, HttpUtil_1.default.httpGet(url, callback)];
});
});
};
WeChat.containsNanana = function (str) {
return /test/i.test(str);
};
WeChat.removeQueryParams = function (url) {
return url.replace(/\?.*$/, '');
};
return WeChat;
}());
exports.WeChat = WeChat;
cc._RF.pop();

File diff suppressed because one or more lines are too long

View File

@ -6097,8 +6097,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "最高难度系数",
"_N$string": "最高难度系数",
"_string": "平均难度系数",
"_N$string": "平均难度系数",
"_fontSize": 32,
"_lineHeight": 32,
"_enableWrapText": true,

File diff suppressed because one or more lines are too long

View File

@ -69,6 +69,18 @@ var HttpUtil = /** @class */ (function (_super) {
function HttpUtil() {
return _super !== null && _super.apply(this, arguments) || this;
}
HttpUtil_1 = HttpUtil;
HttpUtil.getShareInfo = function (shareUrl) {
return __awaiter(this, void 0, Promise, function () {
var time, url;
return __generator(this, function (_a) {
console.log("设置分享链接:", shareUrl);
time = Math.floor((new Date().getTime()) / 1000);
url = HttpUtil_1.apiSign("/api/share/cfg?gameId=" + config.gameId + "&time=" + time + "&url=" + shareUrl, {});
return [2 /*return*/, this.httpPost(url, null, null)];
});
});
};
//排行榜type2为获取type1为上传
HttpUtil.rankData = function (type, callback, data) {
return __awaiter(this, void 0, Promise, function () {
@ -77,7 +89,7 @@ var HttpUtil = /** @class */ (function (_super) {
data.gameId = GameData_1.default._instance.GM_INFO.gameId;
data.userId = GameData_1.default._instance.GM_INFO.userId;
time = Math.floor((new Date().getTime()) / 1000);
url = apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data);
url = HttpUtil_1.apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data);
this.httpPost(url, data, callback);
return [2 /*return*/];
});
@ -103,16 +115,18 @@ var HttpUtil = /** @class */ (function (_super) {
data.gameId = GameData_1.default._instance.GM_INFO.gameId;
data.userId = GameData_1.default._instance.GM_INFO.userId;
time = Math.floor((new Date().getTime()) / 1000);
url = apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data);
url = HttpUtil_1.apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data);
this.httpPost(url, data, callback);
return [2 /*return*/];
});
});
};
HttpUtil.httpPost = function (url, data, callBack) {
data.gameId = GameData_1.default._instance.GM_INFO.gameId;
data.userId = GameData_1.default._instance.GM_INFO.userId;
var urlData = "http://api.sparkus.cn" + url;
if (data) {
data.gameId = GameData_1.default._instance.GM_INFO.gameId;
data.userId = GameData_1.default._instance.GM_INFO.userId;
}
var urlData = "https://api.sparkus.cn" + url;
// console.log("params:",JSON.stringify(data));
var xhr = new XMLHttpRequest();
xhr.open('POST', urlData);
@ -121,23 +135,26 @@ var HttpUtil = /** @class */ (function (_super) {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (!data) {
// console.log("初始化失败");
console.log("初始化失败");
return;
}
console.log(data);
var json = JSON.parse(data);
// console.log('http success:' + json);
callBack(json);
console.log('http success:' + json);
if (callBack)
callBack(json);
}
else {
// var json = JSON.parse(data);
// console.log('http fail:' + url);
callBack(json);
if (callBack)
callBack(json);
}
};
xhr.send(JSON.stringify(data));
};
HttpUtil.httpGet = function (url, callBack) {
var urlData = "http://api.sparkus.cn" + url;
var urlData = "https://api.sparkus.cn" + url;
console.log(urlData);
var xhr = new XMLHttpRequest();
xhr.open('GET', urlData);
@ -148,19 +165,44 @@ var HttpUtil = /** @class */ (function (_super) {
if (data) {
var json = JSON.parse(data);
console.info('http success:' + json);
callBack(json);
if (callBack)
callBack(json);
}
else {
if (callBack)
callBack(json);
}
else
callBack(data);
}
else {
console.info('http fail:' + url);
callBack(null);
if (callBack)
callBack(null);
;
}
};
xhr.send();
};
HttpUtil = __decorate([
/**
*
* @param url {string} 接口地址
* @param params {object} 需要加密的参数对象
*/
HttpUtil.apiSign = function (url, params) {
if (params === void 0) { params = {}; }
var convertUrl = url.trim();
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?';
}
// 传入参数转换拼接字符串
var postStr = getQueryString(params);
var signedStr = genSignStr(convertUrl, postStr);
var encryptStr = "sign=" + signedStr;
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
encryptSignStr = encodeURIComponent(encryptSignStr);
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
};
var HttpUtil_1;
HttpUtil = HttpUtil_1 = __decorate([
ccclass
], HttpUtil);
return HttpUtil;
@ -286,24 +328,5 @@ function urlencode(url) {
var params = new URLSearchParams(queryString);
return baseUrl + "?" + params.toString();
}
/**
*
* @param url {string} 接口地址
* @param params {object} 需要加密的参数对象
*/
function apiSign(url, params) {
if (params === void 0) { params = {}; }
var convertUrl = url.trim();
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?';
}
// 传入参数转换拼接字符串
var postStr = getQueryString(params);
var signedStr = genSignStr(convertUrl, postStr);
var encryptStr = "sign=" + signedStr;
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
encryptSignStr = encodeURIComponent(encryptSignStr);
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
}
cc._RF.pop();

File diff suppressed because one or more lines are too long

View File

@ -337,7 +337,8 @@ var GameManager = /** @class */ (function (_super) {
.to(time, { x: num })
.call(function () {
if (type == 1 || type == 5) {
_this.Player.getComponent("Player").jumpPause = true;
if (type == 1)
_this.Player.getComponent("Player").jumpPause = true;
_this.tipShow(tip, type, false);
}
})

File diff suppressed because one or more lines are too long

View File

@ -59,7 +59,7 @@ var GameData = /** @class */ (function (_super) {
gameId: '100001',
userId: "",
guide: true,
url: "http://dev.api.sparkus.cn",
url: "https://dev.api.sparkus.cn",
custom: 0,
//从这开始
jumpUpTime: 0.5,

File diff suppressed because one or more lines are too long

View File

@ -40,8 +40,8 @@
"relativePath": "Shader"
},
"2880dc26-5b38-48bd-baba-daaec97499cb": {
"asset": 1718174432984,
"meta": 1718178852937,
"asset": 1719817150658,
"meta": 1720147068166,
"relativePath": "res"
},
"e8009432-4774-4831-a537-511de4498eee": {
@ -65,8 +65,8 @@
"relativePath": "Script\\ListView\\List.ts"
},
"4bff6e01-b411-48f4-867a-5d841f9e400f": {
"asset": 1718092924637,
"meta": 1718093048549,
"asset": 1720408032312,
"meta": 1720408042324,
"relativePath": "Script\\tool"
},
"bc645fd4-2351-4209-9375-91a48d95ef68": {
@ -180,8 +180,8 @@
"relativePath": "prefab\\block0.prefab"
},
"90e4d14c-de00-4990-bcb9-4b5eb0f9c60a": {
"asset": 1718768224422,
"meta": 1718768224432,
"asset": 1720407958503,
"meta": 1720407958507,
"relativePath": "Scene\\GameScene.fire"
},
"d14c5a08-005b-467a-96bb-5cc71c00c350": {
@ -259,11 +259,6 @@
"meta": 1718094136755,
"relativePath": "prefab\\block13.prefab"
},
"9ed31f56-d049-4890-9ffd-ef08fd28987c": {
"asset": 1718270643634,
"meta": 1718332474422,
"relativePath": "Script\\crypto\\HttpUtil.ts"
},
"80ffcdfe-6c0d-4f69-bb80-9a6874da0923": {
"asset": 1718787833325,
"meta": 1718792313981,
@ -275,8 +270,8 @@
"relativePath": "resources\\sounds\\jump.mp3"
},
"6c0d1b94-1c9c-4421-981d-2d9811289097": {
"asset": 1718164538898,
"meta": 1718178852937,
"asset": 1719816012539,
"meta": 1719816388072,
"relativePath": "resources\\Font"
},
"68df5896-265c-41cf-be36-c92aa69a09e2": {
@ -304,11 +299,6 @@
"meta": 1718701444379,
"relativePath": "resources\\Json"
},
"f2f0b239-3ec5-48fa-8d7c-c45e86f8a55a": {
"asset": 1718706703584,
"meta": 1718706704277,
"relativePath": "Script\\GameData.ts"
},
"54dc0649-2512-4d7b-be1a-452380ff78dd": {
"asset": 1718707532651,
"meta": 1718707565674,
@ -325,28 +315,18 @@
"relativePath": "Script\\Block.ts"
},
"7fd749ea-5b80-4237-a685-6a53799e6c8b": {
"asset": 1718709358463,
"meta": 1718709383948,
"asset": 1719199026120,
"meta": 1719814733959,
"relativePath": "Script\\Player.ts"
},
"35a73693-1080-4066-85ca-a7fc6eb70cd4": {
"asset": 1718709383438,
"meta": 1718709384009,
"relativePath": "Script\\tool\\GameTool.ts"
},
"9c7cc35c-f159-49f4-9cbb-a9f4cfa32d04": {
"asset": 1718792293302,
"meta": 1718792314085,
"asset": 1718797240866,
"meta": 1718967006944,
"relativePath": "Script\\RankManager.ts"
},
"b26a4f51-0921-4f4f-80be-17bc4077adad": {
"asset": 1718778581975,
"meta": 1718785104433,
"relativePath": "Script\\GameManager.ts"
},
"de4a2193-73c2-43cd-8359-363f654e759f": {
"asset": 1718788018514,
"meta": 1718788018519,
"asset": 1720428037779,
"meta": 1720428037782,
"relativePath": "Scene\\LoadScene.fire"
},
"cbbdc0fe-70fe-4713-a29c-72e3ec7e2511": {
@ -361,487 +341,487 @@
},
"9836134e-b892-4283-b6b2-78b5acf3ed45": {
"asset": 1714966328642,
"meta": 1718792310057,
"meta": 1720428027037,
"relativePath": "effects"
},
"abc2cb62-7852-4525-a90d-d474487b88f2": {
"asset": 1714966328642,
"meta": 1718792310231,
"meta": 1720428027142,
"relativePath": "effects\\builtin-phong.effect"
},
"e2f00085-c597-422d-9759-52c360279106": {
"asset": 1714966328642,
"meta": 1718792310310,
"meta": 1720428027195,
"relativePath": "effects\\builtin-toon.effect"
},
"430eccbf-bf2c-4e6e-8c0c-884bbb487f32": {
"asset": 1714966328642,
"meta": 1718792310329,
"meta": 1720428027206,
"relativePath": "effects\\__builtin-editor-gizmo-line.effect"
},
"6c5cf6e1-b044-4eac-9431-835644d57381": {
"asset": 1714966328642,
"meta": 1718792310340,
"meta": 1720428027211,
"relativePath": "effects\\__builtin-editor-gizmo-unlit.effect"
},
"115286d1-2e10-49ee-aab4-341583f607e8": {
"asset": 1714966328642,
"meta": 1718792310385,
"meta": 1720428027236,
"relativePath": "effects\\__builtin-editor-gizmo.effect"
},
"f8e6b000-5643-4b86-9080-aa680ce1f599": {
"asset": 1714966328706,
"meta": 1718792310058,
"meta": 1720428027038,
"relativePath": "image"
},
"5c3eedba-6c41-4c0c-9ba7-d91f813cbd1c": {
"asset": 1714966328721,
"meta": 1718792310060,
"meta": 1720428027039,
"relativePath": "materials"
},
"fc09f9bd-2cce-4605-b630-8145ef809ed6": {
"asset": 1714966328721,
"meta": 1718792310061,
"meta": 1720428027040,
"relativePath": "misc"
},
"d81ec8ad-247c-4e62-aa3c-d35c4193c7af": {
"asset": 1714966328673,
"meta": 1718792310460,
"meta": 1720428027274,
"relativePath": "image\\default_panel.png"
},
"e851e89b-faa2-4484-bea6-5c01dd9f06e2": {
"asset": 1714966328658,
"meta": 1718792310446,
"meta": 1720428027271,
"relativePath": "image\\default_btn_normal.png"
},
"db019bf7-f71c-4111-98cf-918ea180cb48": {
"asset": 1714966328737,
"meta": 1718792310063,
"meta": 1720428027041,
"relativePath": "model"
},
"e39e96e6-6f6e-413f-bcf1-ac7679bb648a": {
"asset": 1714966328737,
"meta": 1718792310473,
"meta": 1720428027285,
"relativePath": "model\\prefab"
},
"9d60001f-b5f4-4726-a629-2659e3ded0b8": {
"asset": 1714966328673,
"meta": 1718792310521,
"meta": 1720428027316,
"relativePath": "image\\default_radio_button_on.png"
},
"d6d3ca85-4681-47c1-b5dd-d036a9d39ea2": {
"asset": 1714966328689,
"meta": 1718792310539,
"meta": 1720428027325,
"relativePath": "image\\default_scrollbar_vertical.png"
},
"71561142-4c83-4933-afca-cb7a17f67053": {
"asset": 1714966328658,
"meta": 1718792310524,
"meta": 1720428027284,
"relativePath": "image\\default_btn_disabled.png"
},
"617323dd-11f4-4dd3-8eec-0caf6b3b45b9": {
"asset": 1714966328689,
"meta": 1718792310531,
"meta": 1720428027318,
"relativePath": "image\\default_scrollbar_vertical_bg.png"
},
"cfef78f1-c8df-49b7-8ed0-4c953ace2621": {
"asset": 1714966328673,
"meta": 1718792310471,
"meta": 1720428027278,
"relativePath": "image\\default_progressbar.png"
},
"4bab67cb-18e6-4099-b840-355f0473f890": {
"asset": 1714966328689,
"meta": 1718792310528,
"meta": 1720428027321,
"relativePath": "image\\default_scrollbar_bg.png"
},
"edd215b9-2796-4a05-aaf5-81f96c9281ce": {
"asset": 1714966328658,
"meta": 1718792310453,
"meta": 1720428027280,
"relativePath": "image\\default_editbox_bg.png"
},
"f6e6dd15-71d1-4ffe-ace7-24fd39942c05": {
"asset": 1714966328752,
"meta": 1718792310064,
"meta": 1720428027041,
"relativePath": "obsolete"
},
"99170b0b-d210-46f1-b213-7d9e3f23098a": {
"asset": 1714966328673,
"meta": 1718792310450,
"meta": 1720428027273,
"relativePath": "image\\default_progressbar_bg.png"
},
"c4480a0a-6ac5-443f-8b40-361a14257fc8": {
"asset": 1714966328706,
"meta": 1718792310955,
"meta": 1720428027620,
"relativePath": "materials\\builtin-phong.mtl"
},
"f743d2b6-b7ea-4c14-a55b-547ed4d0a045": {
"asset": 1714966328752,
"meta": 1718792310066,
"meta": 1720428027042,
"relativePath": "particle"
},
"600301aa-3357-4a10-b086-84f011fa32ba": {
"asset": 1714966328642,
"meta": 1718792310467,
"meta": 1720428027282,
"relativePath": "image\\default-particle.png"
},
"a87cc147-01b2-43f8-8e42-a7ca90b0c757": {
"asset": 1714966328721,
"meta": 1718792310843,
"meta": 1720428027537,
"relativePath": "model\\prefab\\box.prefab"
},
"b43ff3c2-02bb-4874-81f7-f2dea6970f18": {
"asset": 1714966328658,
"meta": 1718792310464,
"meta": 1720428027322,
"relativePath": "image\\default_btn_pressed.png"
},
"fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a": {
"asset": 1714966328737,
"meta": 1718792310845,
"meta": 1720428027548,
"relativePath": "model\\prefab\\capsule.prefab"
},
"ae6c6c98-11e4-452f-8758-75f5c6a56e83": {
"asset": 1714966328831,
"meta": 1718792310067,
"meta": 1720428027042,
"relativePath": "prefab"
},
"0291c134-b3da-4098-b7b5-e397edbe947f": {
"asset": 1714966328689,
"meta": 1718792310519,
"meta": 1720428027327,
"relativePath": "image\\default_scrollbar.png"
},
"b5fc2cf2-7942-483d-be1f-bbeadc4714ad": {
"asset": 1714966328737,
"meta": 1718792310841,
"meta": 1720428027551,
"relativePath": "model\\prefab\\cone.prefab"
},
"1c5e4038-953a-44c2-b620-0bbfc6170477": {
"asset": 1714966328737,
"meta": 1718792310862,
"meta": 1720428027560,
"relativePath": "model\\prefab\\cylinder.prefab"
},
"6e056173-d285-473c-b206-40a7fff5386e": {
"asset": 1714966328689,
"meta": 1718792310536,
"meta": 1720428027330,
"relativePath": "image\\default_sprite.png"
},
"3f376125-a699-40ca-ad05-04d662eaa1f2": {
"asset": 1714966328737,
"meta": 1718792310851,
"meta": 1720428027556,
"relativePath": "model\\prefab\\plane.prefab"
},
"de510076-056b-484f-b94c-83bef217d0e1": {
"asset": 1714966328737,
"meta": 1718792310849,
"meta": 1720428027567,
"relativePath": "model\\prefab\\torus.prefab"
},
"567dcd80-8bf4-4535-8a5a-313f1caf078a": {
"asset": 1714966328673,
"meta": 1718792310526,
"meta": 1720428027320,
"relativePath": "image\\default_radio_button_off.png"
},
"6c9ef10d-b479-420b-bfe6-39cdda6a8ae0": {
"asset": 1714966328737,
"meta": 1718792310859,
"meta": 1720428027559,
"relativePath": "model\\prefab\\quad.prefab"
},
"2d9a4b85-b0ab-4c46-84c5-18f393ab2058": {
"asset": 1714966328737,
"meta": 1718792310861,
"meta": 1720428027562,
"relativePath": "model\\prefab\\sphere.prefab"
},
"0275e94c-56a7-410f-bd1a-fc7483f7d14a": {
"asset": 1714966328705,
"meta": 1718792310534,
"meta": 1720428027323,
"relativePath": "image\\default_sprite_splash.png"
},
"70d7cdb0-04cd-41bb-9480-c06a4785f386": {
"asset": 1714966328768,
"meta": 1718792310550,
"meta": 1720428027338,
"relativePath": "prefab\\3d-camera.prefab"
},
"ed88f13d-fcad-4848-aa35-65a2cb973584": {
"asset": 1714966328768,
"meta": 1718792310560,
"meta": 1720428027345,
"relativePath": "prefab\\3d-stage.prefab"
},
"a3ee0214-b432-4865-9666-4a3211814282": {
"asset": 1714966328800,
"meta": 1718792310552,
"meta": 1720428027338,
"relativePath": "prefab\\light"
},
"897ef7a1-4860-4f64-968d-f5924b18668a": {
"asset": 1714966328752,
"meta": 1718792310548,
"meta": 1720428027336,
"relativePath": "prefab\\2d-camera.prefab"
},
"2c937608-2562-40ea-b264-7395df6f0cea": {
"asset": 1714966328768,
"meta": 1718792310563,
"meta": 1720428027342,
"relativePath": "prefab\\canvas.prefab"
},
"972b9a4d-47ee-4c74-b5c3-61d8a69bc29f": {
"asset": 1714966328768,
"meta": 1718792310557,
"meta": 1720428027344,
"relativePath": "prefab\\button.prefab"
},
"70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4": {
"asset": 1714966328768,
"meta": 1718792310554,
"meta": 1720428027340,
"relativePath": "prefab\\3d-particle.prefab"
},
"61aeb05b-3b32-452b-8eed-2b76deeed554": {
"asset": 1714966328783,
"meta": 1718792310567,
"meta": 1720428027347,
"relativePath": "prefab\\editbox.prefab"
},
"27756ebb-3d33-44b0-9b96-e858fadd4dd4": {
"asset": 1714966328783,
"meta": 1718792310573,
"meta": 1720428027352,
"relativePath": "prefab\\label.prefab"
},
"2be36297-9abb-4fee-8049-9ed5e271da8a": {
"asset": 1714966328721,
"meta": 1718792310629,
"meta": 1720428027395,
"relativePath": "misc\\default_video.mp4"
},
"785a442c-3ceb-45be-a46e-7317f625f3b9": {
"asset": 1714966328783,
"meta": 1718792310576,
"meta": 1720428027354,
"relativePath": "prefab\\layout.prefab"
},
"ca8401fe-ad6e-41a8-bd46-8e3e4e9945be": {
"asset": 1714966328800,
"meta": 1718792310579,
"meta": 1720428027358,
"relativePath": "prefab\\pageview.prefab"
},
"cd33edea-55f5-46c2-958d-357a01384a36": {
"asset": 1714966328800,
"meta": 1718792310583,
"meta": 1720428027365,
"relativePath": "prefab\\particlesystem.prefab"
},
"5965ffac-69da-4b55-bcde-9225d0613c28": {
"asset": 1714966328800,
"meta": 1718792310590,
"meta": 1720428027360,
"relativePath": "prefab\\progressBar.prefab"
},
"4a37dd57-78cd-4cec-aad4-f11a73d12b63": {
"asset": 1714966328800,
"meta": 1718792310585,
"meta": 1720428027361,
"relativePath": "prefab\\richtext.prefab"
},
"32044bd2-481f-4cf1-a656-e2b2fb1594eb": {
"asset": 1714966328800,
"meta": 1718792310588,
"meta": 1720428027363,
"relativePath": "prefab\\scrollview.prefab"
},
"0004d1cf-a0ad-47d8-ab17-34d3db9d35a3": {
"asset": 1714966328800,
"meta": 1718792310593,
"meta": 1720428027367,
"relativePath": "prefab\\slider.prefab"
},
"96083d03-c332-4a3f-9386-d03e2d19e8ee": {
"asset": 1714966328815,
"meta": 1718792310606,
"meta": 1720428027390,
"relativePath": "prefab\\sprite.prefab"
},
"b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd": {
"asset": 1714966328706,
"meta": 1718792310632,
"meta": 1720428027398,
"relativePath": "image\\default_toggle_pressed.png"
},
"d8afc78c-4eac-4a9f-83dd-67bc70344d33": {
"asset": 1714966328862,
"meta": 1718792310069,
"meta": 1720428027044,
"relativePath": "resources"
},
"294c1663-4adf-4a1e-a795-53808011a38a": {
"asset": 1714966328862,
"meta": 1718792310617,
"meta": 1720428027388,
"relativePath": "resources\\effects"
},
"bbee2217-c261-49bd-a8ce-708d6bcc3500": {
"asset": 1714966328893,
"meta": 1718792310622,
"meta": 1720428027391,
"relativePath": "resources\\materials"
},
"30682f87-9f0d-4f17-8a44-72863791461b": {
"asset": 1714966328831,
"meta": 1718792310666,
"meta": 1720428027421,
"relativePath": "resources\\effects\\builtin-2d-graphics.effect"
},
"1f55e3be-b89b-4b79-88de-47fd31018044": {
"asset": 1714966328815,
"meta": 1718792310621,
"meta": 1720428027392,
"relativePath": "prefab\\sprite_splash.prefab"
},
"144c3297-af63-49e8-b8ef-1cfa29b3be28": {
"asset": 1714966328831,
"meta": 1718792310679,
"meta": 1720428027429,
"relativePath": "resources\\effects\\builtin-2d-gray-sprite.effect"
},
"d29077ba-1627-4a72-9579-7b56a235340c": {
"asset": 1714966328706,
"meta": 1718792310634,
"meta": 1720428027385,
"relativePath": "image\\default_toggle_normal.png"
},
"f18742d7-56d2-4eb5-ae49-2d9d710b37c8": {
"asset": 1714966328831,
"meta": 1718792310692,
"meta": 1720428027440,
"relativePath": "resources\\effects\\builtin-2d-label.effect"
},
"0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7": {
"asset": 1714966328831,
"meta": 1718792310703,
"meta": 1720428027448,
"relativePath": "resources\\effects\\builtin-2d-spine.effect"
},
"c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f": {
"asset": 1714966328706,
"meta": 1718792310648,
"meta": 1720428027387,
"relativePath": "image\\default_toggle_disabled.png"
},
"2874f8dd-416c-4440-81b7-555975426e93": {
"asset": 1714966328846,
"meta": 1718792310715,
"meta": 1720428027460,
"relativePath": "resources\\effects\\builtin-2d-sprite.effect"
},
"7de03a80-4457-438d-95a7-3e7cdffd6086": {
"asset": 1714966328815,
"meta": 1718792310624,
"meta": 1720428027399,
"relativePath": "prefab\\tiledmap.prefab"
},
"73a0903d-d80e-4e3c-aa67-f999543c08f5": {
"asset": 1714966328706,
"meta": 1718792310616,
"meta": 1720428027397,
"relativePath": "image\\default_toggle_checkmark.png"
},
"829a282c-b049-4019-bd38-5ace8d8a6417": {
"asset": 1714966328846,
"meta": 1718792310779,
"meta": 1720428027508,
"relativePath": "resources\\effects\\builtin-3d-particle.effect"
},
"2a7c0036-e0b3-4fe1-8998-89a54b8a2bec": {
"asset": 1714966328846,
"meta": 1718792310809,
"meta": 1720428027524,
"relativePath": "resources\\effects\\builtin-3d-trail.effect"
},
"c0040c95-c57f-49cd-9cbc-12316b73d0d4": {
"asset": 1714966328846,
"meta": 1718792310818,
"meta": 1720428027531,
"relativePath": "resources\\effects\\builtin-clear-stencil.effect"
},
"8a96b965-2dc0-4e03-aa90-3b79cb93b5b4": {
"asset": 1714966328752,
"meta": 1718792310668,
"meta": 1720428027404,
"relativePath": "obsolete\\atom.png"
},
"6d91e591-4ce0-465c-809f-610ec95019c6": {
"asset": 1714966328862,
"meta": 1718792310836,
"meta": 1720428027547,
"relativePath": "resources\\effects\\builtin-unlit.effect"
},
"0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c": {
"asset": 1714966328815,
"meta": 1718792310640,
"meta": 1720428027402,
"relativePath": "prefab\\tiledtile.prefab"
},
"0d784963-d024-4ea6-a7db-03be0ad63010": {
"asset": 1714966328815,
"meta": 1718792310638,
"meta": 1720428027406,
"relativePath": "prefab\\toggle.prefab"
},
"bf0a434c-84dd-4a8e-a08a-7a36f180cc75": {
"asset": 1714966328815,
"meta": 1718792310645,
"meta": 1720428027408,
"relativePath": "prefab\\toggleContainer.prefab"
},
"8c5001fd-07ee-4a4b-a8a0-63e15195e94d": {
"asset": 1714966328831,
"meta": 1718792310839,
"meta": 1720428027550,
"relativePath": "prefab\\webview.prefab"
},
"61906da3-7003-4bda-9abc-5769c76faee4": {
"asset": 1714966328783,
"meta": 1718792310865,
"meta": 1720428027554,
"relativePath": "prefab\\light\\ambient.prefab"
},
"ddb99b39-7004-47cd-9705-751905c43c46": {
"asset": 1714966328800,
"meta": 1718792310854,
"meta": 1720428027565,
"relativePath": "prefab\\light\\directional.prefab"
},
"d1b8be49-b0a0-435c-83b7-552bed4bbe35": {
"asset": 1714966328815,
"meta": 1718792310643,
"meta": 1720428027422,
"relativePath": "prefab\\toggleGroup.prefab"
},
"232d2782-c4bd-4bb4-9e01-909f03d6d3b9": {
"asset": 1714966328815,
"meta": 1718792310651,
"meta": 1720428027409,
"relativePath": "prefab\\videoplayer.prefab"
},
"f5331fd2-bf42-4ee3-a3fd-3e1657600eff": {
"asset": 1714966328800,
"meta": 1718792310856,
"meta": 1720428027566,
"relativePath": "prefab\\light\\spot.prefab"
},
"0cf30284-9073-46bc-9eba-e62b69dbbff3": {
"asset": 1714966328800,
"meta": 1718792310864,
"meta": 1720428027558,
"relativePath": "prefab\\light\\point.prefab"
},
"6f801092-0c37-4f30-89ef-c8d960825b36": {
"asset": 1714966328862,
"meta": 1718792310989,
"meta": 1720428027640,
"relativePath": "resources\\materials\\builtin-2d-base.mtl"
},
"a153945d-2511-4c14-be7b-05d242f47d57": {
"asset": 1714966328862,
"meta": 1718792310990,
"meta": 1720428027641,
"relativePath": "resources\\materials\\builtin-2d-graphics.mtl"
},
"7afd064b-113f-480e-b793-8817d19f63c3": {
"asset": 1714966328878,
"meta": 1718792310992,
"meta": 1720428027640,
"relativePath": "resources\\materials\\builtin-2d-spine.mtl"
},
"432fa09c-cf03-4cff-a186-982604408a07": {
"asset": 1714966328878,
"meta": 1718792310998,
"meta": 1720428027643,
"relativePath": "resources\\materials\\builtin-3d-particle.mtl"
},
"cf7e0bb8-a81c-44a9-ad79-d28d43991032": {
"asset": 1714966328878,
"meta": 1718792310999,
"meta": 1720428027645,
"relativePath": "resources\\materials\\builtin-clear-stencil.mtl"
},
"3a7bb79f-32fd-422e-ada2-96f518fed422": {
"asset": 1714966328862,
"meta": 1718792310994,
"meta": 1720428027642,
"relativePath": "resources\\materials\\builtin-2d-gray-sprite.mtl"
},
"466d4f9b-e5f4-4ea8-85d5-3c6e9a65658a": {
"asset": 1714966328878,
"meta": 1718792310995,
"meta": 1720428027645,
"relativePath": "resources\\materials\\builtin-3d-trail.mtl"
},
"e02d87d4-e599-4d16-8001-e14891ac6506": {
"asset": 1714966328878,
"meta": 1718792310993,
"meta": 1720428027642,
"relativePath": "resources\\materials\\builtin-2d-label.mtl"
},
"2a296057-247c-4a1c-bbeb-0548b6c98650": {
"asset": 1714966328893,
"meta": 1718792311001,
"meta": 1720428027646,
"relativePath": "resources\\materials\\builtin-unlit.mtl"
},
"eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432": {
"asset": 1714966328878,
"meta": 1718792310997,
"meta": 1720428027644,
"relativePath": "resources\\materials\\builtin-2d-sprite.mtl"
},
"d0a82d39-bede-46c4-b698-c81ff0dedfff": {
"asset": 1714966328752,
"meta": 1718792310653,
"meta": 1720428027410,
"relativePath": "particle\\atom.png"
},
"ae860740-a9fe-4af7-b351-95e46e9ec909": {
@ -851,22 +831,47 @@
},
"b8223619-7e38-47c4-841f-9160c232495a": {
"asset": 1714966328752,
"meta": 1718792311036,
"meta": 1720428027670,
"relativePath": "obsolete\\atom.plist"
},
"b2687ac4-099e-403c-a192-ff477686f4f5": {
"asset": 1714966328752,
"meta": 1718792311037,
"meta": 1720428027671,
"relativePath": "particle\\atom.plist"
},
"954fec8b-cd16-4bb9-a3b7-7719660e7558": {
"asset": 1714966328737,
"meta": 1718792313850,
"meta": 1720428029778,
"relativePath": "model\\primitives.fbx"
},
"b26a4f51-0921-4f4f-80be-17bc4077adad": {
"asset": 1719818018291,
"meta": 1719818018926,
"relativePath": "Script\\GameManager.ts"
},
"f2f0b239-3ec5-48fa-8d7c-c45e86f8a55a": {
"asset": 1720147113114,
"meta": 1720147182869,
"relativePath": "Script\\GameData.ts"
},
"35a73693-1080-4066-85ca-a7fc6eb70cd4": {
"asset": 1720147131922,
"meta": 1720147183011,
"relativePath": "Script\\tool\\GameTool.ts"
},
"08fd7f48-1f83-43cb-a7b8-dc950ae0f526": {
"asset": 1718788039400,
"meta": 1718788042733,
"asset": 1720169433928,
"meta": 1720169434694,
"relativePath": "Script\\Load.ts"
},
"9ed31f56-d049-4890-9ffd-ef08fd28987c": {
"asset": 1720169819483,
"meta": 1720169867560,
"relativePath": "Script\\crypto\\HttpUtil.ts"
},
"850e9d92-5c95-43da-b719-e418ab0dcf5b": {
"asset": 1720428016793,
"meta": 1720428029894,
"relativePath": "Script\\tool\\share.ts"
}
}

View File

@ -13,12 +13,12 @@
"type": "dock-h",
"children": [
{
"width": 207,
"width": 207.28125,
"height": 571,
"type": "dock-v",
"children": [
{
"width": 207,
"width": 207.28125,
"height": 284,
"type": "panel",
"active": 0,
@ -27,7 +27,7 @@
]
},
{
"width": 207,
"width": 207.28125,
"height": 284,
"type": "panel",
"active": 0,
@ -38,7 +38,7 @@
]
},
{
"width": 758.9896240234375,
"width": 758.3333740234375,
"height": 571,
"type": "panel",
"active": 0,
@ -47,7 +47,7 @@
]
},
{
"width": 308,
"width": 308.38543701171875,
"height": 571,
"type": "panel",
"active": 0,
@ -66,15 +66,14 @@
"cocos-services"
]
},
" common-asset-worker-worker": {},
"window-1718792321471": {}
" common-asset-worker-worker": {}
},
"panels": {
"builder": {
"x": 374,
"y": 0,
"width": 516,
"height": 672
"height": 678
},
"project-settings": {
"x": -8,
@ -99,6 +98,12 @@
"y": 56,
"width": 514,
"height": 538
},
"mini_font": {
"x": 358,
"y": 10,
"width": 518,
"height": 672
}
},
"panelLabelWidth": {}

View File

@ -19,7 +19,6 @@
"6c4c5607-7001-48bf-82a8-35219a4090af",
"7b3d9148-a6fc-43cf-bf74-495feeaaebc4",
"68bd0a7c-c549-4d7f-9f4c-5444f4e66f9d",
"b9212469-b9b0-472a-8483-6833b086ad2a",
"2dfeb128-71cd-49c1-ab46-e36f3cb3ce43",
"18361bc7-7461-4ac4-ac2b-a2e81994a63f",
"a3da91c2-21ef-4ca2-a0c6-cc9e442d0eba",
@ -31,8 +30,9 @@
"c3fca8c1-c07d-4e7d-b746-d719263f9654",
"d844f3bb-a888-4201-be47-41b21981a214",
"c4dc7b38-a006-4a78-9fff-32a3030daadb",
"90e4d14c-de00-4990-bcb9-4b5eb0f9c60a",
"7dae2401-bac3-47f8-8bcd-b8f23cf7c8cf",
"b9212469-b9b0-472a-8483-6833b086ad2a",
"90e4d14c-de00-4990-bcb9-4b5eb0f9c60a",
"de4a2193-73c2-43cd-8359-363f654e759f"
]
}

View File

@ -469,13 +469,16 @@
"3eRg8PZeBFtaEFyN/ppQ+p",
"a9WyE4GOlMN79dBcBzEpI4",
"db64znSk9GAIBlnsMwq2Km",
"61VM8f3ZVATKPnKq4bCnCZ",
"f6WVTZp5xAl6h0nxUPM3I9",
"62sCUwou9CnqdeL1HmfoDR",
"e5a7ykNdRKeL/kHN3s61wZ",
"e1WoFrQ79G7r4ZuQE3HlNb",
"ecasIRO2tG/4ED+0NylkSX",
"f7V64VrtxC9q9aMttksOIo",
"fbUtAVfAZIpY6KH5ZtK2fT",
"6ccG6BqC5MZ7+6LIshX2PJ",
"61VM8f3ZVATKPnKq4bCnCZ",
"e1WoFrQ79G7r4ZuQE3HlNb",
"f6WVTZp5xAl6h0nxUPM3I9"
"50p5sApvJDNbi+MzdATDzt",
"a6BOc3EGhFPbiNSiiLcBW1"
]
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
global.pluginNodeModulesPath=Editor.url("packages://mini_font/node_modules"),global.pluginDistPath="packages://mini_font/dist";var e=Editor.url("packages://mini_font/libs/fixrequire.js");e&&""!==e&&require(e),Object.defineProperty(exports,"__esModule",{value:!0});var o={open:function(){Editor.Panel.open("mini_font")}};exports.load=function(){},exports.messages=o,exports.unload=function(){};

View File

@ -0,0 +1,61 @@
// 'index.' character codes
if (Editor.remote.App.version === "2.4.5") return;
const pluginDistPath = Editor.url(global.pluginDistPath);
const Module = require.main.constructor;
const NativeModule = process.NativeModule;
const pluginNodeModulesPath = global.pluginNodeModulesPath;
// const panelId
if (!process.mainModule.paths.includes(pluginNodeModulesPath)) {
process.mainModule.paths.push(pluginNodeModulesPath)
}
Module._resolveFilename = function(request, parent, isMain, options) {
if (NativeModule.canBeRequiredByUsers(request)) {
return request;
}
var paths;
if (typeof options === 'object' && options !== null &&
Array.isArray(options.paths)) {
const fakeParent = new Module('', null);
paths = [];
for (var i = 0; i < options.paths.length; i++) {
const path = options.paths[i];
fakeParent.paths = Module._nodeModulePaths(path);
const lookupPaths = Module._resolveLookupPaths(request, fakeParent, true);
for (var j = 0; j < lookupPaths.length; j++) {
if (!paths.includes(lookupPaths[j]))
paths.push(lookupPaths[j]);
}
}
} else {
paths = Module._resolveLookupPaths(request, parent, true);
}
// Look up the filename first, since that's the cache key.
let filename = Module._findPath(request, paths, isMain);
if (!filename) {
//找不到,尝试去插件目录找啊---------
filename = Module._findPath(request, [pluginDistPath], isMain);
if (!filename) {
const requireStack = [];
for (var cursor = parent; cursor; cursor = cursor.parent) {
requireStack.push(cursor.filename || cursor.id);
}
let message = `Cannot find module '${request}'`;
if (requireStack.length > 0) {
message = message + '\nRequire stack:\n- ' + requireStack.join('\n- ');
}
// eslint-disable-next-line no-restricted-syntax
var err = new Error(message);
err.code = 'MODULE_NOT_FOUND';
err.requireStack = requireStack;
throw err;
}
}
return filename;
};

15
packages/字体精简工具/node_modules/.bin/fontmin generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../fontmin/cli.js" "$@"
ret=$?
else
node "$basedir/../fontmin/cli.js" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\fontmin\cli.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../fontmin/cli.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../fontmin/cli.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
packages/字体精简工具/node_modules/.bin/mkdirp generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
ret=$?
else
node "$basedir/../mkdirp/bin/cmd.js" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
packages/字体精简工具/node_modules/.bin/node-gyp generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../node-gyp/bin/node-gyp.js" "$@"
ret=$?
else
node "$basedir/../node-gyp/bin/node-gyp.js" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\node-gyp\bin\node-gyp.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
packages/字体精简工具/node_modules/.bin/nopt generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@"
ret=$?
else
node "$basedir/../nopt/bin/nopt.js" "$@"
ret=$?
fi
exit $ret

17
packages/字体精简工具/node_modules/.bin/nopt.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\nopt\bin\nopt.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
packages/字体精简工具/node_modules/.bin/nopt.ps1 generated vendored Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../nopt/bin/nopt.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
packages/字体精简工具/node_modules/.bin/rimraf generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../rimraf/bin.js" "$@"
ret=$?
else
node "$basedir/../rimraf/bin.js" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\rimraf\bin.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../rimraf/bin.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
packages/字体精简工具/node_modules/.bin/semver generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../semver/bin/semver" "$@"
ret=$?
else
node "$basedir/../semver/bin/semver" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\semver\bin\semver" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../semver/bin/semver" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../semver/bin/semver" $args
$ret=$LASTEXITCODE
}
exit $ret

View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@"
ret=$?
else
node "$basedir/../sshpk/bin/sshpk-conv" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-conv" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args
$ret=$LASTEXITCODE
}
exit $ret

View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@"
ret=$?
else
node "$basedir/../sshpk/bin/sshpk-sign" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-sign" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args
$ret=$LASTEXITCODE
}
exit $ret

View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@"
ret=$?
else
node "$basedir/../sshpk/bin/sshpk-verify" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-verify" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
$ret=$LASTEXITCODE
}
exit $ret

View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../strip-indent/cli.js" "$@"
ret=$?
else
node "$basedir/../strip-indent/cli.js" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\strip-indent\cli.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../strip-indent/cli.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../strip-indent/cli.js" $args
$ret=$LASTEXITCODE
}
exit $ret

View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../ttf2woff2/bin/ttf2woff2.js" "$@"
ret=$?
else
node "$basedir/../ttf2woff2/bin/ttf2woff2.js" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\ttf2woff2\bin\ttf2woff2.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../ttf2woff2/bin/ttf2woff2.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../ttf2woff2/bin/ttf2woff2.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
packages/字体精简工具/node_modules/.bin/which generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../which/bin/which" "$@"
ret=$?
else
node "$basedir/../which/bin/which" "$@"
ret=$?
fi
exit $ret

View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\which\bin\which" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../which/bin/which" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../which/bin/which" $args
$ret=$LASTEXITCODE
}
exit $ret

View File

@ -0,0 +1,140 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.4](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.2.3...@ailhc/egf-core@1.2.4) (2021-05-15)
### Bug Fixes
* 修复iife规范的.d.ts声明错误 ([5deed01](https://github.com/AILHC/EasyGameFrameworkOpen/commit/5deed01795ca4abab2bbafbb7b55664d4d23be8f))
## [1.2.3](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.2.2...@ailhc/egf-core@1.2.3) (2021-05-09)
**Note:** Version bump only for package @ailhc/egf-core
## [1.2.2](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.2.1...@ailhc/egf-core@1.2.2) (2021-04-23)
### Bug Fixes
* 重新导出,修复声明识别错误的问题 ([4139c9e](https://github.com/AILHC/EasyGameFrameworkOpen/commit/4139c9ece90ef11d12374a42065bf89ebe44d053))
## [1.2.1](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.2.0...@ailhc/egf-core@1.2.1) (2021-03-31)
### Bug Fixes
* 修复package.json的exports字段,这会导致cocoscreator2.4.5import报错 ([6c22d71](https://github.com/AILHC/EasyGameFrameworkOpen/commit/6c22d71f6f32ec566b95e7b299ec91e732e99585))
# [1.2.0](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.4...@ailhc/egf-core@1.2.0) (2021-03-27)
### Features
* 多入口编译支持 ([fb7a70f](https://github.com/AILHC/EasyGameFrameworkOpen/commit/fb7a70f11d77ede4938b72931e9aac63b059e500))
## [1.1.4](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.3...@ailhc/egf-core@1.1.4) (2021-02-21)
### Bug Fixes
* 修复构建出iife规范的bug ([dc435c8](https://github.com/AILHC/EasyGameFrameworkOpen/commit/dc435c8ed264447b8a80263e7d157b1576c414b3))
## [1.1.3](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.2...@ailhc/egf-core@1.1.3) (2021-02-18)
**Note:** Version bump only for package @ailhc/egf-core
## [1.1.2](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.1...@ailhc/egf-core@1.1.2) (2021-02-15)
### Bug Fixes
* 修复状态切换bug setState 增加切换状态判断 ([52cd947](https://github.com/AILHC/EasyGameFrameworkOpen/commit/52cd947c6532cb811ec6fc9ac8cbd449b079e580))
## [1.1.1](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.0...@ailhc/egf-core@1.1.1) (2021-02-15)
**Note:** Version bump only for package @ailhc/egf-core
# [1.1.0](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.0.1...@ailhc/egf-core@1.1.0) (2021-02-07)
### Features
* 同时支持CommonJs和ES Modules ([409a819](https://github.com/AILHC/EasyGameFrameworkOpen/commit/409a819cfca6808a4070abcbc8acc80a2caf1c84))
## [1.0.1](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.0.0...@ailhc/egf-core@1.0.1) (2021-02-07)
**Note:** Version bump only for package @ailhc/egf-core
# 1.0.0 (2021-01-27)
1. 去掉proxy
# 0.1.6 (2020-12-02)
1. 修改类型声明使getModule也能有更好的类型提示
# 0.1.5 (2020-11-25)
更新iife的声明文件
删除多余的声明文件
# 0.1.4 (2020-11-25)
重新发布更新github地址
# 0.1.3 (2020-11-25)
重新发布,更新声明文件
# 0.1.2 (2020-10-07)
移除加载子程序的逻辑,整理声明文件
# 0.0.1 (2020-10-07)
完善iife格式的声明文件
# 0.0.1 (2020-10-07)
第一次发布

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 AILHC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,119 @@
# `@ailhc/egf-core`
## 简介
EasyGameFramework 的核心模块用于H5游戏/应用程序的渐进式模块化开发
EasyGameFramework core module for progressive modular development of H5 games/applications
## 特性
1. 模块注册、初始化管理机制
2. 智能提示
## Demo
1. [CocosCreator2.4.2 模板](https://github.com/AILHC/egf-ccc-empty)
2. [CocosCreator3D 1.2 模板](https://github.com/AILHC/egf-ccc3d-empty) (ps:使用systemjs+插件模式使用)
3. [CocosCreator3.0 模板](https://github.com/AILHC/egf-ccc3-empty) (ps:使用npm方式使用)
4. [Egret 5.3 支持npm的模板](https://github.com/AILHC/egf-egret-empty)
5. [Laya 2.7.1 支持npm的模板](https://github.com/AILHC/egf-laya-empty)
## 使用
0. 安装
通过npm安装
npm install @ailhc/egf-core
如果支持使用npm模块则 通过导入npm模块的方式
```ts
import { App } from "@ailhc/egf-core"
```
如果不支持则使用dist下的iife格式声明文件则需要自己整理一下
或者直接复制src下的源码
1. 基础使用
```ts
export class XXXLoader implements egf.IBootLoader {
onBoot(app: egf.IApp, bootEnd: egf.BootEndCallback): void {
app.loadModule(moduleIns,"moduleName");
bootEnd(true);
}
}
import { App } from "@ailhc/egf-core"
const app = new App();
//启动
app.bootstrap([new XXXLoader()]);
//初始化
app.init();
```
2. 智能提示和接口提示
```ts
//智能提示的基础,可以在任意模块文件里进行声明比如
//ModuleA.ts
declare global {
interface IModuleMap {
moduleAName :IXXXModuleA
}
}
//ModuleB.ts
declare global {
interface IModuleMap {
moduleBName :IXXXModuleB
}
}
const app = new App<IModuleMap>();
//在运行时也可调用,这里的moduleIns可以是任意实例moduleName可以有智能提示
app.loadModule(moduleIns,"moduleName");
```
3. 全局模块调用
```ts
// 可以将模块实例的字典赋值给全局的对象,比如
//setModuleMap.ts
export let m: IModuleMap;
export function setModuleMap(moduleMap: IModuleMap) {
m = moduleMap;
}
//AppMain.ts
import { setModuleMap, m } from "./ModuleMap";
setModuleMap(app.moduleMap);
//在别的逻辑里可以通过
import { m } from "./ModuleMap";
//调用模块逻辑
m.moduleA.doSometing()
```
## [CHANGELOG](packages/core/CHANGELOG.md)
## 我在哪?
**游戏开发之路有趣但不易,**
**玩起来才能一直热情洋溢。**
关注我, 一起玩转游戏开发!
你的关注是我持续更新的动力~
让我们在这游戏开发的道路上并肩前行
在以下这些渠道可以找到我和我的创作:
公众号搜索:玩转游戏开发
或扫码:<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/abd0c14c9c954e56af20adb71fa00da9~tplv-k3u1fbpfcp-zoom-1.image" alt="img" style="zoom:50%;" />
一起讨论技术的 QQ 群: 1103157878
博客主页: https://pgd.vercel.app/
掘金: https://juejin.cn/user/3069492195769469
github: https://github.com/AILHC

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,16 @@
"use strict";function t(t,e){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){s.label=i[1];break}if(6===i[0]&&s.label<r[1]){s.label=r[1],r=i;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(i);break}r[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){function e(){this._state=0,this._moduleMap={}}return Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"moduleMap",{get:function(){return this._moduleMap},enumerable:!1,configurable:!0}),e.prototype.bootstrap=function(n){return o=this,r=void 0,s=function(){var o,r,i,s,a=this;return t(this,(function(t){switch(t.label){case 0:if(this.setState(e.BOOTING),!n||n.length<=0)return this.setState(e.BOOTEND),[2,!0];if(!(n&&n.length>0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(a,(function(e){e?t():n()}))})))},i=0;i<n.length;i++)r(i);t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return t.sent(),this.setState(e.BOOTEND),[2,!0];case 3:return s=t.sent(),console.error(s),this.setState(e.BOOTEND),[2,!1];case 4:return[2]}}))},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{u(s.next(t))}catch(t){e(t)}}function a(t){try{u(s.throw(t))}catch(t){e(t)}}function u(e){e.done?t(e.value):new i((function(t){t(e.value)})).then(n,a)}u((s=s.apply(o,r||[])).next())}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var o,r,i,s},e.prototype.init=function(){var t,n=this._moduleMap;if(this.state!==e.RUNING){for(var o in n)(t=n[o]).onInit&&t.onInit(this);for(var o in n)(t=n[o]).onAfterInit&&t.onAfterInit(this);this.setState(e.RUNING)}},e.prototype.loadModule=function(t,n){if(this._state===e.STOP)return!1;var o=!1;return n||(n=t.key),n&&"string"==typeof n?t?this._moduleMap[n]?this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5df2\u7ecf\u5b58\u5728,\u4e0d\u91cd\u590d\u52a0\u8f7d"):(this._moduleMap[n]=t,o=!0,this._state===e.RUNING&&(t.onInit&&t.onInit(this),t.onAfterInit&&t.onAfterInit())):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5b9e\u4f8b\u4e3a\u7a7a"):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757key\u4e3a\u7a7a"),o},e.prototype.hasModule=function(t){return!!this._moduleMap[t]},e.prototype.stop=function(){var t,n=this._moduleMap;for(var o in this.setState(e.STOP),n)(t=n[o]).onStop&&t.onStop()},e.prototype.getModule=function(t){return this._moduleMap[t]},e.prototype.setState=function(t){!isNaN(this._state)&&this._state>=t||(this._state=t)},e.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},e.UN_RUN=0,e.BOOTING=1,e.BOOTEND=2,e.RUNING=3,e.STOP=4,e}();exports.App=e;

View File

@ -0,0 +1,111 @@
declare module '@ailhc/egf-core' {
export class App<ModuleMap = any> implements egf.IApp<ModuleMap> {
static readonly UN_RUN: number;
static readonly BOOTING: number;
static readonly BOOTEND: number;
static readonly RUNING: number;
static readonly STOP: number;
protected _state: number;
protected _moduleMap: {
[key: string]: egf.IModule;
};
get state(): number;
get moduleMap(): ModuleMap;
bootstrap(bootLoaders?: egf.IBootLoader[]): Promise<boolean>;
init(): void;
loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean;
hasModule(moduleKey: keyof ModuleMap): boolean;
stop(): void;
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
protected setState(state: number): void;
/**
*
* @param level 1 warn 2 error
* @param msg
*/
protected _log(msg: string, level?: number): void;
}
}
declare module '@ailhc/egf-core' {
global {
namespace egf {
interface IModule {
/**模块名 */
key?: string;
/**
*
*/
onInit?(app: IApp): void;
/**
*
*/
onAfterInit?(app: IApp): void;
/**
*
*/
onStop?(): void;
}
type BootEndCallback = (isSuccess: boolean) => void;
/**
*
*/
interface IBootLoader {
/**
*
* @param app
*/
onBoot(app: IApp, bootEnd: BootEndCallback): void;
}
/**
*
*/
interface IApp<ModuleMap = any> {
/**
*
* 0 1 , 2 , 3
*/
state: number;
/**
*
*/
moduleMap: ModuleMap;
/**
*
* @param bootLoaders
*/
bootstrap(bootLoaders: egf.IBootLoader[]): Promise<boolean>;
/**
*
*/
init(): void;
/**
*
* @param module
*/
loadModule(module: IModule | any, key?: keyof ModuleMap): void;
/**
*
*/
stop(): void;
/**
*
* @param moduleKey
*/
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
/**
*
* @param moduleKey
*/
hasModule(moduleKey: keyof ModuleMap): boolean;
}
}
}
export {};
}
declare module '@ailhc/egf-core' {
export * from '@ailhc/egf-core';
export * from '@ailhc/egf-core';
}

View File

@ -0,0 +1,15 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function t(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var e=function(){function e(){this._state=0,this._moduleMap={}}return Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"moduleMap",{get:function(){return this._moduleMap},enumerable:!1,configurable:!0}),e.prototype.bootstrap=function(n){return o=this,r=void 0,a=function(){var o,r,i,a,s=this;return t(this,(function(t){switch(t.label){case 0:if(this.setState(e.BOOTING),!n||n.length<=0)return this.setState(e.BOOTEND),[2,!0];if(!(n&&n.length>0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(s,(function(e){e?t():n()}))})))},i=0;i<n.length;i++)r(i);t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return t.sent(),this.setState(e.BOOTEND),[2,!0];case 3:return a=t.sent(),console.error(a),this.setState(e.BOOTEND),[2,!1];case 4:return[2]}}))},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){e.done?t(e.value):new i((function(t){t(e.value)})).then(n,s)}u((a=a.apply(o,r||[])).next())}));var o,r,i,a},e.prototype.init=function(){var t,n=this._moduleMap;if(this.state!==e.RUNING){for(var o in n)(t=n[o]).onInit&&t.onInit(this);for(var o in n)(t=n[o]).onAfterInit&&t.onAfterInit(this);this.setState(e.RUNING)}},e.prototype.loadModule=function(t,n){if(this._state===e.STOP)return!1;var o=!1;return n||(n=t.key),n&&"string"==typeof n?t?this._moduleMap[n]?this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5df2\u7ecf\u5b58\u5728,\u4e0d\u91cd\u590d\u52a0\u8f7d"):(this._moduleMap[n]=t,o=!0,this._state===e.RUNING&&(t.onInit&&t.onInit(this),t.onAfterInit&&t.onAfterInit())):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5b9e\u4f8b\u4e3a\u7a7a"):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757key\u4e3a\u7a7a"),o},e.prototype.hasModule=function(t){return!!this._moduleMap[t]},e.prototype.stop=function(){var t,n=this._moduleMap;for(var o in this.setState(e.STOP),n)(t=n[o]).onStop&&t.onStop()},e.prototype.getModule=function(t){return this._moduleMap[t]},e.prototype.setState=function(t){!isNaN(this._state)&&this._state>=t||(this._state=t)},e.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},e.UN_RUN=0,e.BOOTING=1,e.BOOTEND=2,e.RUNING=3,e.STOP=4,e}();export{e as App};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,111 @@
declare module '@ailhc/egf-core' {
export class App<ModuleMap = any> implements egf.IApp<ModuleMap> {
static readonly UN_RUN: number;
static readonly BOOTING: number;
static readonly BOOTEND: number;
static readonly RUNING: number;
static readonly STOP: number;
protected _state: number;
protected _moduleMap: {
[key: string]: egf.IModule;
};
get state(): number;
get moduleMap(): ModuleMap;
bootstrap(bootLoaders?: egf.IBootLoader[]): Promise<boolean>;
init(): void;
loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean;
hasModule(moduleKey: keyof ModuleMap): boolean;
stop(): void;
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
protected setState(state: number): void;
/**
*
* @param level 1 warn 2 error
* @param msg
*/
protected _log(msg: string, level?: number): void;
}
}
declare module '@ailhc/egf-core' {
global {
namespace egf {
interface IModule {
/**模块名 */
key?: string;
/**
*
*/
onInit?(app: IApp): void;
/**
*
*/
onAfterInit?(app: IApp): void;
/**
*
*/
onStop?(): void;
}
type BootEndCallback = (isSuccess: boolean) => void;
/**
*
*/
interface IBootLoader {
/**
*
* @param app
*/
onBoot(app: IApp, bootEnd: BootEndCallback): void;
}
/**
*
*/
interface IApp<ModuleMap = any> {
/**
*
* 0 1 , 2 , 3
*/
state: number;
/**
*
*/
moduleMap: ModuleMap;
/**
*
* @param bootLoaders
*/
bootstrap(bootLoaders: egf.IBootLoader[]): Promise<boolean>;
/**
*
*/
init(): void;
/**
*
* @param module
*/
loadModule(module: IModule | any, key?: keyof ModuleMap): void;
/**
*
*/
stop(): void;
/**
*
* @param moduleKey
*/
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
/**
*
* @param moduleKey
*/
hasModule(moduleKey: keyof ModuleMap): boolean;
}
}
}
export {};
}
declare module '@ailhc/egf-core' {
export * from '@ailhc/egf-core';
export * from '@ailhc/egf-core';
}

View File

@ -0,0 +1,116 @@
declare module 'egfCore' {
class App<ModuleMap = any> implements egf.IApp<ModuleMap> {
static readonly UN_RUN: number;
static readonly BOOTING: number;
static readonly BOOTEND: number;
static readonly RUNING: number;
static readonly STOP: number;
protected _state: number;
protected _moduleMap: {
[key: string]: egf.IModule;
};
get state(): number;
get moduleMap(): ModuleMap;
bootstrap(bootLoaders?: egf.IBootLoader[]): Promise<boolean>;
init(): void;
loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean;
hasModule(moduleKey: keyof ModuleMap): boolean;
stop(): void;
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
protected setState(state: number): void;
/**
*
* @param level 1 warn 2 error
* @param msg
*/
protected _log(msg: string, level?: number): void;
}
}
declare module 'egfCore' {
global {
namespace egf {
interface IModule {
/**模块名 */
key?: string;
/**
*
*/
onInit?(app: IApp): void;
/**
*
*/
onAfterInit?(app: IApp): void;
/**
*
*/
onStop?(): void;
}
type BootEndCallback = (isSuccess: boolean) => void;
/**
*
*/
interface IBootLoader {
/**
*
* @param app
*/
onBoot(app: IApp, bootEnd: BootEndCallback): void;
}
/**
*
*/
interface IApp<ModuleMap = any> {
/**
*
* 0 1 , 2 , 3
*/
state: number;
/**
*
*/
moduleMap: ModuleMap;
/**
*
* @param bootLoaders
*/
bootstrap(bootLoaders: egf.IBootLoader[]): Promise<boolean>;
/**
*
*/
init(): void;
/**
*
* @param module
*/
loadModule(module: IModule | any, key?: keyof ModuleMap): void;
/**
*
*/
stop(): void;
/**
*
* @param moduleKey
*/
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
/**
*
* @param moduleKey
*/
hasModule(moduleKey: keyof ModuleMap): boolean;
}
}
}
}
declare module 'egfCore' {
}
declare namespace egfCore {
type App<ModuleMap = any> = import('egfCore').App<ModuleMap>;
}
declare const egfCore:typeof import("egfCore");

View File

@ -0,0 +1,221 @@
var egfCore = (function (exports) {
'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
var App = (function () {
function App() {
this._state = 0;
this._moduleMap = {};
}
Object.defineProperty(App.prototype, "state", {
get: function () {
return this._state;
},
enumerable: false,
configurable: true
});
Object.defineProperty(App.prototype, "moduleMap", {
get: function () {
return this._moduleMap;
},
enumerable: false,
configurable: true
});
App.prototype.bootstrap = function (bootLoaders) {
return __awaiter(this, void 0, void 0, function () {
var bootPromises, _loop_1, i, e_1;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.setState(App.BOOTING);
if (!bootLoaders || bootLoaders.length <= 0) {
this.setState(App.BOOTEND);
return [2, true];
}
if (!(bootLoaders && bootLoaders.length > 0)) return [3, 4];
bootPromises = [];
_loop_1 = function (i) {
var bootLoader = bootLoaders[i];
bootPromises.push(new Promise(function (res, rej) {
bootLoader.onBoot(_this, function (isOk) {
if (isOk) {
res();
}
else {
rej();
}
});
}));
};
for (i = 0; i < bootLoaders.length; i++) {
_loop_1(i);
}
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4, Promise.all(bootPromises)];
case 2:
_a.sent();
this.setState(App.BOOTEND);
return [2, true];
case 3:
e_1 = _a.sent();
console.error(e_1);
this.setState(App.BOOTEND);
return [2, false];
case 4: return [2];
}
});
});
};
App.prototype.init = function () {
var moduleMap = this._moduleMap;
var moduleIns;
if (this.state === App.RUNING)
return;
for (var key in moduleMap) {
moduleIns = moduleMap[key];
moduleIns.onInit && moduleIns.onInit(this);
}
for (var key in moduleMap) {
moduleIns = moduleMap[key];
moduleIns.onAfterInit && moduleIns.onAfterInit(this);
}
this.setState(App.RUNING);
};
App.prototype.loadModule = function (moduleIns, key) {
if (this._state === App.STOP)
return false;
var res = false;
if (!key) {
key = moduleIns.key;
}
if (key && typeof key === "string") {
if (moduleIns) {
if (!this._moduleMap[key]) {
this._moduleMap[key] = moduleIns;
res = true;
if (this._state === App.RUNING) {
moduleIns.onInit && moduleIns.onInit(this);
moduleIns.onAfterInit && moduleIns.onAfterInit();
}
}
else {
this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5DF2\u7ECF\u5B58\u5728,\u4E0D\u91CD\u590D\u52A0\u8F7D");
}
}
else {
this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5B9E\u4F8B\u4E3A\u7A7A");
}
}
else {
this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757key\u4E3A\u7A7A");
}
return res;
};
App.prototype.hasModule = function (moduleKey) {
return !!this._moduleMap[moduleKey];
};
App.prototype.stop = function () {
var moduleMap = this._moduleMap;
var moduleIns;
this.setState(App.STOP);
for (var key in moduleMap) {
moduleIns = moduleMap[key];
moduleIns.onStop && moduleIns.onStop();
}
};
App.prototype.getModule = function (moduleKey) {
return this._moduleMap[moduleKey];
};
App.prototype.setState = function (state) {
if (!isNaN(this._state)) {
if (this._state >= state)
return;
}
this._state = state;
};
App.prototype._log = function (msg, level) {
switch (level) {
case 1:
console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg);
break;
case 2:
console.error("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg);
break;
default:
console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg);
break;
}
};
App.UN_RUN = 0;
App.BOOTING = 1;
App.BOOTEND = 2;
App.RUNING = 3;
App.STOP = 4;
return App;
}());
exports.App = App;
Object.defineProperty(exports, '__esModule', { value: true });
return exports;
}({}));
var globalTarget =window?window:global;
globalTarget.egfCore?Object.assign({},globalTarget.egfCore):(globalTarget.egfCore = egfCore)
//# sourceMappingURL=egfCore.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
var egfCore=function(t){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */function e(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var n=function(){function t(){this._state=0,this._moduleMap={}}return Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"moduleMap",{get:function(){return this._moduleMap},enumerable:!1,configurable:!0}),t.prototype.bootstrap=function(n){return o=this,r=void 0,a=function(){var o,r,i,a,s=this;return e(this,(function(e){switch(e.label){case 0:if(this.setState(t.BOOTING),!n||n.length<=0)return this.setState(t.BOOTEND),[2,!0];if(!(n&&n.length>0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(s,(function(e){e?t():n()}))})))},i=0;i<n.length;i++)r(i);e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return e.sent(),this.setState(t.BOOTEND),[2,!0];case 3:return a=e.sent(),console.error(a),this.setState(t.BOOTEND),[2,!1];case 4:return[2]}}))},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){e.done?t(e.value):new i((function(t){t(e.value)})).then(n,s)}u((a=a.apply(o,r||[])).next())}));var o,r,i,a},t.prototype.init=function(){var e,n=this._moduleMap;if(this.state!==t.RUNING){for(var o in n)(e=n[o]).onInit&&e.onInit(this);for(var o in n)(e=n[o]).onAfterInit&&e.onAfterInit(this);this.setState(t.RUNING)}},t.prototype.loadModule=function(e,n){if(this._state===t.STOP)return!1;var o=!1;return n||(n=e.key),n&&"string"==typeof n?e?this._moduleMap[n]?this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5df2\u7ecf\u5b58\u5728,\u4e0d\u91cd\u590d\u52a0\u8f7d"):(this._moduleMap[n]=e,o=!0,this._state===t.RUNING&&(e.onInit&&e.onInit(this),e.onAfterInit&&e.onAfterInit())):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5b9e\u4f8b\u4e3a\u7a7a"):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757key\u4e3a\u7a7a"),o},t.prototype.hasModule=function(t){return!!this._moduleMap[t]},t.prototype.stop=function(){var e,n=this._moduleMap;for(var o in this.setState(t.STOP),n)(e=n[o]).onStop&&e.onStop()},t.prototype.getModule=function(t){return this._moduleMap[t]},t.prototype.setState=function(t){!isNaN(this._state)&&this._state>=t||(this._state=t)},t.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},t.UN_RUN=0,t.BOOTING=1,t.BOOTEND=2,t.RUNING=3,t.STOP=4,t}();return t.App=n,Object.defineProperty(t,"__esModule",{value:!0}),t}({}),globalTarget=window||global;globalTarget.egfCore?Object.assign({},globalTarget.egfCore):globalTarget.egfCore=egfCore;

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,16 @@
System.register("@ailhc/egf-core",[],(function(t){"use strict";return{execute:function(){function e(t,e){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){s.label=i[1];break}if(6===i[0]&&s.label<r[1]){s.label=r[1],r=i;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(i);break}r[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}t("App",function(){function t(){this._state=0,this._moduleMap={}}return Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"moduleMap",{get:function(){return this._moduleMap},enumerable:!1,configurable:!0}),t.prototype.bootstrap=function(n){return o=this,r=void 0,s=function(){var o,r,i,s,a=this;return e(this,(function(e){switch(e.label){case 0:if(this.setState(t.BOOTING),!n||n.length<=0)return this.setState(t.BOOTEND),[2,!0];if(!(n&&n.length>0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(a,(function(e){e?t():n()}))})))},i=0;i<n.length;i++)r(i);e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return e.sent(),this.setState(t.BOOTEND),[2,!0];case 3:return s=e.sent(),console.error(s),this.setState(t.BOOTEND),[2,!1];case 4:return[2]}}))},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{u(s.next(t))}catch(t){e(t)}}function a(t){try{u(s.throw(t))}catch(t){e(t)}}function u(e){e.done?t(e.value):new i((function(t){t(e.value)})).then(n,a)}u((s=s.apply(o,r||[])).next())}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var o,r,i,s},t.prototype.init=function(){var e,n=this._moduleMap;if(this.state!==t.RUNING){for(var o in n)(e=n[o]).onInit&&e.onInit(this);for(var o in n)(e=n[o]).onAfterInit&&e.onAfterInit(this);this.setState(t.RUNING)}},t.prototype.loadModule=function(e,n){if(this._state===t.STOP)return!1;var o=!1;return n||(n=e.key),n&&"string"==typeof n?e?this._moduleMap[n]?this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5df2\u7ecf\u5b58\u5728,\u4e0d\u91cd\u590d\u52a0\u8f7d"):(this._moduleMap[n]=e,o=!0,this._state===t.RUNING&&(e.onInit&&e.onInit(this),e.onAfterInit&&e.onAfterInit())):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5b9e\u4f8b\u4e3a\u7a7a"):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757key\u4e3a\u7a7a"),o},t.prototype.hasModule=function(t){return!!this._moduleMap[t]},t.prototype.stop=function(){var e,n=this._moduleMap;for(var o in this.setState(t.STOP),n)(e=n[o]).onStop&&e.onStop()},t.prototype.getModule=function(t){return this._moduleMap[t]},t.prototype.setState=function(t){!isNaN(this._state)&&this._state>=t||(this._state=t)},t.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},t.UN_RUN=0,t.BOOTING=1,t.BOOTEND=2,t.RUNING=3,t.STOP=4,t}())}}}));

View File

@ -0,0 +1,111 @@
declare module '@ailhc/egf-core' {
export class App<ModuleMap = any> implements egf.IApp<ModuleMap> {
static readonly UN_RUN: number;
static readonly BOOTING: number;
static readonly BOOTEND: number;
static readonly RUNING: number;
static readonly STOP: number;
protected _state: number;
protected _moduleMap: {
[key: string]: egf.IModule;
};
get state(): number;
get moduleMap(): ModuleMap;
bootstrap(bootLoaders?: egf.IBootLoader[]): Promise<boolean>;
init(): void;
loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean;
hasModule(moduleKey: keyof ModuleMap): boolean;
stop(): void;
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
protected setState(state: number): void;
/**
*
* @param level 1 warn 2 error
* @param msg
*/
protected _log(msg: string, level?: number): void;
}
}
declare module '@ailhc/egf-core' {
global {
namespace egf {
interface IModule {
/**模块名 */
key?: string;
/**
*
*/
onInit?(app: IApp): void;
/**
*
*/
onAfterInit?(app: IApp): void;
/**
*
*/
onStop?(): void;
}
type BootEndCallback = (isSuccess: boolean) => void;
/**
*
*/
interface IBootLoader {
/**
*
* @param app
*/
onBoot(app: IApp, bootEnd: BootEndCallback): void;
}
/**
*
*/
interface IApp<ModuleMap = any> {
/**
*
* 0 1 , 2 , 3
*/
state: number;
/**
*
*/
moduleMap: ModuleMap;
/**
*
* @param bootLoaders
*/
bootstrap(bootLoaders: egf.IBootLoader[]): Promise<boolean>;
/**
*
*/
init(): void;
/**
*
* @param module
*/
loadModule(module: IModule | any, key?: keyof ModuleMap): void;
/**
*
*/
stop(): void;
/**
*
* @param moduleKey
*/
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
/**
*
* @param moduleKey
*/
hasModule(moduleKey: keyof ModuleMap): boolean;
}
}
}
export {};
}
declare module '@ailhc/egf-core' {
export * from '@ailhc/egf-core';
export * from '@ailhc/egf-core';
}

View File

@ -0,0 +1,116 @@
declare module 'egfCore' {
class App<ModuleMap = any> implements egf.IApp<ModuleMap> {
static readonly UN_RUN: number;
static readonly BOOTING: number;
static readonly BOOTEND: number;
static readonly RUNING: number;
static readonly STOP: number;
protected _state: number;
protected _moduleMap: {
[key: string]: egf.IModule;
};
get state(): number;
get moduleMap(): ModuleMap;
bootstrap(bootLoaders?: egf.IBootLoader[]): Promise<boolean>;
init(): void;
loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean;
hasModule(moduleKey: keyof ModuleMap): boolean;
stop(): void;
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
protected setState(state: number): void;
/**
*
* @param level 1 warn 2 error
* @param msg
*/
protected _log(msg: string, level?: number): void;
}
}
declare module 'egfCore' {
global {
namespace egf {
interface IModule {
/**模块名 */
key?: string;
/**
*
*/
onInit?(app: IApp): void;
/**
*
*/
onAfterInit?(app: IApp): void;
/**
*
*/
onStop?(): void;
}
type BootEndCallback = (isSuccess: boolean) => void;
/**
*
*/
interface IBootLoader {
/**
*
* @param app
*/
onBoot(app: IApp, bootEnd: BootEndCallback): void;
}
/**
*
*/
interface IApp<ModuleMap = any> {
/**
*
* 0 1 , 2 , 3
*/
state: number;
/**
*
*/
moduleMap: ModuleMap;
/**
*
* @param bootLoaders
*/
bootstrap(bootLoaders: egf.IBootLoader[]): Promise<boolean>;
/**
*
*/
init(): void;
/**
*
* @param module
*/
loadModule(module: IModule | any, key?: keyof ModuleMap): void;
/**
*
*/
stop(): void;
/**
*
* @param moduleKey
*/
getModule<K extends keyof ModuleMap>(moduleKey: K): ModuleMap[K];
/**
*
* @param moduleKey
*/
hasModule(moduleKey: keyof ModuleMap): boolean;
}
}
}
}
declare module 'egfCore' {
}
declare namespace egfCore {
type App<ModuleMap = any> = import('egfCore').App<ModuleMap>;
}
declare const egfCore:typeof import("egfCore");

View File

@ -0,0 +1,222 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.egfCore = {}));
}(this, (function (exports) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
var App = (function () {
function App() {
this._state = 0;
this._moduleMap = {};
}
Object.defineProperty(App.prototype, "state", {
get: function () {
return this._state;
},
enumerable: false,
configurable: true
});
Object.defineProperty(App.prototype, "moduleMap", {
get: function () {
return this._moduleMap;
},
enumerable: false,
configurable: true
});
App.prototype.bootstrap = function (bootLoaders) {
return __awaiter(this, void 0, void 0, function () {
var bootPromises, _loop_1, i, e_1;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.setState(App.BOOTING);
if (!bootLoaders || bootLoaders.length <= 0) {
this.setState(App.BOOTEND);
return [2, true];
}
if (!(bootLoaders && bootLoaders.length > 0)) return [3, 4];
bootPromises = [];
_loop_1 = function (i) {
var bootLoader = bootLoaders[i];
bootPromises.push(new Promise(function (res, rej) {
bootLoader.onBoot(_this, function (isOk) {
if (isOk) {
res();
}
else {
rej();
}
});
}));
};
for (i = 0; i < bootLoaders.length; i++) {
_loop_1(i);
}
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4, Promise.all(bootPromises)];
case 2:
_a.sent();
this.setState(App.BOOTEND);
return [2, true];
case 3:
e_1 = _a.sent();
console.error(e_1);
this.setState(App.BOOTEND);
return [2, false];
case 4: return [2];
}
});
});
};
App.prototype.init = function () {
var moduleMap = this._moduleMap;
var moduleIns;
if (this.state === App.RUNING)
return;
for (var key in moduleMap) {
moduleIns = moduleMap[key];
moduleIns.onInit && moduleIns.onInit(this);
}
for (var key in moduleMap) {
moduleIns = moduleMap[key];
moduleIns.onAfterInit && moduleIns.onAfterInit(this);
}
this.setState(App.RUNING);
};
App.prototype.loadModule = function (moduleIns, key) {
if (this._state === App.STOP)
return false;
var res = false;
if (!key) {
key = moduleIns.key;
}
if (key && typeof key === "string") {
if (moduleIns) {
if (!this._moduleMap[key]) {
this._moduleMap[key] = moduleIns;
res = true;
if (this._state === App.RUNING) {
moduleIns.onInit && moduleIns.onInit(this);
moduleIns.onAfterInit && moduleIns.onAfterInit();
}
}
else {
this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5DF2\u7ECF\u5B58\u5728,\u4E0D\u91CD\u590D\u52A0\u8F7D");
}
}
else {
this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5B9E\u4F8B\u4E3A\u7A7A");
}
}
else {
this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757key\u4E3A\u7A7A");
}
return res;
};
App.prototype.hasModule = function (moduleKey) {
return !!this._moduleMap[moduleKey];
};
App.prototype.stop = function () {
var moduleMap = this._moduleMap;
var moduleIns;
this.setState(App.STOP);
for (var key in moduleMap) {
moduleIns = moduleMap[key];
moduleIns.onStop && moduleIns.onStop();
}
};
App.prototype.getModule = function (moduleKey) {
return this._moduleMap[moduleKey];
};
App.prototype.setState = function (state) {
if (!isNaN(this._state)) {
if (this._state >= state)
return;
}
this._state = state;
};
App.prototype._log = function (msg, level) {
switch (level) {
case 1:
console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg);
break;
case 2:
console.error("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg);
break;
default:
console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg);
break;
}
};
App.UN_RUN = 0;
App.BOOTING = 1;
App.BOOTEND = 2;
App.RUNING = 3;
App.STOP = 4;
return App;
}());
exports.App = App;
Object.defineProperty(exports, '__esModule', { value: true });
})));
var globalTarget =window?window:global;
globalTarget.egfCore?Object.assign({},globalTarget.egfCore):(globalTarget.egfCore = egfCore)
//# sourceMappingURL=egfCore.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).egfCore={})}(this,(function(t){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */function e(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var n=function(){function t(){this._state=0,this._moduleMap={}}return Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"moduleMap",{get:function(){return this._moduleMap},enumerable:!1,configurable:!0}),t.prototype.bootstrap=function(n){return o=this,r=void 0,a=function(){var o,r,i,a,s=this;return e(this,(function(e){switch(e.label){case 0:if(this.setState(t.BOOTING),!n||n.length<=0)return this.setState(t.BOOTEND),[2,!0];if(!(n&&n.length>0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(s,(function(e){e?t():n()}))})))},i=0;i<n.length;i++)r(i);e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return e.sent(),this.setState(t.BOOTEND),[2,!0];case 3:return a=e.sent(),console.error(a),this.setState(t.BOOTEND),[2,!1];case 4:return[2]}}))},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){e.done?t(e.value):new i((function(t){t(e.value)})).then(n,s)}u((a=a.apply(o,r||[])).next())}));var o,r,i,a},t.prototype.init=function(){var e,n=this._moduleMap;if(this.state!==t.RUNING){for(var o in n)(e=n[o]).onInit&&e.onInit(this);for(var o in n)(e=n[o]).onAfterInit&&e.onAfterInit(this);this.setState(t.RUNING)}},t.prototype.loadModule=function(e,n){if(this._state===t.STOP)return!1;var o=!1;return n||(n=e.key),n&&"string"==typeof n?e?this._moduleMap[n]?this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5df2\u7ecf\u5b58\u5728,\u4e0d\u91cd\u590d\u52a0\u8f7d"):(this._moduleMap[n]=e,o=!0,this._state===t.RUNING&&(e.onInit&&e.onInit(this),e.onAfterInit&&e.onAfterInit())):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5b9e\u4f8b\u4e3a\u7a7a"):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757key\u4e3a\u7a7a"),o},t.prototype.hasModule=function(t){return!!this._moduleMap[t]},t.prototype.stop=function(){var e,n=this._moduleMap;for(var o in this.setState(t.STOP),n)(e=n[o]).onStop&&e.onStop()},t.prototype.getModule=function(t){return this._moduleMap[t]},t.prototype.setState=function(t){!isNaN(this._state)&&this._state>=t||(this._state=t)},t.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},t.UN_RUN=0,t.BOOTING=1,t.BOOTEND=2,t.RUNING=3,t.STOP=4,t}();t.App=n,Object.defineProperty(t,"__esModule",{value:!0})}));var globalTarget=window||global;globalTarget.egfCore?Object.assign({},globalTarget.egfCore):globalTarget.egfCore=egfCore;

View File

@ -0,0 +1,75 @@
{
"_from": "@ailhc/egf-core@^1.2.0",
"_id": "@ailhc/egf-core@1.2.4",
"_inBundle": false,
"_integrity": "sha1-7s7WrU086rB93VvcDbu01+ilhQk=",
"_location": "/@ailhc/egf-core",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@ailhc/egf-core@^1.2.0",
"name": "@ailhc/egf-core",
"escapedName": "@ailhc%2fegf-core",
"scope": "@ailhc",
"rawSpec": "^1.2.0",
"saveSpec": null,
"fetchSpec": "^1.2.0"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.nlark.com/@ailhc/egf-core/download/@ailhc/egf-core-1.2.4.tgz",
"_shasum": "eeced6ad4d3ceab07ddd5bdc0dbbb4d7e8a58509",
"_spec": "@ailhc/egf-core@^1.2.0",
"_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font",
"author": {
"name": "AILHC",
"email": "505126057@qq.com"
},
"bugs": {
"url": "https://github.com/AILHC/EasyGameFrameworkOpen/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "This is the core of EasyGameFramework, which provides the ability to register modules, get module instances, and load subroutine scripts",
"exports": {
"require": "./dist/cjs/lib/index.js",
"import": "./dist/es/lib/index.mjs"
},
"files": [
"dist"
],
"homepage": "https://github.com/AILHC/EasyGameFrameworkOpen/tree/main/packages/core#readme",
"keywords": [
"module",
"framework",
"game",
"manager"
],
"license": "MIT",
"main": "dist/cjs/lib/index.js",
"module": "dist/es/lib/index.mjs",
"name": "@ailhc/egf-core",
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/AILHC/EasyGameFrameworkOpen.git"
},
"scripts": {
"build:all": "npm run clean-dist && npm run build:cjs&&npm run build:es&&npm run build:umd&&npm run build:iife&&npm run build:system",
"build:cjs": "egf build -f cjs -m true -s inline",
"build:es": "egf build -f es -m true -s inline",
"build:iife": "egf build -f iife -m true",
"build:system": "egf build -f system -m true -s inline",
"build:umd": "egf build -f umd -m true",
"clean-dist": "rimraf dist",
"test": "cross-var lerna exec --scope $npm_package_name --concurrency 1 -- jest --config=../../jest.config.js --roots $PWD",
"watch:cjs": "egf build -w true -f cjs -s inline"
},
"typings": "dist/cjs/types",
"version": "1.2.4"
}

Some files were not shown because too many files have changed in this diff Show More