Skip to content

Interface: IRenderable

Renderable represents something that can be rendered. Contains information for rendering.

Hierarchy

Implemented by

Table of contents

Properties

Methods

Properties

camera

camera: IEntity

The camera to draw the renderable to.


drawMode

drawMode: DrawMode

The draw mode of the renderable, specifying how it will be rendered.


material

material: Material

The material of the object to render, containing render information about texture and shaders.


modelMatrix

modelMatrix: Matrix4D

The model matrix (position, scale, rotation) of the object to render.


objectInPool

objectInPool: boolean

objectInPool is used to mark if the instance of the object is currently pooled.

Inherited from: IPoolable.objectInPool


vertices

vertices: Polygon

The vertices of the object to render.


zOrder

zOrder: number

The Z-Order of the object, the order at which the object will appear infront or behind other objects. A higher Z-Order means in front, a lower Z-Order means behind.

Methods

Free

Free(): void

Free releases an object or it's constituent parts back into any available object pools.

Returns: void

Inherited from: IPoolable


Recycle

Recycle(...args: any): IPoolable

Recycle is used to reuse an existing object instance, using the arguments provided - similar to a constructor, but must be repeatable.

Parameters:

Name Type Description
...args any The arguments to use when recycling the object instance

Returns: IPoolable

Inherited from: IPoolable