Atlas Engine
API Referencehydra

Fluid

Renderable water surface with configurable extent, color, wave motion, and textures.

Module: hydra

Renderable water surface with configurable extent, color, wave motion, and textures.

Declaration

export class Fluid extends GameObject { ... }

Extends: GameObject

Constructors

constructor();

Properties

waveVelocity

waveVelocity: number;

normalTexture

normalTexture: Texture;

movementTexture

movementTexture: Texture;

Methods

create

create(extent: Size2d, color: Color): void;

move

Translates by the supplied offset.

override move(position: Position3d): void;

setPosition

Sets the position to an absolute value.

override setPosition(position: Position3d): void;

setRotation

Replaces the rotation.

override setRotation(rotation: Rotation3d): void;

rotate

Applies an incremental rotation.

override rotate(rotation: Rotation3d): void;

setScale

Replaces the scale factors.

override setScale(scale: Scale3d): void;

setExtent

setExtent(extent: Size2d): void;

setWaveVelocity

setWaveVelocity(velocity: number): void;

setWaterColor

setWaterColor(color: Color): void;

getPosition

getPosition(): Position3d;

getScale

getScale(): Scale3d;

On this page