Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
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
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
王剑峰
babycare_xiaoxiao
Commits
cabc914a
Commit
cabc914a
authored
Oct 03, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
guide
parent
4ec7aeeb
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23233 additions
and
13658 deletions
+23233
-13658
workspace.xml
.idea/workspace.xml
+42
-36
output.js
output.js
+12740
-13586
output.js.map
output.js.map
+1
-1
package.json
package.json
+1
-1
copyJs.js
scripts/copyJs.js
+2
-2
textureMerge.js
scripts/textureMerge.js
+4
-4
ResJson.ts
src/ResJson.ts
+10441
-27
SkinJson.ts
src/SkinJson.ts
+1
-1
MapScene.ts
src/scene/map/MapScene.ts
+1
-0
No files found.
.idea/workspace.xml
View file @
cabc914a
This diff is collapsed.
Click to expand it.
output.js
View file @
cabc914a
This diff is collapsed.
Click to expand it.
output.js.map
View file @
cabc914a
This diff is collapsed.
Click to expand it.
package.json
View file @
cabc914a
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
"build"
:
"npm run handleRes && node scripts/mergeJson && npm run upload && npm run buildTS"
,
"build"
:
"npm run handleRes && node scripts/mergeJson && npm run upload && npm run buildTS"
,
"watch"
:
"webpack --watch"
,
"watch"
:
"webpack --watch"
,
"dev"
:
"webpack-dev-server --open --config webpack.dev.js --host 0.0.0.0"
,
"dev"
:
"webpack-dev-server --open --config webpack.dev.js --host 0.0.0.0"
,
"buildTS"
:
"webpack --config webpack.prod.js && node scripts/mergeJs"
,
"buildTS"
:
"webpack --config webpack.prod.js && node scripts/mergeJs
&& npm run copyJs
"
,
"copyJs"
:
"node scripts/copyJs"
,
"copyJs"
:
"node scripts/copyJs"
,
"lt"
:
"node scripts/handleLotS.js"
"lt"
:
"node scripts/handleLotS.js"
},
},
...
...
scripts/copyJs.js
View file @
cabc914a
...
@@ -6,10 +6,10 @@ var fs = require("fs");
...
@@ -6,10 +6,10 @@ var fs = require("fs");
// fs.readFileSync("./output.js")
// fs.readFileSync("./output.js")
// )
// )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var
endPath
=
'
D:/duibaGame/淘宝项目/taobao_mini/babycare_xiaoxiaole/babycare
_c_client/client/pages/index/'
;
var
endPath
=
'
/Users/haiyoucuv/Documents/Web/泡泡玛特消消乐/taobao_mini/popmart_xiaoxiaole/popmart
_c_client/client/pages/index/'
;
var
version
=
Math
.
round
(
new
Date
().
getTime
()
/
1000
);
var
version
=
Math
.
round
(
new
Date
().
getTime
()
/
1000
);
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
fs
.
writeFileSync
(
endPath
+
"output.js"
,
fs
.
readFileSync
(
"./released/output.js"
));
fs
.
writeFileSync
(
endPath
+
"output.js"
,
fs
.
readFileSync
(
"./released/output.js"
));
// console.log("js覆盖完成")
// console.log("js覆盖完成")
console
.
log
(
`版本号:
console
.
log
(
`版本号:
${
version
}
`
)
${
version
}
`
)
\ No newline at end of file
scripts/textureMerge.js
View file @
cabc914a
...
@@ -47,7 +47,7 @@ files.forEach(function (file) {
...
@@ -47,7 +47,7 @@ files.forEach(function (file) {
var
pathname
=
outPath
+
file
+
"/"
+
file
+
".json"
;
var
pathname
=
outPath
+
file
+
"/"
+
file
+
".json"
;
//有中文命名时处理
//有中文命名时处理
var
data
=
iconv
.
decode
(
fs
.
readFileSync
(
pathname
),
"
GBK
"
);
//GBK,window版本只能GBK,TexturePacker版本问题,mac改成utf-8
var
data
=
iconv
.
decode
(
fs
.
readFileSync
(
pathname
),
"
utf-8
"
);
//GBK,window版本只能GBK,TexturePacker版本问题,mac改成utf-8
// console.log(data)
// console.log(data)
//反序列化
//反序列化
data
=
JSON
.
parse
(
data
);
//eval(data)
data
=
JSON
.
parse
(
data
);
//eval(data)
...
@@ -99,7 +99,7 @@ function getTmCmd(src, outPath, name) {
...
@@ -99,7 +99,7 @@ function getTmCmd(src, outPath, name) {
/**
/**
* 对文件使用utf8编码
* 对文件使用utf8编码
* @param {string} pathname
* @param {string} pathname
*/
*/
function
applyUtf8
(
pathname
)
{
function
applyUtf8
(
pathname
)
{
fs
.
writeFile
(
pathname
,
iconv
.
decode
(
fs
.
readFileSync
(
pathname
),
"GBK"
),
{
fs
.
writeFile
(
pathname
,
iconv
.
decode
(
fs
.
readFileSync
(
pathname
),
"GBK"
),
{
...
@@ -113,7 +113,7 @@ function applyUtf8(pathname) {
...
@@ -113,7 +113,7 @@ function applyUtf8(pathname) {
/**
/**
* 判断文件夹内是否有图片
* 判断文件夹内是否有图片
* @param {*} path
* @param {*} path
*/
*/
function
judgeHasImage
(
path
)
{
function
judgeHasImage
(
path
)
{
var
files
=
fs
.
readdirSync
(
path
);
var
files
=
fs
.
readdirSync
(
path
);
...
@@ -128,4 +128,4 @@ function judgeHasImage(path) {
...
@@ -128,4 +128,4 @@ function judgeHasImage(path) {
}
}
}
}
return
false
;
return
false
;
}
}
\ No newline at end of file
src/ResJson.ts
View file @
cabc914a
This diff is collapsed.
Click to expand it.
src/SkinJson.ts
View file @
cabc914a
...
@@ -327,7 +327,7 @@ export const SkinJson = {
...
@@ -327,7 +327,7 @@ export const SkinJson = {
"alpha"
:
1
,
"alpha"
:
1
,
"type"
:
"sprite"
,
"type"
:
"sprite"
,
"props"
:
{
"props"
:
{
"source"
:
"
prize.png
"
"source"
:
""
},
},
"id"
:
"prizeImg"
"id"
:
"prizeImg"
},
},
...
...
src/scene/map/MapScene.ts
View file @
cabc914a
...
@@ -78,6 +78,7 @@ export class MapScene extends Scene {
...
@@ -78,6 +78,7 @@ export class MapScene extends Scene {
const
guide
=
this
.
addChild
(
new
Container
());
const
guide
=
this
.
addChild
(
new
Container
());
guide
.
y
=
-
layers
.
stageOffsetY
;
guide
.
y
=
-
layers
.
stageOffsetY
;
guide
.
y
=
-
layers
.
stageOffsetY
;
const
g
=
guide
.
addChild
(
new
Graphics
());
const
g
=
guide
.
addChild
(
new
Graphics
());
g
.
beginFill
(
0
,
0.6
);
g
.
beginFill
(
0
,
0.6
);
g
.
drawRect
(
0
,
0
,
750
,
1624
);
g
.
drawRect
(
0
,
0
,
750
,
1624
);
...
...
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