Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
elephant
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
elephant
Commits
03302d64
Commit
03302d64
authored
Feb 01, 2024
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: remove resources folder & add internal cache defualt skin
parent
e0d4c2c3
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
45 additions
and
100 deletions
+45
-100
elephant.fire
assets/elephant/scene/elephant.fire
+13
-13
dress.ts
assets/elephant/scene/model/dress.ts
+2
-1
pengpeng.ts
assets/elephant/scene/pengpeng.ts
+27
-2
pg.ts
assets/elephant/scene/pg.ts
+3
-0
walking.meta
assets/elephant/textures/ani/walking.meta
+0
-12
walkinghappyhungry_ske.json
...elephant/textures/ani/walking/walkinghappyhungry_ske.json
+0
-1
walkinghappyhungry_ske.json.meta
...ant/textures/ani/walking/walkinghappyhungry_ske.json.meta
+0
-5
walkinghappyhungry_tex.json
...elephant/textures/ani/walking/walkinghappyhungry_tex.json
+0
-1
walkinghappyhungry_tex.json.meta
...ant/textures/ani/walking/walkinghappyhungry_tex.json.meta
+0
-5
walkinghappyhungry_tex.png
.../elephant/textures/ani/walking/walkinghappyhungry_tex.png
+0
-0
walkinghappyhungry_tex.png.meta
...hant/textures/ani/walking/walkinghappyhungry_tex.png.meta
+0
-36
resources.meta
assets/resources.meta
+0
-12
ani.meta
assets/resources/ani.meta
+0
-12
cover.png
assets/resources/ani/cover.png
+0
-0
No files found.
assets/elephant/scene/elephant.fire
View file @
03302d64
...
@@ -5258,8 +5258,8 @@
...
@@ -5258,8 +5258,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 2
05.09342442776494
,
"width": 2
15.85135193443722
,
"height": 26
6.74446621207915
"height": 26
3.94264333685396
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -5314,7 +5314,7 @@
...
@@ -5314,7 +5314,7 @@
"_cacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"playTimes": -1,
"premultipliedAlpha": false,
"premultipliedAlpha": false,
"_armatureKey": "
c828615a-66e9-475e-826f-f33f33b03a5a#9371c0db-e023-4aa7-a7b5-b5380814dd70
",
"_armatureKey": "
7a783421-6db0-47e9-a39a-c825dd0e27a4#e9ae3350-11dc-4713-b44a-339c5b1a133f
",
"_accTime": 0,
"_accTime": 0,
"_playCount": 0,
"_playCount": 0,
"_frameCache": null,
"_frameCache": null,
...
@@ -5322,10 +5322,10 @@
...
@@ -5322,10 +5322,10 @@
"_playing": false,
"_playing": false,
"_armatureCache": null,
"_armatureCache": null,
"_N$dragonAsset": {
"_N$dragonAsset": {
"__uuid__": "
c828615a-66e9-475e-826f-f33f33b03a5a
"
"__uuid__": "
7a783421-6db0-47e9-a39a-c825dd0e27a4
"
},
},
"_N$dragonAtlasAsset": {
"_N$dragonAtlasAsset": {
"__uuid__": "
9371c0db-e023-4aa7-a7b5-b5380814dd70
"
"__uuid__": "
e9ae3350-11dc-4713-b44a-339c5b1a133f
"
},
},
"_N$_defaultArmatureIndex": 0,
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 0,
"_N$_animationIndex": 0,
...
@@ -6617,8 +6617,8 @@
...
@@ -6617,8 +6617,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 25
7
,
"width": 25
6.9999999999999
,
"height": 279.2
2
"height": 279.2
174053943725
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -6673,7 +6673,7 @@
...
@@ -6673,7 +6673,7 @@
"_cacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"playTimes": -1,
"premultipliedAlpha": false,
"premultipliedAlpha": false,
"_armatureKey": "
8eda94aa-90d7-46e3-87d6-e212239eec32#583e299e-0f9e-4d27-b52c-2813ccf8dd2a
",
"_armatureKey": "
9a5342eb-8478-44cc-b46b-ab2d3f3585a6#05742965-e900-4381-860f-85c03525f83c
",
"_accTime": 0,
"_accTime": 0,
"_playCount": 0,
"_playCount": 0,
"_frameCache": null,
"_frameCache": null,
...
@@ -6681,10 +6681,10 @@
...
@@ -6681,10 +6681,10 @@
"_playing": false,
"_playing": false,
"_armatureCache": null,
"_armatureCache": null,
"_N$dragonAsset": {
"_N$dragonAsset": {
"__uuid__": "
8eda94aa-90d7-46e3-87d6-e212239eec32
"
"__uuid__": "
9a5342eb-8478-44cc-b46b-ab2d3f3585a6
"
},
},
"_N$dragonAtlasAsset": {
"_N$dragonAtlasAsset": {
"__uuid__": "
583e299e-0f9e-4d27-b52c-2813ccf8dd2a
"
"__uuid__": "
05742965-e900-4381-860f-85c03525f83c
"
},
},
"_N$_defaultArmatureIndex": 0,
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 0,
"_N$_animationIndex": 0,
...
@@ -7629,7 +7629,7 @@
...
@@ -7629,7 +7629,7 @@
"_cacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"playTimes": -1,
"premultipliedAlpha": false,
"premultipliedAlpha": false,
"_armatureKey": "
d1e0fd95-3f00-476d-9ce6-2595fe1d03ee#7bb1fdec-6bf4-4d94-b596-5a98f4d68121
",
"_armatureKey": "
7a783421-6db0-47e9-a39a-c825dd0e27a4#e9ae3350-11dc-4713-b44a-339c5b1a133f
",
"_accTime": 0,
"_accTime": 0,
"_playCount": 0,
"_playCount": 0,
"_frameCache": null,
"_frameCache": null,
...
@@ -7637,10 +7637,10 @@
...
@@ -7637,10 +7637,10 @@
"_playing": false,
"_playing": false,
"_armatureCache": null,
"_armatureCache": null,
"_N$dragonAsset": {
"_N$dragonAsset": {
"__uuid__": "
d1e0fd95-3f00-476d-9ce6-2595fe1d03ee
"
"__uuid__": "
7a783421-6db0-47e9-a39a-c825dd0e27a4
"
},
},
"_N$dragonAtlasAsset": {
"_N$dragonAtlasAsset": {
"__uuid__": "
7bb1fdec-6bf4-4d94-b596-5a98f4d68121
"
"__uuid__": "
e9ae3350-11dc-4713-b44a-339c5b1a133f
"
},
},
"_N$_defaultArmatureIndex": 0,
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 0,
"_N$_animationIndex": 0,
...
...
assets/elephant/scene/model/dress.ts
View file @
03302d64
...
@@ -4,7 +4,7 @@ import shop from "./shop";
...
@@ -4,7 +4,7 @@ import shop from "./shop";
import
pg
from
"
../pg
"
;
import
pg
from
"
../pg
"
;
class
Dress
{
class
Dress
{
public
_list
:
Array
<
Item
>
public
_list
:
Array
<
Item
>
defaultSkin
=
{
public
defaultSkin
=
{
cover
:
"
ani/cover.png
"
,
cover
:
"
ani/cover.png
"
,
type
:
3
,
type
:
3
,
meta_value
:
{
meta_value
:
{
...
@@ -26,6 +26,7 @@ class Dress {
...
@@ -26,6 +26,7 @@ class Dress {
},
},
};
};
constructor
()
{
constructor
()
{
console
.
log
(
'
dress start
'
)
this
.
_list
=
[];
this
.
_list
=
[];
}
}
parse
(
list
:
any
)
{
parse
(
list
:
any
)
{
...
...
assets/elephant/scene/pengpeng.ts
View file @
03302d64
...
@@ -19,14 +19,39 @@ export default class PengPeng extends cc.Component {
...
@@ -19,14 +19,39 @@ export default class PengPeng extends cc.Component {
console
.
log
(
'
pengpeng start
'
)
console
.
log
(
'
pengpeng start
'
)
user
.
setDataReadyCallback
(
this
.
dataReady
);
user
.
setDataReadyCallback
(
this
.
dataReady
);
const
walkNode
=
pg
.
view
.
find
(
this
.
node
,
"
walk
"
)
const
walkNode
=
pg
.
view
.
find
(
this
.
node
,
"
walk
"
)
const
eat
Ani
=
pg
.
view
.
find
(
this
.
node
,
"
eat
"
);
const
eat
Node
=
pg
.
view
.
find
(
this
.
node
,
"
eat
"
);
window
.
walk
=
walkNode
window
.
walk
=
walkNode
window
.
eat
=
eat
Ani
window
.
eat
=
eat
Node
window
.
pp
=
this
;
window
.
pp
=
this
;
pg
.
view
.
touchOn
(
walkNode
,
this
.
onTouchElephent
,
this
);
pg
.
view
.
touchOn
(
walkNode
,
this
.
onTouchElephent
,
this
);
const
btnClose
=
pg
.
view
.
find
(
this
.
node
,
"
panel_info/btn_close
"
);
const
btnClose
=
pg
.
view
.
find
(
this
.
node
,
"
panel_info/btn_close
"
);
pg
.
view
.
touchOn
(
btnClose
,
this
.
onTouchPanel
,
this
);
pg
.
view
.
touchOn
(
btnClose
,
this
.
onTouchPanel
,
this
);
// cache
const
walkDragonDisplay
=
walkNode
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
const
eatDragonDisplay
=
eatNode
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
const
walkAtlasAsset
=
walkDragonDisplay
.
dragonAtlasAsset
;
const
walkAsset
=
walkDragonDisplay
.
dragonAsset
;
const
walkArmatureName
=
walkDragonDisplay
.
armatureName
;
const
eatAtlasAsset
=
eatDragonDisplay
.
dragonAtlasAsset
;
const
eatAsset
=
eatDragonDisplay
.
dragonAsset
;
const
eatArmatureName
=
eatDragonDisplay
.
armatureName
;
dress
.
defaultSkin
.
meta_value
.
walk
.
tex_png
=
null
;
dress
.
defaultSkin
.
meta_value
.
walk
.
ske_json
=
walkAsset
dress
.
defaultSkin
.
meta_value
.
walk
.
tex_json
=
walkAtlasAsset
dress
.
defaultSkin
.
meta_value
.
eat
.
armature
=
walkArmatureName
dress
.
defaultSkin
.
meta_value
.
eat
.
tex_png
=
null
;
dress
.
defaultSkin
.
meta_value
.
eat
.
ske_json
=
eatAsset
dress
.
defaultSkin
.
meta_value
.
eat
.
tex_json
=
eatAtlasAsset
dress
.
defaultSkin
.
meta_value
.
eat
.
armature
=
eatArmatureName
}
}
dataReady
=
()
=>
{
dataReady
=
()
=>
{
console
.
log
(
'
pengpeng dataReady
'
);
console
.
log
(
'
pengpeng dataReady
'
);
...
...
assets/elephant/scene/pg.ts
View file @
03302d64
...
@@ -343,6 +343,9 @@ let pg = {
...
@@ -343,6 +343,9 @@ let pg = {
// if (err && !texture) return resolve(pg.logger.w('loading loadNetImg warn-> ' + texture));
// if (err && !texture) return resolve(pg.logger.w('loading loadNetImg warn-> ' + texture));
// resolve(texture);
// resolve(texture);
// });
// });
if
(
typeof
url
!==
'
string
'
)
{
resolve
(
url
);
}
if
(
!
option
||
Object
.
keys
(
option
).
length
==
0
)
option
=
{
type
:
cc
.
Texture2D
};
if
(
!
option
||
Object
.
keys
(
option
).
length
==
0
)
option
=
{
type
:
cc
.
Texture2D
};
if
(
url
.
startsWith
(
'
http
'
))
{
if
(
url
.
startsWith
(
'
http
'
))
{
cc
.
assetManager
.
loadRemote
(
url
,
option
,
(
err
,
texture
)
=>
{
cc
.
assetManager
.
loadRemote
(
url
,
option
,
(
err
,
texture
)
=>
{
...
...
assets/elephant/textures/ani/walking.meta
deleted
100644 → 0
View file @
e0d4c2c3
{
"ver": "1.1.2",
"uuid": "72675adc-2e9b-411f-8775-d354528aec07",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
assets/elephant/textures/ani/walking/walkinghappyhungry_ske.json
deleted
100644 → 0
View file @
e0d4c2c3
This diff is collapsed.
Click to expand it.
assets/elephant/textures/ani/walking/walkinghappyhungry_ske.json.meta
deleted
100644 → 0
View file @
e0d4c2c3
{
"ver": "1.0.1",
"uuid": "c828615a-66e9-475e-826f-f33f33b03a5a",
"subMetas": {}
}
\ No newline at end of file
assets/elephant/textures/ani/walking/walkinghappyhungry_tex.json
deleted
100644 → 0
View file @
e0d4c2c3
{
"name"
:
"walkinghappyhungry"
,
"imagePath"
:
"walkinghappyhungry_tex.png"
,
"SubTexture"
:[{
"name"
:
"走路/阴影"
,
"x"
:
1
,
"height"
:
37
,
"y"
:
426
,
"width"
:
143
},{
"name"
:
"走路/右腿"
,
"x"
:
170
,
"height"
:
77
,
"y"
:
257
,
"width"
:
62
},{
"name"
:
"走路/左腿"
,
"x"
:
98
,
"height"
:
68
,
"y"
:
257
,
"width"
:
62
},{
"name"
:
"走路/右手"
,
"x"
:
170
,
"height"
:
70
,
"y"
:
336
,
"width"
:
60
},{
"name"
:
"走路/衣服"
,
"x"
:
1
,
"height"
:
100
,
"y"
:
257
,
"width"
:
95
},{
"name"
:
"走路/衣服2"
,
"x"
:
1
,
"height"
:
145
,
"y"
:
1
,
"width"
:
178
},{
"name"
:
"走路/左手"
,
"x"
:
181
,
"height"
:
83
,
"y"
:
1
,
"width"
:
64
},{
"name"
:
"走路/围巾"
,
"x"
:
146
,
"height"
:
60
,
"y"
:
426
,
"width"
:
80
},{
"name"
:
"走路/围巾2"
,
"x"
:
91
,
"height"
:
65
,
"frameY"
:
0
,
"y"
:
359
,
"frameHeight"
:
65
,
"frameX"
:
0
,
"frameWidth"
:
78
,
"width"
:
77
},{
"name"
:
"走路/右耳"
,
"x"
:
1
,
"height"
:
65
,
"y"
:
359
,
"width"
:
88
},{
"name"
:
"走路/脸"
,
"x"
:
1
,
"height"
:
107
,
"y"
:
148
,
"width"
:
188
},{
"name"
:
"走路/嘴巴"
,
"x"
:
170
,
"height"
:
10
,
"y"
:
408
,
"width"
:
23
},{
"name"
:
"走路/眼珠"
,
"x"
:
181
,
"height"
:
21
,
"y"
:
120
,
"width"
:
50
},{
"name"
:
"走路/眼皮"
,
"x"
:
181
,
"height"
:
32
,
"y"
:
86
,
"width"
:
59
},{
"name"
:
"走路/饿"
,
"x"
:
1
,
"height"
:
35
,
"y"
:
465
,
"width"
:
38
}],
"height"
:
512
,
"width"
:
256
}
\ No newline at end of file
assets/elephant/textures/ani/walking/walkinghappyhungry_tex.json.meta
deleted
100644 → 0
View file @
e0d4c2c3
{
"ver": "1.0.1",
"uuid": "9371c0db-e023-4aa7-a7b5-b5380814dd70",
"subMetas": {}
}
\ No newline at end of file
assets/elephant/textures/ani/walking/walkinghappyhungry_tex.png
deleted
100644 → 0
View file @
e0d4c2c3
61.2 KB
assets/elephant/textures/ani/walking/walkinghappyhungry_tex.png.meta
deleted
100644 → 0
View file @
e0d4c2c3
{
"ver": "2.3.5",
"uuid": "086c9207-9d3e-48a6-aaa3-32035a263f0d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 256,
"height": 512,
"platformSettings": {},
"subMetas": {
"walkinghappyhungry_tex": {
"ver": "1.0.4",
"uuid": "7066fe4b-0d69-4fb0-8b9a-f9137001e791",
"rawTextureUuid": "086c9207-9d3e-48a6-aaa3-32035a263f0d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -5,
"offsetY": 5.5,
"trimX": 1,
"trimY": 1,
"width": 244,
"height": 499,
"rawWidth": 256,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/resources.meta
deleted
100644 → 0
View file @
e0d4c2c3
{
"ver": "1.1.2",
"uuid": "68fdd5c0-48a6-4db5-b219-780457e9fe9b",
"isBundle": true,
"bundleName": "resources",
"priority": 8,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
assets/resources/ani.meta
deleted
100644 → 0
View file @
e0d4c2c3
{
"ver": "1.1.2",
"uuid": "119f21e9-7ecf-4223-825a-31179b364f28",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
assets/resources/ani/cover.png
deleted
100644 → 0
View file @
e0d4c2c3
8.5 KB
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