Renderer · class
WindStreakRenderer
Explained in Hello world.
class WindStreakRendererimport { WindStreakRenderer } from '@driftengine/core';Constructor
new
constructor(gl: WebGL2RenderingContext, options?: WindStreakOptions)| Parameter | Type | Description |
|---|---|---|
gl | WebGL2RenderingContext | |
options? | WindStreakOptions |
Methods
strengthFor
strengthFor(speed: number): numberHow visible the wind is right now, 0 when there is nothing to show.
| Parameter | Type | Description |
|---|---|---|
speed | number |
draw
draw(gl: WebGL2RenderingContext, camera: FrameView, wind: WindField, timeSeconds: number, tint: Vec3, /** True when the camera is below the waterline. */ submerged?: boolean): booleanAnswers whether it drew, which the renderer counts on its frame budget.
| Parameter | Type | Description |
|---|---|---|
gl | WebGL2RenderingContext | |
camera | FrameView | |
wind | WindField | |
timeSeconds | number | |
tint | Vec3 | |
/** True when the camera is below the waterline. */ submerged?: boolean | |
dispose
dispose(gl: WebGL2RenderingContext): void| Parameter | Type | Description |
|---|---|---|
gl | WebGL2RenderingContext |