Commit e20204fc authored by haiyoucuv's avatar haiyoucuv

init

parent 94f424b7
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
"_priority": 40000, "_priority": 40000,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 835.0173228346456, "_orthoHeight": 790.2175856929956,
"_near": 0, "_near": 0,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
...@@ -2179,7 +2179,7 @@ ...@@ -2179,7 +2179,7 @@
"_priority": 50000, "_priority": 50000,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 835.0173228346456, "_orthoHeight": 790.2175856929956,
"_near": 1, "_near": 1,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
......
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "986f5ef8-b353-4dd9-90bd-ed5b536ee6a2",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "986f5ef8-b353-4dd9-90bd-ed5b536ee6a2@6c48a",
"displayName": "福袋",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "986f5ef8-b353-4dd9-90bd-ed5b536ee6a2",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "986f5ef8-b353-4dd9-90bd-ed5b536ee6a2@f9941",
"displayName": "福袋",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 61,
"height": 59,
"rawWidth": 61,
"rawHeight": 59,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-30.5,
-29.5,
0,
30.5,
-29.5,
0,
-30.5,
29.5,
0,
30.5,
29.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
59,
61,
59,
0,
0,
61,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-30.5,
-29.5,
0
],
"maxPos": [
30.5,
29.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "986f5ef8-b353-4dd9-90bd-ed5b536ee6a2@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "986f5ef8-b353-4dd9-90bd-ed5b536ee6a2@6c48a"
}
}
...@@ -106,7 +106,7 @@ export class MainGame extends Scene { ...@@ -106,7 +106,7 @@ export class MainGame extends Scene {
// 初始化食物和NPC // 初始化食物和NPC
FoodManger.ins.init(this.maxFood); FoodManger.ins.init(this.maxFood);
// this.fondManger.init(2000); // this.fondManger.init(2000);
// this.initAnimal(this.maxAnimal); this.initAnimal(this.maxAnimal);
// this.initAnimal(1); // this.initAnimal(1);
PreCd.ins.node.active = true; PreCd.ins.node.active = true;
......
...@@ -286,7 +286,7 @@ export class Snake extends Component { ...@@ -286,7 +286,7 @@ export class Snake extends Component {
isFast = false; isFast = false;
private positions: IVec2Like[] = []; // 存储历史位置点 private positions: IVec2Like[] = []; // 存储历史位置点
private readonly HISTORY_LENGTH = 10; // 增加历史点数量 private readonly HISTORY_LENGTH = 10; // 增加历史点数量
private readonly SEGMENT_SPACING = 8; // 增加节点间距 private readonly SEGMENT_SPACING = 6; // 增加节点间距
moveTime = 1 / 60; moveTime = 1 / 60;
totalTime = 0; totalTime = 0;
......
...@@ -68,6 +68,7 @@ export class Start extends Component { ...@@ -68,6 +68,7 @@ export class Start extends Component {
const loadZipPs = zipBundle.map((name: any) => { const loadZipPs = zipBundle.map((name: any) => {
return ZipLoader.ins.loadZip(`${window["__remoteUrl__"]}remote/${name}`) return ZipLoader.ins.loadZip(`${window["__remoteUrl__"]}remote/${name}`)
.then(() => { .then(() => {
loaded++;
this.setProgress(lerp(from, to, loaded / zipBundle.length)); this.setProgress(lerp(from, to, loaded / zipBundle.length));
}); });
}); });
...@@ -75,7 +76,6 @@ export class Start extends Component { ...@@ -75,7 +76,6 @@ export class Start extends Component {
} }
async start() { async start() {
this.setProgress(0.1); this.setProgress(0.1);
await this.loadZipBundle(0.1, 0.3); await this.loadZipBundle(0.1, 0.3);
...@@ -85,6 +85,10 @@ export class Start extends Component { ...@@ -85,6 +85,10 @@ export class Start extends Component {
path: "common", path: "common",
type: "bundle", type: "bundle",
}, },
{
path: "png",
type: "dir",
},
{ {
path: "HomeScene", path: "HomeScene",
type: "bundle", type: "bundle",
...@@ -102,7 +106,6 @@ export class Start extends Component { ...@@ -102,7 +106,6 @@ export class Start extends Component {
} }
getPreLoadList = async (pkg) => { getPreLoadList = async (pkg) => {
const pathArr: { const pathArr: {
path: string; path: string;
......
...@@ -98,13 +98,13 @@ ...@@ -98,13 +98,13 @@
</style> </style>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/src/assets/plugin/zepto.min.js"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/src/assets/plugin/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/src/assets/plugin/declare-process.js"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/src/assets/plugin/declare-process.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/src/assets/plugin/SVGA.Lite.v2.1.1.js"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/src/assets/plugin/SVGA.Lite.v2.1.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/src/assets/plugin/jszip.min.v3.10.1.js"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/src/assets/plugin/jszip.min.v3.10.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/src/assets/plugin/rem.min.js"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/src/assets/plugin/rem.min.js"></script>
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/style.css" />--> <!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/custom.css" />--> <!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/custom.css" />-->
<!-- <script src="//yun-duiba-credits-test.duibatest.com.cn/TNGD_GAMES/libs/eruda.min.js"></script>--> <!-- <script src="//yun-duiba-credits-test.duibatest.com.cn/TNGD_GAMES/libs/eruda.min.js"></script>-->
<!-- <script>eruda.init()</script>--> <!-- <script>eruda.init()</script>-->
...@@ -117,20 +117,20 @@ ...@@ -117,20 +117,20 @@
</div> </div>
<!-- Polyfills bundle. --> <!-- Polyfills bundle. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/src/polyfills.bundle.js" charset="utf-8"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. --> <!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/src/system.bundle.js" charset="utf-8"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/src/system.bundle.js" charset="utf-8"></script>
<!-- Import map --> <!-- Import map -->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>--> <!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<script type="systemjs-importmap" charset="utf-8"> <script type="systemjs-importmap" charset="utf-8">
{"imports":{"cc":"//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/cocos-js/cc.js"}} {"imports":{"cc":"//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/cocos-js/cc.js"}}
</script> </script>
<script> <script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1733105195478/index.js').catch(function (err) { System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1733107537692/index.js').catch(function (err) {
console.error(err); console.error(err);
}) })
</script> </script>
......
...@@ -71,6 +71,8 @@ export const onBeforeCompressSettings: BuildHook.onBeforeCompressSettings = asyn ...@@ -71,6 +71,8 @@ export const onBeforeCompressSettings: BuildHook.onBeforeCompressSettings = asyn
if (options.platform !== "web-mobile") return; if (options.platform !== "web-mobile") return;
const remoteUrl = getRemoteUrl(options.packages[PACKAGE_NAME].cdnDomain, options.packages[PACKAGE_NAME].uploadDir); const remoteUrl = getRemoteUrl(options.packages[PACKAGE_NAME].cdnDomain, options.packages[PACKAGE_NAME].uploadDir);
result.settings.assets.server = remoteUrl; result.settings.assets.server = remoteUrl;
result.settings.rendering.effectSettingsPath = getRemoteUrl(options.packages[PACKAGE_NAME].cdnDomain, options.packages[PACKAGE_NAME].uploadDir) + 'src/effect.bin';
result.settings.plugins.jsList = []; result.settings.plugins.jsList = [];
// result.settings.plugins.jsList = result.settings.plugins.jsList.map((jsUrl) => { // result.settings.plugins.jsList = result.settings.plugins.jsList.map((jsUrl) => {
// return `${remoteUrl}src/${jsUrl}`; // return `${remoteUrl}src/${jsUrl}`;
...@@ -99,6 +101,9 @@ export const onAfterBuild: BuildHook.onAfterBuild = async function (options: ITa ...@@ -99,6 +101,9 @@ export const onAfterBuild: BuildHook.onAfterBuild = async function (options: ITa
if (fs.existsSync(result.dest + "/remote")) { if (fs.existsSync(result.dest + "/remote")) {
fs.readdirSync(result.dest + "/remote") fs.readdirSync(result.dest + "/remote")
.forEach((dirName) => { .forEach((dirName) => {
if (dirName !== "main") {
return;
}
obfuscate(result.dest + "/remote/" + dirName + "/index.js"); obfuscate(result.dest + "/remote/" + dirName + "/index.js");
}); });
} }
...@@ -106,6 +111,9 @@ export const onAfterBuild: BuildHook.onAfterBuild = async function (options: ITa ...@@ -106,6 +111,9 @@ export const onAfterBuild: BuildHook.onAfterBuild = async function (options: ITa
if (fs.existsSync(result.dest + "/assets")) { if (fs.existsSync(result.dest + "/assets")) {
fs.readdirSync(result.dest + "/assets") fs.readdirSync(result.dest + "/assets")
.forEach((dirName) => { .forEach((dirName) => {
if (dirName !== "main") {
return;
}
obfuscate(result.dest + "/assets/" + dirName + "/index.js"); obfuscate(result.dest + "/assets/" + dirName + "/index.js");
}); });
} }
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
"progress": 1, "progress": 1,
"state": "success", "state": "success",
"stage": "build", "stage": "build",
"message": "2024-12-2 10:07:09 build success in 34 s!", "message": "2024-12-2 10:46:52 build success in 1 min 15 s!",
"detailMessage": "%c兑吧发布插件 >> 版本号:1733105195478\rcolor: green\r", "detailMessage": "%c兑吧发布插件 >> 版本号:1733107537692\rcolor: green\r",
"options": { "options": {
"name": "cocos-template-3d", "name": "cocos-template-3d",
"server": "", "server": "",
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
"__version__": "1.3.8", "__version__": "1.3.8",
"logDest": "project://temp/builder/log/web-mobile2024-11-6 15-39.log" "logDest": "project://temp/builder/log/web-mobile2024-11-6 15-39.log"
}, },
"time": "2024-12-2 10:06:35", "time": "2024-12-2 10:45:36",
"dirty": false "dirty": false
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment