Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
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
abdullh.alsoleman
Front-End
Commits
f39dcbb4
Commit
f39dcbb4
authored
Jul 30, 2015
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes anchor points for particles in particle systems
parent
456e17d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
particle_system.dart
packages/flutter/example/game/lib/particle_system.dart
+9
-5
No files found.
packages/flutter/example/game/lib/particle_system.dart
View file @
f39dcbb4
...
...
@@ -300,6 +300,10 @@ class ParticleSystem extends Node {
_paint
.
setTransferMode
(
transferMode
);
for
(
_Particle
particle
in
_particles
)
{
// Rect
Rect
rect
=
texture
.
frame
;
rects
.
add
(
rect
);
// Transform
double
scos
;
double
ssin
;
...
...
@@ -314,13 +318,13 @@ class ParticleSystem extends Node {
scos
=
particle
.
size
;
ssin
=
0.0
;
}
RSTransform
transform
=
new
RSTransform
(
scos
,
ssin
,
particle
.
pos
[
0
],
particle
.
pos
[
1
]);
double
ax
=
rect
.
width
/
2
;
double
ay
=
rect
.
height
/
2
;
double
tx
=
particle
.
pos
[
0
]
+
-
scos
*
ax
+
ssin
*
ay
;
double
ty
=
particle
.
pos
[
1
]
+
-
ssin
*
ax
-
scos
*
ay
;
RSTransform
transform
=
new
RSTransform
(
scos
,
ssin
,
tx
,
ty
);
transforms
.
add
(
transform
);
// Rect
Rect
rect
=
texture
.
frame
;
rects
.
add
(
rect
);
// Color
if
(
particle
.
simpleColorSequence
!=
null
)
{
Color
particleColor
=
new
Color
.
fromARGB
(
...
...
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