RenderLinearGradient¶
Overview¶
RenderProgram for a classic linear gradient
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RenderLinearGradient¶
Constructor¶
new RenderLinearGradient( transform : Matrix3, start : Vector2, end : Vector2, stops : RenderGradientStop[], extend : RenderExtend, accuracy : RenderLinearGradientAccuracy, logic? : RenderLinearGradientLogic )¶
Instance Methods¶
getName() : string¶
withChildren( children : RenderProgram[] ) : RenderLinearGradient¶
isSplittable() : boolean¶
transformed( transform : Matrix3 ) : RenderProgram¶
equalsTyped( other : this ) : boolean¶
(protected)
getSimplified( children : RenderProgram[] ) : RenderProgram | null¶
(protected)
evaluate( context : RenderEvaluationContext ) : Vector4¶
writeInstructions( instructions : RenderInstruction[] )¶
split( face : RenderableFace ) : RenderableFace[]¶
serialize() : SerializedRenderLinearGradient¶
Instance Properties¶
logic : RenderLinearGradientLogic¶
(readonly)
Static Methods¶
deserialize( obj : SerializedRenderLinearGradient ) : RenderLinearGradient¶
Class RenderInstructionComputeGradientRatio¶
Constructor¶
new RenderInstructionComputeGradientRatio( logic : RenderLinearGradientLogic | RenderRadialGradientLogic, stopLocations : RenderInstructionLocation[], blendLocation : 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 ) : RenderInstructionComputeGradientRatio¶
Static Properties¶
GRADIENT_BEFORE_RATIO_COUNT_BITS¶
(readonly)
Class RenderLinearGradientLogic¶
Constructor¶
new RenderLinearGradientLogic( inverseTransform : Matrix3, start : Vector2, gradDelta : Vector2, ratios : number[], extend : RenderExtend, accuracy : RenderLinearGradientAccuracy )¶
Instance Methods¶
equals( other : RenderLinearGradientLogic ) : boolean¶
computeLinearValue( context : RenderEvaluationContext ) : number¶
Static Methods¶
from( transform : Matrix3, start : Vector2, end : Vector2, ratios : number[], extend : RenderExtend, accuracy : RenderLinearGradientAccuracy ) : RenderLinearGradientLogic¶
Type SerializedRenderLinearGradient¶
- type: "RenderLinearGradient"
- transform: number[]
- start: number[]
- end: number[]
- stops: SerializedRenderGradientStop[]
- extend: RenderExtend
- accuracy: RenderLinearGradientAccuracy
Source Code¶
See the source for RenderLinearGradient.ts in the alpenglow repository.