Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car
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
car
Commits
71d8fb8b
Commit
71d8fb8b
authored
May 30, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
572da50a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
320 additions
and
20 deletions
+320
-20
encodings.xml
.idea/encodings.xml
+6
-0
ZipLoader.ts
assets/Start/ZipLoader.ts
+2
-2
index.html
build/web-mobile/index.html
+140
-0
zip.js
extensions/duiba-publish/dist/zip.js
+1
-1
zip.ts
extensions/duiba-publish/source/zip.ts
+15
-15
builder.json
profiles/v2/packages/builder.json
+97
-0
duiba-publish.json
profiles/v2/packages/duiba-publish.json
+19
-0
web-mobile.json
profiles/v2/packages/web-mobile.json
+38
-0
builder.json
settings/v2/packages/builder.json
+2
-2
No files found.
.idea/encodings.xml
0 → 100644
View file @
71d8fb8b
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"Encoding"
>
<file
url=
"file://$PROJECT_DIR$/extensions/duiba-publish/source/zip.ts"
charset=
"UTF-8"
/>
</component>
</project>
\ No newline at end of file
assets/Start/ZipLoader.ts
View file @
71d8fb8b
...
...
@@ -39,7 +39,7 @@ export default class ZipLoader {
downloadZip
(
path
:
string
):
Promise
<
ArrayBuffer
>
{
return
new
Promise
((
resolve
)
=>
{
assetManager
.
downloader
.
downloadFile
(
path
+
'.
zip
'
,
path
+
'.
bin
'
,
{
xhrResponseType
:
"arraybuffer"
},
null
,
(
err
,
data
)
=>
{
...
...
@@ -172,4 +172,4 @@ export default class ZipLoader {
return
oldSend
.
apply
(
this
,
arguments
);
}
}
}
\ No newline at end of file
}
build/web-mobile/index.html
0 → 100644
View file @
71d8fb8b
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
爱心护航 梦想启航
</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta
name=
"viewport"
content=
"width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=true"
/>
<!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black-translucent"
>
<meta
name=
"format-detection"
content=
"telephone=no"
>
<!-- force webkit on 360 -->
<meta
name=
"renderer"
content=
"webkit"
/>
<meta
name=
"force-rendering"
content=
"webkit"
/>
<!-- force edge on IE -->
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
<meta
name=
"msapplication-tap-highlight"
content=
"no"
>
<!-- force full screen on some browser -->
<meta
name=
"full-screen"
content=
"yes"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<!--fix fireball/issues/3568 -->
<!--<meta name="browsermode" content="application">-->
<meta
name=
"x5-page-mode"
content=
"app"
>
<!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<style>
html
{
-ms-touch-action
:
none
;
}
body
,
canvas
,
div
{
display
:
block
;
outline
:
none
;
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
);
user-select
:
none
;
-moz-user-select
:
none
;
-webkit-user-select
:
none
;
-ms-user-select
:
none
;
-khtml-user-select
:
none
;
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
);
}
/* Remove spin of input type number */
input
::-webkit-outer-spin-button
,
input
::-webkit-inner-spin-button
{
/*
display
:
none
;
<-
Crashes
Chrome
on
hover
*/
-webkit-appearance
:
none
;
margin
:
0
;
/*
<--
Apparently
some
margin
are
still
there
even
though
it's
hidden
*/
}
body
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
padding
:
0
;
border
:
0
;
margin
:
0
;
cursor
:
default
;
color
:
#888
;
background-color
:
white
;
text-align
:
center
;
font-family
:
Helvetica
,
Verdana
,
Arial
,
sans-serif
;
display
:
flex
;
flex-direction
:
column
;
}
canvas
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
}
#GameDiv
,
#Cocos3dGameContainer
,
#GameCanvas
{
width
:
100%
;
height
:
100%
;
}
:root
{
--safe-top
:
env
(
safe-area-inset-top
);
--safe-right
:
env
(
safe-area-inset-right
);
--safe-bottom
:
env
(
safe-area-inset-bottom
);
--safe-left
:
env
(
safe-area-inset-left
);
}
</style>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/src/assets/plugin/jszip.min.v3.10.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/src/assets/plugin/rem.min.js"
></script>
<script
src=
"//res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/custom.css" />-->
<!-- <script src="//yun-duiba-credits-test.duibatest.com.cn/TNGD_GAMES/libs/eruda.min.js"></script>-->
<!-- <script>eruda.init()</script>-->
</head>
<body
style=
"overflow: hidden;"
>
<div
id=
"GameDiv"
cc_exact_fit_screen=
"true"
style=
"overflow: hidden;"
>
<div
id=
"Cocos3dGameContainer"
>
<canvas
id=
"GameCanvas"
oncontextmenu=
"event.preventDefault()"
tabindex=
"99"
></canvas>
</div>
</div>
<!-- Polyfills bundle. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<!-- SystemJS support. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/src/system.bundle.js"
charset=
"utf-8"
></script>
<!-- Import map -->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<script
type=
"systemjs-importmap"
charset=
"utf-8"
>
{
"imports"
:{
"cc"
:
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/cocos-js/cc.js"
}}
</script>
<script>
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/1748592605181/index.js'
).
catch
(
function
(
err
)
{
console
.
error
(
err
);
})
</script>
</body>
</html>
extensions/duiba-publish/dist/zip.js
View file @
71d8fb8b
...
...
@@ -61,7 +61,7 @@ function zipDir(name, dir, dist) {
level
:
9
}
}).
then
(
function
(
content
)
{
fs
.
writeFileSync
(
`
${
dist
}
/
${
name
}
.
zip
`
,
content
,
"utf-8"
);
fs
.
writeFileSync
(
`
${
dist
}
/
${
name
}
.
bin
`
,
content
,
"utf-8"
);
resolve
();
});
});
...
...
extensions/duiba-publish/source/zip.ts
View file @
71d8fb8b
...
...
@@ -2,39 +2,39 @@ import * as fs from "fs";
import
*
as
path
from
"path"
;
import
JSZIP
from
"jszip"
;
//
读取目录及文件
//
��ȡĿ¼���ļ�
function
readDir
(
zip
,
nowPath
)
{
const
files
=
fs
.
readdirSync
(
nowPath
);
files
.
forEach
(
function
(
fileName
,
index
)
{
//
遍历检测目录中的文件
console
.
log
(
fileName
,
index
);
//
打印当前读取的文件名
files
.
forEach
(
function
(
fileName
,
index
)
{
//
�������Ŀ¼�е��ļ�
console
.
log
(
fileName
,
index
);
//
��ӡ��ǰ��ȡ���ļ���
const
fillPath
=
nowPath
+
"/"
+
fileName
;
const
file
=
fs
.
statSync
(
fillPath
);
//
获取一个文件的属性
if
(
file
.
isDirectory
())
{
//
如果是目录的话,继续查询
const
dirlist
=
zip
.
folder
(
fileName
);
//压
缩对象中生成该
目录
readDir
(
dirlist
,
fillPath
);
//
重新检索目录文件
const
file
=
fs
.
statSync
(
fillPath
);
//
��ȡһ���ļ�������
if
(
file
.
isDirectory
())
{
//
�����Ŀ¼�Ļ���������ѯ
const
dirlist
=
zip
.
folder
(
fileName
);
//ѹ
�����������ɸ�Ŀ¼
readDir
(
dirlist
,
fillPath
);
//
���¼���Ŀ¼�ļ�
}
else
{
//
排除图片文件
//
�ų�ͼƬ�ļ�
if
(
fileName
.
endsWith
(
".png"
)
||
fileName
.
endsWith
(
".jpg"
))
{
return
;
}
zip
.
file
(
fileName
,
fs
.
readFileSync
(
fillPath
));
//压
缩目录添加文件
zip
.
file
(
fileName
,
fs
.
readFileSync
(
fillPath
));
//ѹ
��Ŀ¼����ļ�
}
});
}
//
开始压缩文件
//
��ʼѹ���ļ�
export
function
zipDir
(
name
,
dir
,
dist
)
{
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
const
zip
=
new
JSZIP
();
readDir
(
zip
,
dir
);
zip
.
generateAsync
({
//
设置压缩格式,开始打包
type
:
"nodebuffer"
,
//nodejs
用
compression
:
"DEFLATE"
,
//压
缩算
法
compressionOptions
:
{
//压
缩级别
zip
.
generateAsync
({
//
����ѹ����ʽ����ʼ���
type
:
"nodebuffer"
,
//nodejs
��
compression
:
"DEFLATE"
,
//ѹ
���㷨
compressionOptions
:
{
//ѹ
������
level
:
9
}
}).
then
(
function
(
content
)
{
fs
.
writeFileSync
(
`
${
dist
}
/
${
name
}
.
zip
`
,
content
,
"utf-8"
);
fs
.
writeFileSync
(
`
${
dist
}
/
${
name
}
.
bin
`
,
content
,
"utf-8"
);
resolve
();
});
});
...
...
profiles/v2/packages/builder.json
View file @
71d8fb8b
...
...
@@ -2,5 +2,102 @@
"__version__"
:
"1.3.9"
,
"log"
:
{
"level"
:
4
},
"common"
:
{
"polyfills"
:
{
"asyncFunctions"
:
true
},
"mainBundleCompressionType"
:
"merge_all_json"
,
"mainBundleIsRemote"
:
true
,
"overwriteProjectSettings"
:
{
"includeModules"
:
{
"gfx-webgl2"
:
"inherit-project-setting"
}
},
"buildPath"
:
"project://build"
,
"outputName"
:
"web-mobile"
,
"platform"
:
"web-mobile"
,
"useSplashScreen"
:
false
},
"BuildTaskManager"
:
{
"taskMap"
:
{
"1748592090600"
:
{
"type"
:
"build"
,
"id"
:
"1748592090600"
,
"progress"
:
1
,
"state"
:
"success"
,
"stage"
:
"build"
,
"message"
:
"2025-5-30 16:10:58 build success in 59 s!"
,
"detailMessage"
:
"43bb50dc-7c49-497c-83da-945f9206b83f.png
\r
0
\r
"
,
"options"
:
{
"name"
:
"card"
,
"server"
:
""
,
"engineModulesConfigKey"
:
"migrationsConfig"
,
"platform"
:
"web-mobile"
,
"buildPath"
:
"project://build"
,
"debug"
:
false
,
"buildMode"
:
"normal"
,
"mangleProperties"
:
false
,
"md5Cache"
:
false
,
"skipCompressTexture"
:
false
,
"sourceMaps"
:
false
,
"overwriteProjectSettings"
:
{
"includeModules"
:
{
"gfx-webgl2"
:
"inherit-project-setting"
,
"physics"
:
"inherit-project-setting"
,
"physics-2d"
:
"inherit-project-setting"
},
"macroConfig"
:
{
"cleanupImageCache"
:
"inherit-project-setting"
}
},
"nativeCodeBundleMode"
:
"both"
,
"polyfills"
:
{
"asyncFunctions"
:
true
},
"experimentalEraseModules"
:
false
,
"startSceneAssetBundle"
:
false
,
"bundleConfigs"
:
[],
"inlineEnum"
:
true
,
"useBuiltinServer"
:
false
,
"md5CacheOptions"
:
{
"excludes"
:
[],
"includes"
:
[],
"replaceOnly"
:
[],
"handleTemplateMd5Link"
:
true
},
"mainBundleIsRemote"
:
true
,
"mainBundleCompressionType"
:
"merge_all_json"
,
"useSplashScreen"
:
false
,
"bundleCommonChunk"
:
false
,
"packAutoAtlas"
:
true
,
"startScene"
:
"9e293cde-e27b-4902-808b-e884f3e9da32"
,
"outputName"
:
"web-mobile"
,
"taskName"
:
"web-mobile"
,
"scenes"
:
[
{
"url"
:
"db://assets/Start/Start.scene"
,
"uuid"
:
"9e293cde-e27b-4902-808b-e884f3e9da32"
},
{
"url"
:
"db://assets/Bundles/HomeScene/HomeScene.scene"
,
"uuid"
:
"04224ebd-adcd-4112-8010-da14ed5ea48a"
,
"bundle"
:
"db://assets/Bundles/HomeScene"
},
{
"url"
:
"db://assets/Bundles/MainGame/MainGame.scene"
,
"uuid"
:
"2c42d766-165b-48f3-b337-ed539df8fa45"
,
"bundle"
:
"db://assets/Bundles/MainGame"
}
],
"wasmCompressionMode"
:
false
,
"packages"
:
{},
"__version__"
:
"1.3.9"
,
"logDest"
:
"project://temp/builder/log/web-mobile2025-5-30 16-01.log"
},
"time"
:
"2025-5-30 16:09:59"
,
"dirty"
:
false
}
}
}
}
profiles/v2/packages/duiba-publish.json
0 → 100644
View file @
71d8fb8b
{
"__version__"
:
"1.0.0"
,
"builder"
:
{
"taskOptionsMap"
:
{
"1748592090600"
:
{
"useZip"
:
true
,
"useJsEncryption"
:
true
,
"uploadDir"
:
"db_games/ccc_game/template3d"
,
"cdnDomain"
:
"//yun.duiba.com.cn"
,
"region"
:
"oss-cn-hangzhou"
,
"bucket"
:
"duiba"
,
"accessKeyId"
:
"LTAI5tPUSSxgkEmKPAfVXUQQ"
,
"accessKeySecret"
:
"6sk3EDd1BYrXlAUoh8maMuN7hOMkh1"
,
"__version__"
:
"1.0.0"
}
},
"__version__"
:
"1.3.9"
}
}
profiles/v2/packages/web-mobile.json
0 → 100644
View file @
71d8fb8b
{
"__version__"
:
"1.0.1"
,
"builder"
:
{
"common"
:
{
"polyfills"
:
{
"asyncFunctions"
:
true
},
"buildPath"
:
"project://build"
,
"outputName"
:
"web-mobile"
,
"mainBundleCompressionType"
:
"merge_all_json"
,
"platform"
:
"web-mobile"
,
"mainBundleIsRemote"
:
true
,
"overwriteProjectSettings"
:
{
"includeModules"
:
{
"gfx-webgl2"
:
"inherit-project-setting"
}
},
"useSplashScreen"
:
false
},
"options"
:
{
"web-mobile"
:
{
"useWebGPU"
:
false
,
"orientation"
:
"portrait"
,
"embedWebDebugger"
:
false
,
"__version__"
:
"1.0.1"
}
},
"taskOptionsMap"
:
{
"1748592090600"
:
{
"useWebGPU"
:
false
,
"orientation"
:
"portrait"
,
"embedWebDebugger"
:
false
,
"__version__"
:
"1.0.1"
}
},
"__version__"
:
"1.3.9"
}
}
settings/v2/packages/builder.json
View file @
71d8fb8b
...
...
@@ -13,8 +13,8 @@
},
"web"
:
{
"preferredOptions"
:
{
"isRemote"
:
fals
e
,
"compressionType"
:
"merge_
dep
"
"isRemote"
:
tru
e
,
"compressionType"
:
"merge_
all_json
"
},
"fallbackOptions"
:
{
"compressionType"
:
"merge_dep"
...
...
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