RenderStack¶
Overview¶
RenderProgram for repeated compositing of multiple RenderPrograms in a row with normal blending and source-over Porter-Duff composition.
RenderStack will apply normal compositing/blending to a list of RenderPrograms, where each RenderProgram in the list is drawn "on top" of all of the previous ones.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RenderStack¶
Constructor¶
new RenderStack( children : RenderProgram[] )¶
Instance Methods¶
getName() : string¶
withChildren( children : RenderProgram[] ) : RenderStack¶
getSimplified( children : RenderProgram[] ) : RenderProgram | null¶
(protected)
evaluate( context : RenderEvaluationContext ) : Vector4¶
writeInstructions( instructions : RenderInstruction[] )¶
serialize() : SerializedRenderStack¶
Static Methods¶
combine( a : Vector4, b : Vector4 ) : Vector4¶
deserialize( obj : SerializedRenderStack ) : RenderStack¶
Class RenderInstructionOpaqueJump¶
Constructor¶
new RenderInstructionOpaqueJump( location : RenderInstructionLocation )¶
Instance Methods¶
toString() : string¶
equals( other : RenderInstruction, areLocationsEqual : ( a: RenderInstructionLocation, b: RenderInstructionLocation ) => boolean ) : boolean¶
execute( stack : RenderExecutionStack, context : RenderEvaluationContext, executor : RenderExecutor )¶
writeBinary( encoder : ByteEncoder, getOffset : ( location: RenderInstructionLocation ) => number )¶
getBinaryLength() : number¶
Static Methods¶
fromBinary( encoder : ByteEncoder, offset : number, getLocation : ( offset: number ) => RenderInstructionLocation ) : RenderInstructionOpaqueJump¶
Static Properties¶
SKIP_RENDER_COLOR_JUMPS¶
(readonly)
Class RenderInstructionStackBlend¶
Background on the top of the stack
Instance Methods¶
toString() : string¶
equals( other : RenderInstruction, areLocationsEqual : ( a: RenderInstructionLocation, b: RenderInstructionLocation ) => boolean ) : boolean¶
execute( stack : RenderExecutionStack, context : RenderEvaluationContext, executor : RenderExecutor )¶
writeBinary( encoder : ByteEncoder, getOffset : ( location: RenderInstructionLocation ) => number )¶
getBinaryLength() : number¶
Static Properties¶
INSTANCE : RenderInstructionStackBlend¶
(readonly)
Type SerializedRenderStack¶
- type: "RenderStack"
- children: SerializedRenderProgram[]
Source Code¶
See the source for RenderStack.ts in the alpenglow repository.