@motion-script/core / ProjectGlobals
Class: ProjectGlobals
Defined in: runtime/globals.ts:286
Everything a project declares outside its scenes: audio beds laid on the project timeline, and the node layers drawn under and over every scene.
One instance is shared by the Precomp pass and the
StateEvaluator, exactly as the Scene instances are — the same
sequential invariant keeps them from colliding, and sharing is what makes the
measured asset windows describe the nodes that actually draw.
Constructors
Constructor
new ProjectGlobals(
config,viewport):ProjectGlobals
Defined in: runtime/globals.ts:291
Parameters
config
viewport
Returns
ProjectGlobals
Properties
audioTracks
readonlyaudioTracks: readonlyAudioTrack[]
Defined in: runtime/globals.ts:289
backgrounds
readonlybackgrounds:LayerStack
Defined in: runtime/globals.ts:287
overlays
readonlyoverlays:LayerStack
Defined in: runtime/globals.ts:288
Accessors
hasLayers
Get Signature
get hasLayers():
boolean
Defined in: runtime/globals.ts:298
True when there is neither a background nor an overlay to draw.
Returns
boolean
Methods
bindAssets()
bindAssets(
catalog):void
Defined in: runtime/globals.ts:313
Parameters
catalog
Returns
void
bindContext()
bindContext(
context):void
Defined in: runtime/globals.ts:318
Parameters
context
Returns
void
dispose()
dispose():
void
Defined in: runtime/globals.ts:353
Returns
void
ellapse()
ellapse(
totalTime):void
Defined in: runtime/globals.ts:323
Parameters
totalTime
number
Returns
void
layout()
layout(
bounds,scope):void
Defined in: runtime/globals.ts:348
Parameters
bounds
scope
Returns
void
prepareAudioAssets()
prepareAudioAssets(
tracker):void
Defined in: runtime/globals.ts:343
Parameters
tracker
Returns
void
prepareLayoutAssets()
prepareLayoutAssets():
void
Defined in: runtime/globals.ts:333
Returns
void
prepareRenderAssets()
prepareRenderAssets():
void
Defined in: runtime/globals.ts:338
Returns
void
sample()
sample():
void
Defined in: runtime/globals.ts:328
Returns
void
select()
select(
sceneIndex,sceneName):void
Defined in: runtime/globals.ts:308
Narrow both stacks to the layers that apply to a scene (see LayerStack.select).
Parameters
sceneIndex
number
sceneName
string
Returns
void
setViewport()
setViewport(
viewport):void
Defined in: runtime/globals.ts:302
Parameters
viewport
Returns
void