Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
MingSnake_241120
Commits
e20204fc
Commit
e20204fc
authored
Dec 02, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
94f424b7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
155 deletions
+32
-155
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+2
-2
福袋.png
assets/Bundles/MainGame/png/道具/福袋.png
+0
-0
福袋.png.meta
assets/Bundles/MainGame/png/道具/福袋.png.meta
+0
-134
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+1
-1
Snake.ts
assets/Scripts/Scenes/MainGame/Snake.ts
+1
-1
Start.ts
assets/Start/Start.ts
+5
-2
index.html
build/web-mobile/index.html
+12
-12
hooks.ts
extensions/duiba-publish/source/hooks.ts
+8
-0
builder.json
profiles/v2/packages/builder.json
+3
-3
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
e20204fc
...
@@ -199,7 +199,7 @@
...
@@ -199,7 +199,7 @@
"_priority": 40000,
"_priority": 40000,
"_fov": 45,
"_fov": 45,
"_fovAxis": 0,
"_fovAxis": 0,
"_orthoHeight":
835.01732283464
56,
"_orthoHeight":
790.21758569299
56,
"_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.01732283464
56,
"_orthoHeight":
790.21758569299
56,
"_near": 1,
"_near": 1,
"_far": 2000,
"_far": 2000,
"_color": {
"_color": {
...
...
assets/Bundles/MainGame/png/道具/福袋.png
deleted
100644 → 0
View file @
94f424b7
2.16 KB
assets/Bundles/MainGame/png/道具/福袋.png.meta
deleted
100644 → 0
View file @
94f424b7
{
"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"
}
}
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
e20204fc
...
@@ -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
;
...
...
assets/Scripts/Scenes/MainGame/Snake.ts
View file @
e20204fc
...
@@ -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
;
...
...
assets/Start/Start.ts
View file @
e20204fc
...
@@ -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
;
...
...
build/web-mobile/index.html
View file @
e20204fc
...
@@ -98,13 +98,13 @@
...
@@ -98,13 +98,13 @@
</style>
</style>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/src/assets/plugin/jszip.min.v3.10.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/src/assets/plugin/jszip.min.v3.10.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/src/assets/plugin/rem.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/src/assets/plugin/rem.min.js"
></script>
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/custom.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/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/173310
5195478
/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<!-- SystemJS support. -->
<!-- SystemJS support. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/src/system.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/src/system.bundle.js"
charset=
"utf-8"
></script>
<!-- Import map -->
<!-- Import map -->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/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/173310
5195478
/cocos-js/cc.js"
}}
{
"imports"
:{
"cc"
:
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/cocos-js/cc.js"
}}
</script>
</script>
<script>
<script>
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
5195478
/index.js'
).
catch
(
function
(
err
)
{
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/173310
7537692
/index.js'
).
catch
(
function
(
err
)
{
console
.
error
(
err
);
console
.
error
(
err
);
})
})
</script>
</script>
...
...
extensions/duiba-publish/source/hooks.ts
View file @
e20204fc
...
@@ -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"
);
});
});
}
}
...
...
profiles/v2/packages/builder.json
View file @
e20204fc
...
@@ -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兑吧发布插件 >> 版本号:173310
5195478
\r
color: green
\r
"
,
"detailMessage"
:
"%c兑吧发布插件 >> 版本号:173310
7537692
\r
color: 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
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment