API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classSceneNode

@codexo/exojs / core / stable

Transform-bearing leaf in the scene-graph hierarchy. Carries position, rotation, scale, skew, origin, and a 2-component Vector `anchor` used to derive `origin` from the local bounds. Implements Collidable so any node can participate directly in the SAT collision pipeline via its AABB or rotated/skewed quad. Transform state is dirty-flag-cached: position/rotation/scale/skew/origin mutations invalidate the local transform; either kind of mutation also invalidates the global transform (own + descendants) and the bounds rect for this node and every Container ancestor up the parent chain. The caches rebuild lazily on the next read. The fast-path `isAlignedBox` getter reports `true` when the rotation is a multiple of 90° and both skew components are zero; in that case the (cheaper) AABB-based collision test is used instead of the rotated/skewed quad SAT path. `_invalidate*` methods are exported as `public` for friend-class access from Container and InteractionManager; treat them as `@internal`. Subclasses: Container (carries children), RenderNode (carries draw payloads).

16
props
25
methods
0
events
Import
import { SceneNode } from '@codexo/exojs'

Transform-bearing leaf in the scene-graph hierarchy. Carries position, rotation, scale, skew, origin, and a 2-component Vector `anchor` used to derive `origin` from the local bounds. Implements Collidable so any node can participate directly in the SAT collision pipeline via its AABB or rotated/skewed quad.

Transform state is dirty-flag-cached: position/rotation/scale/skew/origin mutations invalidate the local transform; either kind of mutation also invalidates the global transform (own + descendants) and the bounds rect for this node and every Container ancestor up the parent chain. The caches rebuild lazily on the next read.

The fast-path `isAlignedBox` getter reports `true` when the rotation is a multiple of 90° and both skew components are zero; in that case the (cheaper) AABB-based collision test is used instead of the rotated/skewed quad SAT path.

`_invalidate*` methods are exported as `public` for friend-class access from Container and InteractionManager; treat them as `@internal`.

Subclasses: Container (carries children), RenderNode (carries draw payloads).

Constructors 1
new(): SceneNode
Methods 25
_invalidateBoundsCascade(): void
_invalidateChildrenTransform(): void
_invalidateSubtreeTransform(): void
collidesWith(target: Collidable): CollisionResponse | null
contains(x: number, y: number): boolean
destroy(): void
getBounds(): Rectangle
getGlobalTransform(): Matrix
getLocalBounds(): Rectangle
getNormals(): Vector[]
getTransform(): Matrix
intersectsWith(target: Collidable): boolean
inView(view: View): boolean
move(x: number, y: number): this
project(axis: Vector, result: Interval): Interval
rotate(degrees: number): this
setAnchor(x: number, y: number): this
setOrigin(x: number, y: number): this
setPosition(x: number, y: number): this
setRotation(degrees: number): this
setScale(x: number, y: number): this
setSkew(x: number, y: number): this
updateBounds(): this
updateParentTransform(): this
updateTransform(): this
Properties 16
collisionType: CollisionType
flags: Flags<SceneNodeTransformFlags>
anchor: ObservableVector
cullable: boolean
isAlignedBox: boolean
origin: ObservableVector
parent: Container | null
position: ObservableVector
rotation: number
scale: ObservableVector
skewX: number
skewY: number
visible: boolean
x: number
y: number
zIndex: number
Source