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. Collision and hit-testing take the cheaper AABB path when the node's *world* box is axis-aligned (its own and any inherited rotation compose to a multiple of 90° with no skew) and the oriented-quad SAT path otherwise. The public `isAlignedBox` getter reports that predicate for this node's own rotation only. `_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).

18
props
26
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.

Collision and hit-testing take the cheaper AABB path when the node's *world* box is axis-aligned (its own and any inherited rotation compose to a multiple of 90° with no skew) and the oriented-quad SAT path otherwise. The public `isAlignedBox` getter reports that predicate for this node's own rotation only.

`_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 26
_invalidateBoundsCascade(): void
_invalidateChildrenTransform(): void
_invalidateSubtreeTransform(): void
_updateOrigin(): 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 18
collisionType: CollisionType
flags: Flags<SceneNodeTransformFlags>
name: string | null
anchor: ObservableVector
cullable: boolean
cullArea: Rectangle | null
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