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

Creates a new fluid.

constructor();

Properties

waveVelocity

The wave velocity.

waveVelocity: number;

normalTexture

The normal texture.

normalTexture: Texture;

movementTexture

The movement texture.

movementTexture: Texture;

Methods

create

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

Sets extent.

setExtent(extent: Size2d): void;

setWaveVelocity

Sets wave velocity.

setWaveVelocity(velocity: number): void;

setWaterColor

Sets water color.

setWaterColor(color: Color): void;

getPosition

Returns the current position.

getPosition(): Position3d;

getScale

Returns scale.

getScale(): Scale3d;

On this page