API reference

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

C

classSlideSceneTransition

@codexo/exojs / core / stable

Directional slide transition - covers menu/inventory/page-style navigation. Three modes: - `'push'` (default): the outgoing scene exits toward `direction` while the incoming scene enters from the opposite edge. Phase-split at the commit boundary (not a full `SceneTransition`), so there is a brief single-frame gap at the exact commit instant where neither scene is on-screen. - `'reveal'`: only the outgoing scene animates, sliding away toward `direction` to reveal the (already-committed) incoming scene underneath. - `'cover'`: only the incoming scene animates, sliding in from the opposite edge over a frozen snapshot of the (already-gone) outgoing scene.

5
props
10
methods
0
events
Import
import { SlideSceneTransition } from '@codexo/exojs'

Directional slide transition - covers menu/inventory/page-style navigation. Three modes: - `'push'` (default): the outgoing scene exits toward `direction` while the incoming scene enters from the opposite edge. Phase-split at the commit boundary (not a full `SceneTransition`), so there is a brief single-frame gap at the exact commit instant where neither scene is on-screen. - `'reveal'`: only the outgoing scene animates, sliding away toward `direction` to reveal the (already-committed) incoming scene underneath. - `'cover'`: only the incoming scene animates, sliding in from the opposite edge over a frozen snapshot of the (already-gone) outgoing scene.

Constructors1
Methods10
Called by the Director - do not call directly. Dispatches to SceneTransition.createSession, which is protected so it does not clutter a beginner's view of a transition subclass while still being callable from Director code that does not share this class's hierarchy.
createPhaseState(): SlidePhaseState
Allocate this navigation's session-scoped mutable scratch state (reused Sprite/Matrix/Color/etc - anything enter()/exit() mutates per draw). Called once per session, never shared across navigations or with the definition instance itself, which must stay fully immutable so it can be reused (even concurrently) across arbitrarily many navigations. Default: no scratch state needed (void).
destroyPhaseState(_state: SlidePhaseState): void
Release whatever PhasedSceneTransition.createPhaseState allocated for one navigation. Called exactly once per session, on every exit path - normal completion, an abort before the commit, or the application being destroyed mid-transition. Override it whenever the phase state owns GPU-backed resources (a Geometry, a Material, a Graphics, a RenderTexture you created yourself); plain scratch objects need no override. Textures handed in through SceneTransitionFrame are borrowed and must not be released here.
Draw one frame of the enter phase. No-op by default - override for a visible enter effect.
Draw one frame of the exit phase. No-op by default - override for a visible exit effect.
Director entry point - mirrors SceneTransition.beginSession/ createSession(): the Director (and, for { enter, exit } composition, a sibling PhasedSceneTransition instance's own session driver) calls this directly on a phase instance it doesn't own the hierarchy of, which the protected PhasedSceneTransition.getPhaseRequirements authoring hook cannot support on its own. Authors implement getPhaseRequirements(); nothing else calls it directly.
runPhase(phase: "enter" | "exit", context: SceneTransitionPhaseContextPer-frame context handed to PhasedSceneTransition.enter/ PhasedSceneTransition.exit., state: SlidePhaseState): void
Session-driver entry point for rendering one frame of phase - mirrors PhasedSceneTransition.getRequirementsForPhase exactly: PhasedSceneTransitionSession (and, for { enter, exit } composition, a *different* PhasedSceneTransition instance's session) is not a subclass of this class and cannot call the protected PhasedSceneTransition.enter/PhasedSceneTransition.exit hooks directly. Authors override enter()/exit(); nothing else calls them directly.
Properties5
placement: "scene" | "screen"
Source