Skip to content

RenderInstructionComputeBlendRatio

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

Overview

Computes the blend ratio between two RenderPrograms based on a linear or radial blend.

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

Class RenderInstructionComputeBlendRatio

import { RenderInstructionComputeBlendRatio } from 'scenerystack/alpenglow';

Constructor

new RenderInstructionComputeBlendRatio( logic : RenderLinearBlendLogic | RenderRadialBlendLogic, zeroLocation : RenderInstructionLocation, oneLocation : 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 RenderInstructionComputeBlendRatio.ts in the alpenglow repository.