Skip to content

Latest commit

 

History

History
92 lines (49 loc) · 2.33 KB

File metadata and controls

92 lines (49 loc) · 2.33 KB

@ericrabil/phea.js

Globals / "effect/Effect" / Effect

Class: Effect

Common structure for an effect

Hierarchy

Index

Properties

Methods

Properties

enabled

Abstract enabled: boolean

Defined in src/effect/Effect.ts:24

Whether the effect should be included in the render stack at this time


finished

Abstract finished: boolean

Defined in src/effect/Effect.ts:28

Whether the effect should be permanently removed from the render stack


now

Readonly now: number

Defined in src/effect/Effect.ts:11

Singleton reference to Date.now() – you don't/shouldn't update this, it is handled for you. All effects will have the same reference to Date.now() in any given frame.

Methods

getColor

AbstractgetColor(light: Light): EffectColor

Defined in src/effect/Effect.ts:16

Returns the next color for a given light

Parameters:

Name Type Description
light Light light to compute a color for

Returns: EffectColor


render

Abstractrender(): void | Promise<void>

Defined in src/effect/Effect.ts:20

Runs a render frame

Returns: void | Promise<void>