Scene2D
class Scene2D extends GeneratorSceneView2Dimplements Inspectable
Constructors
constructor
public override new Scene2Ddescription: FullSceneDescriptionThreadGeneratorFactoryView2D: Scene2D
Parameters
OverwritesGeneratorScene<View2D>.constructor
Properties
assetRoot
assetRoot: `${string}/`
GeneratorScene.assetRoot
creationStack
creationStack?: string
GeneratorScene.creationStack
experimentalFeatures
readonly experimentalFeatures: boolean
GeneratorScene.experimentalFeatures
lifecycleEvents
readonly lifecycleEvents: LifecycleEvents
GeneratorScene.lifecycleEvents
logger
Inherited from GeneratorScene.logger
meta
readonly meta: ObjectMetaFieldseed: MetaFieldanynumbertimeEvents: MetaFieldSerializedTimeEvent[]SerializedTimeEvent[]version: MetaFieldanynumber
GeneratorScene.meta
name
readonly name: string
GeneratorScene.name
playback
readonly playback: PlaybackStatus
GeneratorScene.playback
previousOnTop
previousOnTop: SignalValueboolean
GeneratorScene.previousOnTop
random
Inherited from GeneratorScene.random
shaders
readonly shaders: Shaders
GeneratorScene.shaders
slides
Inherited from GeneratorScene.slides
timeEvents
readonly timeEvents: TimeEvents
GeneratorScene.timeEvents
variables
Inherited from GeneratorScene.variables
Accessors
LifecycleEvents
public get LifecycleEvents(): LifecycleEvents
GeneratorScene.LifecycleEvents
firstFrame
public get firstFrame(): number
GeneratorScene.firstFrame
lastFrame
public get lastFrame(): number
GeneratorScene.lastFrame
onCacheChanged
public get onCacheChanged(): SubscribableValueEventCachedSceneData
GeneratorScene.onCacheChanged
onRecalculated
public get onRecalculated(): SubscribablevoidEventHandlervoid
GeneratorScene.onRecalculated
onReloaded
public get onReloaded(): SubscribablevoidEventHandlervoid
GeneratorScene.onReloaded
onRenderLifecycle
public get onRenderLifecycle(): SubscribableSceneRenderEventCanvasRenderingContext2DEventHandlerSceneRenderEventCanvasRenderingContext2D
GeneratorScene.onRenderLifecycle
onReset
public get onReset(): SubscribablevoidEventHandlervoid
GeneratorScene.onReset
onThreadChanged
public get onThreadChanged(): SubscribableValueEventnullThread
GeneratorScene.onThreadChanged
previous
public get previous(): nullSceneunknown
GeneratorScene.previous
Methods
adjustVolume
public override adjustVolumevolumeScale: number: void
Parameters
volumeScale: number
GeneratorScene.adjustVolume
canTransitionOut
public canTransitionOut(): boolean
GeneratorScene.canTransitionOut
draw
public override drawcontext: CanvasRenderingContext2D: Promisevoid
Parameters
OverwritesGeneratorScene.draw
drawOverlay
public drawOverlayelement: unknownmatrix: DOMMatrixcontext: CanvasRenderingContext2D: void
Parameters
enterAfterTransitionIn
public enterAfterTransitionIn(): void
GeneratorScene.enterAfterTransitionIn
enterCanTransitionOut
public enterCanTransitionOut(): void
GeneratorScene.enterCanTransitionOut
enterInitial
public enterInitial(): void
GeneratorScene.enterInitial
getDetachedNodes
getMediaAssets
Overwrites GeneratorScene.getMediaAssets
getNode
Parameters
key: any
getNodeByPosition
Parameters
getRealSize
public getRealSize(): Vector2
GeneratorScene.getRealSize
getSize
public getSize(): Vector2
GeneratorScene.getSize
getView
Overwrites GeneratorScene.getView
inspectAttributes
public inspectAttributeselement: unknown: nullInspectedAttributes
Parameters
element: unknown
inspectPosition
Parameters
isAfterTransitionIn
public isAfterTransitionIn(): boolean
GeneratorScene.isAfterTransitionIn
isCached
public isCached(): boolean
GeneratorScene.isCached
isFinished
public isFinished(): boolean
GeneratorScene.isFinished
next
Overwrites GeneratorScene.next
recalculate
Parameters
Inherited fromGeneratorScene.recalculate
registerNode
Parameters
reload
public reload{...}?: SceneDescriptionReloadThreadGeneratorFactoryView2D: void
Parameters
Inherited fromGeneratorScene.reload
render
public rendercontext: CanvasRenderingContext2D: Promisevoid
Parameters
Inherited fromGeneratorScene.render
reset
public override resetpreviousScene?: Sceneunknown: Promisevoid
Parameters
previousScene?: Sceneunknown
GeneratorScene.reset
stopAllMedia
public override stopAllMedia(): void
GeneratorScene.stopAllMedia
transformMousePosition
Parameters
update
public update(): void
Update the view.
Invoked after each step of the main generator. Can be used for calculating layout.
Can modify the state of the view.
Inherited fromGeneratorScene.update
validateInspection
public validateInspectionelement: unknown: unknown
Parameters
element: unknown