Skip to content

RenderLinearGradient

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/alpenglow/blob/main/js/render-program/RenderLinearGradient.ts for the most up-to-date information.

Overview

RenderProgram for a classic linear gradient

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class RenderLinearGradient

import { RenderLinearGradient } from 'scenerystack/alpenglow';

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)

Type SerializedRenderLinearGradient

import type { SerializedRenderLinearGradient } from 'scenerystack/alpenglow';

Source Code

See the source for RenderLinearGradient.ts in the alpenglow repository.