RenderRadialGradient¶
Overview¶
RenderProgram for a classic radial gradient.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RenderRadialGradient¶
Constructor¶
new RenderRadialGradient( transform : Matrix3, start : Vector2, startRadius : number, end : Vector2, endRadius : number, stops : RenderGradientStop[], extend : RenderExtend, accuracy : RenderRadialGradientAccuracy, logic? : RenderRadialGradientLogic )¶
Instance Methods¶
getName() : string¶
withChildren( children : RenderProgram[] ) : RenderRadialGradient¶
isSplittable() : boolean¶
transformed( transform : Matrix3 ) : RenderProgram¶
equalsTyped( other : this ) : boolean¶
(protected)
getSimplified( children : RenderProgram[] ) : RenderProgram | null¶
(protected)
getLogic() : RenderRadialGradientLogic¶
evaluate( context : RenderEvaluationContext ) : Vector4¶
writeInstructions( instructions : RenderInstruction[] )¶
split( face : RenderableFace ) : RenderableFace[]¶
serialize() : SerializedRenderRadialGradient¶
Static Methods¶
deserialize( obj : SerializedRenderRadialGradient ) : RenderRadialGradient¶
Class RenderRadialGradientLogic¶
Constructor¶
new RenderRadialGradientLogic( conicTransform : Matrix3, focalX : number, radius : number, kind : RadialGradientType, isSwapped : boolean, ratios : number[], extend : RenderExtend, accuracy : RenderRadialGradientAccuracy )¶
Instance Methods¶
equals( other : RenderRadialGradientLogic ) : boolean¶
computeLinearValue( context : RenderEvaluationContext ) : number¶
Static Methods¶
from( transform : Matrix3, start : Vector2, startRadius : number, end : Vector2, endRadius : number, ratios : number[], extend : RenderExtend, accuracy : RenderRadialGradientAccuracy ) : RenderRadialGradientLogic¶
Type SerializedRenderRadialGradient¶
- type: "RenderRadialGradient"
- transform: number[]
- start: number[]
- startRadius: number
- end: number[]
- endRadius: number
- stops: SerializedRenderGradientStop[]
- extend: RenderExtend
- accuracy: RenderRadialGradientAccuracy
Source Code¶
See the source for RenderRadialGradient.ts in the alpenglow repository.