Skip to content

Interface: SsPartTransform ​

Defined in: packages/react-native-spritestudio/src/specs/SsRuntime.nitro.ts:117

One part's placement this frame, in player-local units, Y-down.

Decomposed rather than handed over as a matrix because the callers are placement code — attaching a React view to a hand, spawning a projectile at a muzzle — and every one of them would otherwise decompose it identically.

determinant is here because a world matrix can be a reflection and the sign is the product of authored negative scale and the player's flip, so the two cancel: reading it off the flip settings gives the wrong answer, and scaleX/scaleY alone cannot tell a mirror from a rotation.

Properties ​

determinant ​

determinant: number

Defined in: packages/react-native-spritestudio/src/specs/SsRuntime.nitro.ts:127

Negative for a reflection. See above.


rotation ​

rotation: number

Defined in: packages/react-native-spritestudio/src/specs/SsRuntime.nitro.ts:123

Radians, taken from the matrix — so a parent's rotation is already in it.


scaleX ​

scaleX: number

Defined in: packages/react-native-spritestudio/src/specs/SsRuntime.nitro.ts:124


scaleY ​

scaleY: number

Defined in: packages/react-native-spritestudio/src/specs/SsRuntime.nitro.ts:125


valid ​

valid: boolean

Defined in: packages/react-native-spritestudio/src/specs/SsRuntime.nitro.ts:119

False when the index is out of range or the frame carries no matrix.


x ​

x: number

Defined in: packages/react-native-spritestudio/src/specs/SsRuntime.nitro.ts:120


y ​

y: number

Defined in: packages/react-native-spritestudio/src/specs/SsRuntime.nitro.ts:121