Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
svge-egret
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
王剑峰
svge-egret
Commits
6324cf44
Commit
6324cf44
authored
May 25, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
f0ca8420
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
MovieClip.js
src/Egret/MovieClip.js
+24
-7
No files found.
src/Egret/MovieClip.js
View file @
6324cf44
...
@@ -550,8 +550,25 @@ function getAsset(source, compFunc, thisObject) {
...
@@ -550,8 +550,25 @@ function getAsset(source, compFunc, thisObject) {
}
}
function
deepCopyFrames
(
frames
,
tx
,
ty
,
scaleX
=
1
,
scaleY
=
1
)
{
function
deepCopyFrames
(
frames
,
x
,
y
,
scaleX
=
1
,
scaleY
=
1
,
rotation
=
0
,
anchorX
=
0
,
anchorY
=
0
)
{
var
cf
=
[];
var
cf
=
[];
rotation
*=
Math
.
PI
/
180
;
var
lt
=
{};
lt
.
a
=
Math
.
cos
(
rotation
)
*
scaleX
;
lt
.
b
=
Math
.
sin
(
rotation
)
*
scaleX
;
lt
.
c
=
-
Math
.
sin
(
rotation
)
*
scaleY
;
lt
.
d
=
Math
.
cos
(
rotation
)
*
scaleY
;
lt
.
tx
=
x
+
anchorX
-
((
anchorX
*
lt
.
a
)
+
(
anchorY
*
lt
.
c
));
lt
.
ty
=
y
+
anchorY
-
((
anchorX
*
lt
.
b
)
+
(
anchorY
*
lt
.
d
));
for
(
var
j
=
0
;
j
<
frames
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
frames
.
length
;
j
++
)
{
var
frame
=
frames
[
j
];
var
frame
=
frames
[
j
];
const
pt
=
frame
.
transform
;
const
pt
=
frame
.
transform
;
...
@@ -559,12 +576,12 @@ function deepCopyFrames(frames, tx, ty, scaleX = 1, scaleY = 1) {
...
@@ -559,12 +576,12 @@ function deepCopyFrames(frames, tx, ty, scaleX = 1, scaleY = 1) {
//透明度
//透明度
f
.
alpha
=
frame
.
alpha
;
f
.
alpha
=
frame
.
alpha
;
f
.
transform
=
{
f
.
transform
=
{
a
:
scaleX
*
pt
.
a
,
a
:
(
lt
.
a
*
pt
.
a
)
+
(
lt
.
b
*
pt
.
c
)
,
b
:
scaleX
*
pt
.
b
,
b
:
(
lt
.
a
*
pt
.
b
)
+
(
lt
.
b
*
pt
.
d
)
,
c
:
scaleY
*
pt
.
c
,
c
:
(
lt
.
c
*
pt
.
a
)
+
(
lt
.
d
*
pt
.
c
)
,
d
:
scaleY
*
pt
.
d
,
d
:
(
lt
.
c
*
pt
.
b
)
+
(
lt
.
d
*
pt
.
d
)
,
tx
:
(
tx
*
pt
.
a
)
+
(
ty
*
pt
.
c
)
+
pt
.
tx
,
tx
:
(
lt
.
tx
*
pt
.
a
)
+
(
lt
.
ty
*
pt
.
c
)
+
pt
.
tx
,
ty
:
(
tx
*
pt
.
b
)
+
(
ty
*
pt
.
d
)
+
pt
.
ty
,
ty
:
(
lt
.
tx
*
pt
.
b
)
+
(
lt
.
ty
*
pt
.
d
)
+
pt
.
ty
,
};
};
cf
.
push
(
f
)
cf
.
push
(
f
)
}
}
...
...
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