9.3
77 3D: Animating 3D objects
3D reference map · First 3D picture
Three-dimensional motion uses the ordinary immutable scene timeline. A spatial target is a path beginning with its owning view3d identifier, for example '(world cube). A camera target is the owning view identifier alone, for example 'world. Every request captures its endpoint from the clip-start state. Sampling at a time does not depend on having sampled an earlier frame.
(scene-play (scene-add (make-scene) world matrix) (rotate3d-by '(world cube) (axis-angle y-axis3 pi)) (camera3d-orbit-by 'world #:azimuth (/ pi 2)) #:duration 2)
procedure
path : spatial-path? position : vec3?
Moves one
spatial Visual to an absolute local translation.
procedure
path : spatial-path? delta : vec3?
Moves one
spatial Visual by a local translation from its clip-start value.
procedure
(rotate3d-to path rotation) → any/c
path : spatial-path? rotation : rotation3?
Sets
an absolute local orientation.
procedure
(rotate3d-by path rotation) → any/c
path : spatial-path? rotation : rotation3?
Applies
a local rotation after the clip-start orientation.
procedure
(scale3d-to path scale) → any/c
path : spatial-path? scale : vec3?
Sets a
nonzero componentwise local scale.
procedure
(scale3d-by path factor) → any/c
path : spatial-path? factor : vec3?
Multiplies
the clip-start componentwise local scale.
procedure
(transform3d-to path transform) → any/c
path : spatial-path? transform : transform3?
Sets translation, rotation, and scale together. A scale interpolation that
would pass through zero is rejected when the clip is compiled.