summaryrefslogtreecommitdiff
path: root/doc/graphics/animation.texi
blob: c8722630f4d8419088629c2c4888061c8fbb0284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@node Animations
@section Animations

Animations are sequences of textures and/or texture regions. Common
uses for animations are to give the illusion that a character is
walking across the screen or swinging their sword at a
monster. Animator objects are used to control the playback of an
animation.

@anchor{2d animation animation-frame-duration}@defspec animation-frame-duration
@end defspec

@anchor{2d animation animation-frames}@defspec animation-frames
@end defspec

@anchor{2d animation animation-loop?}@defspec animation-loop?
@end defspec

@anchor{2d animation animation?}@defspec animation?
@end defspec

@anchor{2d animation animator-animation}@defspec animator-animation
@end defspec

@anchor{2d animation animator-frame}@defspec animator-frame
@end defspec

@anchor{2d animation animator-playing?}@defspec animator-playing?
@end defspec

@anchor{2d animation animator-time}@defspec animator-time
@end defspec

@anchor{2d animation animator?}@defspec animator?
@end defspec

@anchor{2d animation make-animation}@defspec make-animation
@end defspec

@anchor{2d animation animation-duration}@defun animation-duration animation
Return the total duration of ANIMATION in ticks.

@end defun

@anchor{2d animation animation-frame}@defun animation-frame animation index
Return the texture for the given frame INDEX of ANIMATION.

@end defun

@anchor{2d animation animation-length}@defun animation-length animation
Return the number of frames in ANIMATION.

@end defun

@anchor{2d animation animator-frame-complete?}@defun animator-frame-complete? animator
Return #t when ANIMATOR is done displaying the current frame.

@end defun

@anchor{2d animation animator-next!}@defun animator-next! animator
Advance ANIMATOR to the next frame of its animation.

@end defun

@anchor{2d animation animator-next-frame}@defun animator-next-frame animator
Return the next frame index for ANIMATOR.

@end defun

@anchor{2d animation animator-texture}@defun animator-texture animator
Return a texture for the ANIMATOR's current frame.

@end defun

@anchor{2d animation animator-update!}@defun animator-update! animator
Increment the frame time for the ANIMATOR and advance to the next frame
when necessary.

@end defun

@anchor{2d animation make-animator}@defun make-animator animation
Create a new animator for ANIMATION.

@end defun