Skip to content

Commit d56fe82

Browse files
ckaiserdacap
authored andcommitted
Clarify Sprite "oneFrame" option
1 parent 582082e commit d56fe82

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/sprite.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ local sprite = Sprite(width, height)
77
local sprite = Sprite(width, height, colorMode)
88
local sprite = Sprite(spec)
99
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 }
1212
```
1313

1414
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.
2222
If `fromFile` is given, it indicates a file name (a string) and it's
2323
like opening a new document with [`app.open()`](app.md#appopen).
2424

25+
When loading from a file, setting `oneFrame` to true will load with only the first animation frame.
26+
2527
## Sprite.width
2628

2729
```lua

0 commit comments

Comments
 (0)