API reference

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

C

classPhasedSceneTransition

@codexo/exojs / core / stable

Single-class `enter()`/`exit()` authoring layer over the full SceneTransition contract - covers the common case (fade, slide, wipe, a custom flash) with no need to hand-manage timing, easing, or session lifecycle. Subclasses implement PhasedSceneTransition.getPhaseRequirements and override PhasedSceneTransition.enter/PhasedSceneTransition.exit - `createSession()` is implemented once, here, and never needs overriding for this common case.

3
props
10
methods
0
events
Import
import { PhasedSceneTransition } from '@codexo/exojs'

Single-class `enter()`/`exit()` authoring layer over the full SceneTransition contract - covers the common case (fade, slide, wipe, a custom flash) with no need to hand-manage timing, easing, or session lifecycle. Subclasses implement PhasedSceneTransition.getPhaseRequirements and override PhasedSceneTransition.enter/PhasedSceneTransition.exit - `createSession()` is implemented once, here, and never needs overriding for this common case.

Constructors1
Public - an abstract class with a protected constructor is still not directly instantiable (that's what abstract already does), but a *protected* constructor is inherited: a concrete subclass that declares no constructor of its own (the common case - e.g. a FlashTransition with only enter()/exit()) would inherit it and become uninstantiable from outside the module. Public keeps every minimal subclass usable with zero boilerplate.
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(): PhaseState
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: PhaseState): 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.
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.
Properties3
placement: "scene" | "screen"
Source