File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ local sprite = Sprite(width, height)
7
7
local sprite = Sprite (width , height , colorMode )
8
8
local sprite = Sprite (spec )
9
9
local sprite = Sprite (otherSprite )
10
- local sprite = Sprite { fromFile = filename }
11
- local sprite = Sprite { fromFile = filename , oneFrame }
10
+ local sprite = Sprite { fromFile = string }
11
+ local sprite = Sprite { fromFile = string , oneFrame = boolean }
12
12
```
13
13
14
14
Creates a new sprite with the given ` width ` and ` height ` . The
@@ -22,6 +22,8 @@ If `otherSprite` is given (other `Sprite` object), the sprite is duplicated.
22
22
If ` fromFile ` is given, it indicates a file name (a string) and it's
23
23
like opening a new document with [ ` app.open() ` ] ( app.md#appopen ) .
24
24
25
+ When loading from a file, setting ` oneFrame ` to true will load with only the first animation frame.
26
+
25
27
## Sprite.width
26
28
27
29
``` lua
You can’t perform that action at this time.
0 commit comments