visualization-tools

Home > @visualization-tools/core > CanvasRendererSharedState

CanvasRendererSharedState class

Canvas state shared between draw calls. Some methods use the state stack, refer to documentation on individual methods for usage notes.

Signature:

export declare class CanvasRendererSharedState implements IRendererSharedState 

Implements: IRendererSharedState

Constructors

Constructor Modifiers Description
(constructor)(context)   Constructs a new instance of the CanvasRendererSharedState class

Properties

Property Modifiers Type Description
entityBuffers   IEntityBufferStore<TUnknownBufferLayout>  
frameCounter   number  
scissorRange   IReadonlyRange2d<TTypedArray> | null  

Methods

Method Modifiers Description
onContextLost()    
onNewFrame()    
setContext(context)    
updateScissorRange(scissorRange)   Where multiple ranges are provided the scissor range will be the intersection of these. Each of these must be popped of the stack individually.