Skip to content

RenderInstructionComputeGradientRatio

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/RenderInstructionComputeGradientRatio.ts for the most up-to-date information.

Overview

Computes the gradient ratio for a linear or radial gradient

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

Class RenderInstructionComputeGradientRatio

import { RenderInstructionComputeGradientRatio } from 'scenerystack/alpenglow';

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

Source Code

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