Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Sbx_pageturn
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
Sbx_pageturn
Commits
f5032c6a
Commit
f5032c6a
authored
Dec 04, 2020
by
asdf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
如果骨骼动画没有canvas,默认大小
parent
f1d798e0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
9 deletions
+18
-9
ItemIndicator.prefab.meta
play/assets/tmpGame/prefabs/ItemIndicator.prefab.meta
+1
-1
ItemPage.prefab.meta
play/assets/tmpGame/prefabs/ItemPage.prefab.meta
+1
-1
Scene.fire.meta
play/assets/tmpGame/scene/Scene.fire.meta
+1
-1
ItemPage.js
play/assets/tmpGame/script/ItemPage.js
+14
-5
project.json
play/project.json
+1
-1
No files found.
play/assets/tmpGame/prefabs/ItemIndicator.prefab.meta
View file @
f5032c6a
{
{
"ver": "1.2.
7
",
"ver": "1.2.
9
",
"uuid": "196ced84-f877-4734-bed7-931dcdf479fc",
"uuid": "196ced84-f877-4734-bed7-931dcdf479fc",
"optimizationPolicy": "AUTO",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"asyncLoadAssets": false,
...
...
play/assets/tmpGame/prefabs/ItemPage.prefab.meta
View file @
f5032c6a
{
{
"ver": "1.2.
7
",
"ver": "1.2.
9
",
"uuid": "d49720e9-3f1f-42ec-9b9b-dc90d989fee4",
"uuid": "d49720e9-3f1f-42ec-9b9b-dc90d989fee4",
"optimizationPolicy": "AUTO",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"asyncLoadAssets": false,
...
...
play/assets/tmpGame/scene/Scene.fire.meta
View file @
f5032c6a
{
{
"ver": "1.2.
7
",
"ver": "1.2.
9
",
"uuid": "57ea7c61-9b8b-498a-b024-c98ee9124beb",
"uuid": "57ea7c61-9b8b-498a-b024-c98ee9124beb",
"asyncLoadAssets": false,
"asyncLoadAssets": false,
"autoReleaseAssets": true,
"autoReleaseAssets": true,
...
...
play/assets/tmpGame/script/ItemPage.js
View file @
f5032c6a
...
@@ -75,9 +75,9 @@ cc.Class({
...
@@ -75,9 +75,9 @@ cc.Class({
// skeUrl = 'http://127.0.0.1/walkingfish_ske.json';
// skeUrl = 'http://127.0.0.1/walkingfish_ske.json';
// atlasUrl = 'http://127.0.0.1/walkingfish_tex.json';
// atlasUrl = 'http://127.0.0.1/walkingfish_tex.json';
// imageUrl = 'http://127.0.0.1/
B1U5L3_page1_ani
_tex.png';
// imageUrl = 'http://127.0.0.1/
1
_tex.png';
// skeUrl = 'http://127.0.0.1/
B1U5L3_page1_ani
_ske.json';
// skeUrl = 'http://127.0.0.1/
1
_ske.json';
// atlasUrl = 'http://127.0.0.1/
B1U5L3_page1_ani
_tex.json';
// atlasUrl = 'http://127.0.0.1/
1
_tex.json';
cc
.
assetManager
.
loadAny
([{
url
:
atlasUrl
,
ext
:
'
.txt
'
},
{
url
:
skeUrl
,
ext
:
'
.txt
'
}],
(
error
,
assets
)
=>
{
cc
.
assetManager
.
loadAny
([{
url
:
atlasUrl
,
ext
:
'
.txt
'
},
{
url
:
skeUrl
,
ext
:
'
.txt
'
}],
(
error
,
assets
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
...
@@ -105,7 +105,7 @@ cc.Class({
...
@@ -105,7 +105,7 @@ cc.Class({
}
}
this
.
dragonBone
.
armatureName
=
data
.
name
;
this
.
dragonBone
.
armatureName
=
data
.
name
;
this
.
animationName
=
data
.
animation
[
0
].
name
;
this
.
animationName
=
data
.
animation
[
0
].
name
;
this
.
dragonBone
.
animationName
=
this
.
animationName
;
this
.
setSpineScale
(
data
.
canvas
);
this
.
setSpineScale
(
data
.
canvas
);
}
}
});
});
...
@@ -132,6 +132,16 @@ cc.Class({
...
@@ -132,6 +132,16 @@ cc.Class({
}
}
},
},
setSpineScale
(
size
)
{
setSpineScale
(
size
)
{
let
mask
=
this
.
dragonBone
.
node
.
parent
;
if
(
!
size
)
{
mask
.
width
=
1000
;
mask
.
height
=
500
;
if
(
!
this
.
data
.
text
)
{
bgHeight
=
546
;
}
this
.
dragonBone
.
node
.
scale
=
1
;
return
;
}
let
bgWidth
=
1000
;
let
bgWidth
=
1000
;
let
bgHeight
=
500
;
let
bgHeight
=
500
;
if
(
!
this
.
data
.
text
)
{
if
(
!
this
.
data
.
text
)
{
...
@@ -147,7 +157,6 @@ cc.Class({
...
@@ -147,7 +157,6 @@ cc.Class({
}
}
}
}
let
mask
=
this
.
dragonBone
.
node
.
parent
;
mask
.
width
=
this
.
dragonBone
.
node
.
scale
*
size
.
width
;
mask
.
width
=
this
.
dragonBone
.
node
.
scale
*
size
.
width
;
mask
.
height
=
this
.
dragonBone
.
node
.
scale
*
size
.
height
;
mask
.
height
=
this
.
dragonBone
.
node
.
scale
*
size
.
height
;
},
},
...
...
play/project.json
View file @
f5032c6a
...
@@ -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.
0
"
,
"version"
:
"2.4.
3
"
,
"isNew"
:
false
"isNew"
:
false
}
}
\ No newline at end of file
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