English
Class: SSPartFollower<T>
Defined in: src/PartTransform.ts:164
Drives external objects to follow animation parts — a weapon in a hand, an effect on a muzzle, a hitbox on a null part.
The host owns when to call update: it must run after the frame's world matrices are final, which is the only moment getPartTransform describes the frame about to be drawn.
Type Parameters
T
T
Constructors
Constructor
new SSPartFollower<
T>(source,host):SSPartFollower<T>
Defined in: src/PartTransform.ts:172
Parameters
source
host
Returns
SSPartFollower<T>
Accessors
size
Get Signature
get size():
number
Defined in: src/PartTransform.ts:178
How many targets are currently following a part.
Returns
number
Methods
attach()
attach(
part,target,options?):SSPartAttachment<T>
Defined in: src/PartTransform.ts:191
Make target follow part (a name or an index). Attaching a target that is already attached replaces the earlier attachment rather than stacking a second one. With position, rotation and scale all enabled the full affine is written, so a mirrored part is reproduced exactly. A part's own skew is a non-inheriting local-vertex deform kept out of the world matrix, so it never reaches the follower (matching SpriteStudio, where skew does not propagate to children).
Parameters
part
string | number
target
T
options?
SSPartFollowOptions = {}
Returns
detach()
detach(
target):void
Defined in: src/PartTransform.ts:211
Stop following for target, reversing the parenting and visibility we imposed.
Parameters
target
T
Returns
void
detachAll()
detachAll():
void
Defined in: src/PartTransform.ts:221
Detach every target — for teardown, so nothing is left hidden or reparented.
Returns
void
update()
update():
void
Defined in: src/PartTransform.ts:226
Drive every attachment to its part's transform on the current frame.
Returns
void