Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_09
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
op_09
Commits
bae28827
Commit
bae28827
authored
Sep 28, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: onCourseInScreen
parent
2d17c4ad
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
99 additions
and
28 deletions
+99
-28
.gitignore
.gitignore
+7
-1
op_09.meta
play/assets/op_09.meta
+5
-2
op_09.fire
play/assets/op_09/scene/op_09.fire
+3
-3
op_09.fire.meta
play/assets/op_09/scene/op_09.fire.meta
+1
-1
op_09.js
play/assets/op_09/scene/op_09.js
+9
-4
op_09.js.meta
play/assets/op_09/scene/op_09.js.meta
+1
-1
project.json
play/project.json
+1
-1
builder.json
play/settings/builder.json
+1
-1
build_step_0.js
publish/build_step_0.js
+52
-13
package-lock.json
publish/package-lock.json
+15
-0
package.json
publish/package.json
+4
-1
No files found.
.gitignore
View file @
bae28827
...
@@ -5,6 +5,12 @@
...
@@ -5,6 +5,12 @@
/publish/publish/play
/publish/publish/play
/publish/publish/form
/publish/publish/form
/publish/publish/android
/publish/publish/android
/publish/publish/web_desktop
/publish/publish/ios
/publish/publish/ios
/publish/publish/*.zip
/publish/publish/*.zip
/node_modules
/publish/publish/config.json
\ No newline at end of file
/publish/publish/Release*
/node_modules
/play/build_android
/play/build_ios
/play/build_web_desktop
\ No newline at end of file
play/assets/op_09.meta
View file @
bae28827
{
{
"ver": "1.1.2",
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle":
fals
e,
"isBundle":
tru
e,
"bundleName": "",
"bundleName": "",
"priority": 1,
"priority": 1,
"compressionType": {},
"compressionType": {},
"optimizeHotUpdate": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"isRemoteBundle": {
"ios": true,
"android": true
},
"subMetas": {}
"subMetas": {}
}
}
\ No newline at end of file
play/assets/op_09/scene/op_09.fire
View file @
bae28827
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": true,
"autoReleaseAssets": true,
"_id": "
57ea7c61-9b8b-498a-b024-c98ee9124beb
"
"_id": "
074720a3-f261-4ae9-9af1-1adabd8f4c6d
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
...
@@ -1477,14 +1477,14 @@
...
@@ -1477,14 +1477,14 @@
"_id": "29zXboiXFBKoIV4PQ2liTe"
"_id": "29zXboiXFBKoIV4PQ2liTe"
},
},
{
{
"__type__": "
f4edeRi+NdAabqAkVYRwFjK
",
"__type__": "
0e7205TFJ1Pjogb2tsB2COD
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
"__id__": 2
},
},
"_enabled": true,
"_enabled": true,
"_id": "
e687yyoRBIzZAOVRL8Sseh
"
"_id": "
4e8924f57e1b4c17861ac7
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
...
...
play/assets/op_09/scene/op_09.fire.meta
View file @
bae28827
{
{
"ver": "1.2.9",
"ver": "1.2.9",
"uuid": "
57ea7c61-9b8b-498a-b024-c98ee9124beb
",
"uuid": "
074720a3-f261-4ae9-9af1-1adabd8f4c6d
",
"asyncLoadAssets": false,
"asyncLoadAssets": false,
"autoReleaseAssets": true,
"autoReleaseAssets": true,
"subMetas": {}
"subMetas": {}
...
...
play/assets/op_09/scene/op_09.js
View file @
bae28827
...
@@ -121,18 +121,23 @@ cc.Class({
...
@@ -121,18 +121,23 @@ cc.Class({
},
},
preload
()
{
preload
()
{
const
preloadArr
=
[
const
preloadArr
=
[
...
this
.
_imageResList
,
...
this
.
_imageResList
,
...
this
.
_audioResList
,
...
this
.
_audioResList
,
...
this
.
_animaResList
...
this
.
_animaResList
];
];
cc
.
assetManager
.
loadAny
(
preloadArr
,
null
,
null
,
(
err
,
data
)
=>
{
cc
.
assetManager
.
loadAny
(
preloadArr
,
null
,
null
,
(
err
,
data
)
=>
{
this
.
loadEnd
();
if
(
window
&&
window
[
"
air
"
])
{
if
(
window
&&
window
[
"
air
"
])
{
window
[
"
air
"
].
hideAirClassLoading
();
cc
.
find
(
'
Canvas
'
).
opacity
=
0
;
window
.
air
.
onCourseInScreen
=
(
next
)
=>
{
cc
.
find
(
'
Canvas
'
).
opacity
=
255
;
this
.
loadEnd
();
next
();
}
window
.
air
.
hideAirClassLoading
();
}
else
{
this
.
loadEnd
();
}
}
cc
.
debug
.
setDisplayStats
(
false
);
cc
.
debug
.
setDisplayStats
(
false
);
...
...
play/assets/op_09/scene/op_09.js.meta
View file @
bae28827
{
{
"ver": "1.0.8",
"ver": "1.0.8",
"uuid": "
f4ede462-f8d7-4069-ba80-915611c058ca
",
"uuid": "
0e720e53-149d-4f8e-881b-dadb01d82383
",
"isPlugin": false,
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInNative": true,
...
...
play/project.json
View file @
bae28827
...
@@ -3,6 +3,6 @@
...
@@ -3,6 +3,6 @@
"packages"
:
"packages"
,
"packages"
:
"packages"
,
"name"
:
"play"
,
"name"
:
"play"
,
"id"
:
"9af72fd2-44a6-4131-8ea3-3e1b3fa22231"
,
"id"
:
"9af72fd2-44a6-4131-8ea3-3e1b3fa22231"
,
"version"
:
"2.4.
5
"
,
"version"
:
"2.4.
4
"
,
"isNew"
:
false
"isNew"
:
false
}
}
\ No newline at end of file
play/settings/builder.json
View file @
bae28827
{
{
"title"
:
"play"
,
"title"
:
"play"
,
"packageName"
:
"org.cocos2d.demo"
,
"packageName"
:
"org.cocos2d.demo"
,
"startScene"
:
"
57ea7c61-9b8b-498a-b024-c98ee9124beb
"
,
"startScene"
:
"
074720a3-f261-4ae9-9af1-1adabd8f4c6d
"
,
"excludeScenes"
:
[],
"excludeScenes"
:
[],
"includeSDKBox"
:
false
,
"includeSDKBox"
:
false
,
"orientation"
:
{
"orientation"
:
{
...
...
publish/build_step_0.js
View file @
bae28827
let
fs
=
require
(
'
fs
'
);
const
fs
=
require
(
'
fs
'
);
const
{
v4
,
parse
}
=
require
(
'
uuid
'
);
const
{
Base64
}
=
require
(
'
js-base64
'
);
function
getFolderName
(
path
)
{
let
folderName
=
''
;
fs
.
readdirSync
(
path
).
find
(
fileName
=>
{
const
st
=
fs
.
statSync
(
`
${
path
}
/
${
fileName
}
`
);
if
(
st
.
isDirectory
())
{
folderName
=
fileName
;
}
});
return
folderName
;
}
function
editFolderMeta
(
path
,
folderName
)
{
const
metaPath
=
`
${
path
}
/
${
folderName
}
.meta`
;
const
metaDataStr
=
fs
.
readFileSync
(
metaPath
);
const
metaData
=
JSON
.
parse
(
metaDataStr
);
metaData
.
isBundle
=
false
;
fs
.
writeFileSync
(
metaPath
,
JSON
.
stringify
(
metaData
));
}
function
fileReplace
(
path
,
replaceStr
,
newStr
)
{
const
fileStr
=
fs
.
readFileSync
(
path
);
const
newFileStr
=
fileStr
.
toString
().
replace
(
replaceStr
,
newStr
);
fs
.
writeFileSync
(
path
,
newFileStr
);
}
const
path
=
'
../play/assets
'
const
path
=
'
../play/assets
'
const
folderName
=
getFolderName
(
path
);
editFolderMeta
(
path
,
folderName
);
const
oldFireUuid
=
'
57ea7c61-9b8b-498a-b024-c98ee9124beb
'
;
const
newFireUuid
=
v4
();
fileReplace
(
`../play/assets/
${
folderName
}
/scene/
${
folderName
}
.fire.meta`
,
oldFireUuid
,
newFireUuid
);
fileReplace
(
`../play/assets/
${
folderName
}
/scene/
${
folderName
}
.fire`
,
oldFireUuid
,
newFireUuid
);
fileReplace
(
'
../play/settings/builder.json
'
,
oldFireUuid
,
newFireUuid
);
function
getShortUuid
(
uuid
)
{
const
bytes
=
parse
(
uuid
).
subarray
(
1
);
return
uuid
.
substring
(
0
,
5
)
+
Base64
.
fromUint8Array
(
bytes
).
substring
(
2
);
}
let
folderName
=
''
;
const
oldJsUuid
=
'
f4ede462-f8d7-4069-ba80-915611c058ca
'
;
fs
.
readdirSync
(
path
).
find
(
fileName
=>
{
const
oldJsShortUuid
=
'
f4edeRi+NdAabqAkVYRwFjK
'
;
const
st
=
fs
.
statSync
(
`
${
path
}
/
${
fileName
}
`
);
const
oldJsId
=
'
e687yyoRBIzZAOVRL8Sseh
'
;
if
(
st
.
isDirectory
())
{
const
newJsUuid
=
v4
();
folderName
=
fileName
;
const
newJsShortUuid
=
getShortUuid
(
newJsUuid
);
}
const
newJsId
=
v4
().
replace
(
/-/g
,
''
).
substring
(
0
,
oldJsId
.
length
);
});
fileReplace
(
`../play/assets/
${
folderName
}
/scene/
${
folderName
}
.js.meta`
,
oldJsUuid
,
newJsUuid
);
const
metaPath
=
`
${
path
}
/
${
folderName
}
.meta`
;
fileReplace
(
`../play/assets/
${
folderName
}
/scene/
${
folderName
}
.fire`
,
oldFireUuid
,
newFireUuid
);
const
metaDataStr
=
fs
.
readFileSync
(
metaPath
);
fileReplace
(
`../play/assets/
${
folderName
}
/scene/
${
folderName
}
.fire`
,
oldJsShortUuid
,
newJsShortUuid
);
const
metaData
=
JSON
.
parse
(
metaDataStr
);
fileReplace
(
`../play/assets/
${
folderName
}
/scene/
${
folderName
}
.fire`
,
oldJsId
,
newJsId
);
metaData
.
isBundle
=
false
;
fs
.
writeFileSync
(
metaPath
,
JSON
.
stringify
(
metaData
));
publish/package-lock.json
View file @
bae28827
...
@@ -4,6 +4,11 @@
...
@@ -4,6 +4,11 @@
"lockfileVersion"
:
1
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"requires"
:
true
,
"dependencies"
:
{
"dependencies"
:
{
"base-64"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz"
,
"integrity"
:
"sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
},
"bl"
:
{
"bl"
:
{
"version"
:
"1.2.3"
,
"version"
:
"1.2.3"
,
"resolved"
:
"https://registry.npmjs.org/bl/-/bl-1.2.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/bl/-/bl-1.2.3.tgz"
,
...
@@ -107,6 +112,11 @@
...
@@ -107,6 +112,11 @@
"resolved"
:
"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
,
"integrity"
:
"sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
"integrity"
:
"sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
},
"js-base64"
:
{
"version"
:
"3.7.2"
,
"resolved"
:
"https://registry.npmjs.org/js-base64/-/js-base64-3.7.2.tgz"
,
"integrity"
:
"sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ=="
},
"minimist"
:
{
"minimist"
:
{
"version"
:
"1.2.5"
,
"version"
:
"1.2.5"
,
"resolved"
:
"https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz"
,
"resolved"
:
"https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz"
,
...
@@ -222,6 +232,11 @@
...
@@ -222,6 +232,11 @@
"resolved"
:
"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
,
"integrity"
:
"sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
"integrity"
:
"sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
},
"uuid"
:
{
"version"
:
"8.3.2"
,
"resolved"
:
"https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz"
,
"integrity"
:
"sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"wrappy"
:
{
"wrappy"
:
{
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
,
...
...
publish/package.json
View file @
bae28827
...
@@ -9,6 +9,9 @@
...
@@ -9,6 +9,9 @@
"author"
:
""
,
"author"
:
""
,
"license"
:
"ISC"
,
"license"
:
"ISC"
,
"dependencies"
:
{
"dependencies"
:
{
"compressing"
:
"^1.5.1"
"base-64"
:
"^1.0.0"
,
"compressing"
:
"^1.5.1"
,
"js-base64"
:
"^3.7.2"
,
"uuid"
:
"^8.3.2"
}
}
}
}
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