Skip to main content

Scene2D

class Scene2D extends GeneratorSceneView2Dimplements Inspectable

Constructors

constructor

Parameters

Overwrites GeneratorScene<View2D>.constructor

Properties

assetRoot

assetRoot: `${string}/`
Inherited from GeneratorScene.assetRoot

creationStack

creationStack?: string
Inherited from GeneratorScene.creationStack

experimentalFeatures

readonly experimentalFeatures: boolean
Inherited from GeneratorScene.experimentalFeatures

lifecycleEvents

Inherited from GeneratorScene.lifecycleEvents

logger

readonly logger: Logger
Inherited from GeneratorScene.logger

meta

readonly meta: ObjectMetaFieldseed: MetaFieldanynumbertimeEvents: MetaFieldSerializedTimeEvent[]SerializedTimeEvent[]version: MetaFieldanynumber
Inherited from GeneratorScene.meta

name

readonly name: string
Inherited from GeneratorScene.name

playback

Inherited from GeneratorScene.playback

previousOnTop

Inherited from GeneratorScene.previousOnTop

random

Inherited from GeneratorScene.random

shaders

readonly shaders: Shaders
Inherited from GeneratorScene.shaders

slides

readonly slides: Slides
Inherited from GeneratorScene.slides

timeEvents

readonly timeEvents: TimeEvents
Inherited from GeneratorScene.timeEvents

variables

Inherited from GeneratorScene.variables

Accessors

LifecycleEvents

public get LifecycleEvents(): LifecycleEvents
Inherited from GeneratorScene.LifecycleEvents

firstFrame

public get firstFrame(): number
Inherited from GeneratorScene.firstFrame

lastFrame

public get lastFrame(): number
Inherited from GeneratorScene.lastFrame

onCacheChanged

public get onCacheChanged(): SubscribableValueEventCachedSceneData
Inherited from GeneratorScene.onCacheChanged

onRecalculated

public get onRecalculated(): SubscribablevoidEventHandlervoid
Inherited from GeneratorScene.onRecalculated

onReloaded

public get onReloaded(): SubscribablevoidEventHandlervoid
Inherited from GeneratorScene.onReloaded

onRenderLifecycle

Inherited from GeneratorScene.onRenderLifecycle

onReset

public get onReset(): SubscribablevoidEventHandlervoid
Inherited from GeneratorScene.onReset

onThreadChanged

public get onThreadChanged(): SubscribableValueEventnullThread
Inherited from GeneratorScene.onThreadChanged

previous

public get previous(): nullSceneunknown
Inherited from GeneratorScene.previous

Methods

adjustVolume

public override adjustVolumevolumeScale: number: void

Parameters

Overwrites GeneratorScene.adjustVolume

canTransitionOut

public canTransitionOut(): boolean
Inherited from GeneratorScene.canTransitionOut

draw

Parameters

Overwrites GeneratorScene.draw

drawOverlay

public drawOverlayelement: unknownmatrix: DOMMatrixcontext: CanvasRenderingContext2D: void

Parameters


enterAfterTransitionIn

public enterAfterTransitionIn(): void
Inherited from GeneratorScene.enterAfterTransitionIn

enterCanTransitionOut

public enterCanTransitionOut(): void
Inherited from GeneratorScene.enterCanTransitionOut

enterInitial

public enterInitial(): void
Inherited from GeneratorScene.enterInitial

getDetachedNodes

public getDetachedNodes(): GeneratorNodevoidunknown

getMediaAssets

public override getMediaAssets(): AssetInfo[]
Overwrites GeneratorScene.getMediaAssets

getNode

public getNodekey: any: nullNode

Parameters


getNodeByPosition

public getNodeByPositionx: numbery: number: nullNode

Parameters

  • x: number
  • y: number

getRealSize

public getRealSize(): Vector2
Inherited from GeneratorScene.getRealSize

getSize

public getSize(): Vector2
Inherited from GeneratorScene.getSize

getView

public override getView(): View2D
Overwrites GeneratorScene.getView

inspectAttributes

public inspectAttributeselement: unknown: nullInspectedAttributes

Parameters


inspectPosition

public inspectPositionx: numbery: number: unknown

Parameters

  • x: number
  • y: number

isAfterTransitionIn

public isAfterTransitionIn(): boolean
Inherited from GeneratorScene.isAfterTransitionIn

isCached

public isCached(): boolean
Inherited from GeneratorScene.isCached

isFinished

public isFinished(): boolean
Inherited from GeneratorScene.isFinished

next

public override next(): Promisevoid
Overwrites GeneratorScene.next

recalculate

public recalculatesetFrame: frame: number => void: Promisevoid

Parameters

Inherited from GeneratorScene.recalculate

registerNode

public registerNodenode: Nodekey?: string: string() => void

Parameters


reload

Parameters

Inherited from GeneratorScene.reload

render

Parameters

Inherited from GeneratorScene.render

reset

public override resetpreviousScene?: Sceneunknown: Promisevoid

Parameters

Overwrites GeneratorScene.reset

stopAllMedia

public override stopAllMedia(): void
Overwrites GeneratorScene.stopAllMedia

transformMousePosition

public transformMousePositionx: numbery: number: nullVector2

Parameters

  • x: number
  • y: number

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 from GeneratorScene.update

validateInspection

public validateInspectionelement: unknown: unknown

Parameters