@@ -17,7 +17,9 @@ Every sprite, shape, text, etc are entities displayable in the viewer. They impl
1717Circle circle = graphicEntityModule. createCircle()
1818 .setRadius(50 )
1919 .setLineWidth(0 )
20- .setFillColor(0x00FF00 );
20+ .setFillColor(0x00FF00 )
21+ .setX(70 )
22+ .setY(70 );
2123```
2224## Moving a circle
2325``` java
@@ -29,21 +31,34 @@ circle
2931### With a Curve
3032``` java
3133circle
32- .setX(player. getX(), Curve . LINEAR )
33- .setY(player. getY(), Curve . LINEAR );
34+ .setX(player. getX(), Curve . EASE_IN_AND_OUT )
35+ .setY(player. getY(), Curve . EASE_IN_AND_OUT );
3436```
37+ By default the ` Curve.LINEAR ` is used.
38+
39+ It should look like this :
40+ ![ Example] ( resources/circles.gif )
41+ The first circle is not animated,
42+ the second is animated with the default curve
43+ and the last one is animated with the custom curve.
44+
3545## Creating a group of sprites <a name =" creating-a-group-of-sprites " ></a >
3646``` java
3747Sprite planet1 = graphicEntityModule. createSprite()
38- .setImage(" planet" )
48+ .setImage(" planet0.png" )
49+ .setAnchorX(0.5 )
50+ .setAnchorY(0.5 )
3951 .setX(- 20 );
4052Sprite planet2 = graphicEntityModule. createSprite()
41- .setImage(" planet" )
42- .setX(30 );
53+ .setImage(" planet1.png" )
54+ .setAnchorX(0.5 )
55+ .setAnchorY(0.5 )
56+ .setX(30 )
4357 .setY(- 10 );
4458Sprite planet3 = graphicEntityModule. createSprite()
45- .setImage(" planet" )
46- .setY(20 );
59+ .setImage(" planet2.png" )
60+ .setAnchorX(0.5 )
61+ .setAnchorY(0.5 );
4762
4863// The planets are around the point (960,540).
4964Group system = graphicEntityModule. createGroup(planet1, planet2, planet3)
@@ -58,4 +73,6 @@ Group system = graphicEntityModule.createGroup(planet1, planet2, planet3)
5873 planet3. setRotation(planet3. getRotation() + Math . PI / 16 );
5974
6075 system. setRotation(system. getRotation() + Math . PI / 2 );
61- ```
76+ ```
77+ It should look like this :
78+ ![ Example] ( resources/planets.gif )
0 commit comments