Model

Represents a 3D model.

Constructors

this
this(Display display, string type)

Create a new model.

Members

Functions

animate
void animate(string type, Duration duration, uint times)

Run an animation.

animateInf
void animateInf(string type, Duration duration)

Run an animation indefinitely.

changeVariant
void changeVariant(string id, string variant)

Change the variant used for the node with given ID.

changeVariant
void changeVariant(string id)

Randomize the variant used for the node with given ID.

getBone
Pack.Resource!string getBone(SkeletonNode node)

Mixins

__anonymous
mixin Object3D.Implement

Position in the model is relative to the model's bottom, so if a cell is placed at the same position as the model, the model will be standing on the cell.

Properties

id
size_t id [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

make
Model make(Display display, string type)

Create a new model.

Variables

animations
Animation[] animations;

Active animations.

seed
ulong seed;

Seed to use for RNG calls related to generation of this model's resources.

type
string type;

Type of the model.

Mixed In Members

From mixin Object3D.Implement

position
const(Position) position()
visualPosition
const(Position) visualPosition()

Get the current position of the object.

positionRef
Position positionRef()

Get a reference to the position value.

position
Position position(Position value)

Set the new position.

Inherited Members

From Object3D

display
Display display;

Display this object is connected to.

position
const(Position) position()

Get the current position of the object.

visualPosition
const(Position) visualPosition()

Get the current visual position of the object.

Implement
mixintemplate Implement()

Add a basic implementation for the position as a property, includes a setter.

ImplementConst
mixintemplate ImplementConst()

Implement the position as a const property. _position and _visualPosition must be set in constructor.

From WithDrawableResources

draw
void draw()

Draw this resource, if supported by the renderer.

Meta