Puppet

A puppet

Constructors

this
this(TextureCache cache, Node root)

Constructs a new, empty puppet.

this
this(Node root)

Creates a new puppet from a node tree

Destructor

~this
~this()
Undocumented in source.

Members

Functions

addParameter
void addParameter(Parameter param)

Removes a parameter from this puppet

addTextureToSlot
uint addTextureToSlot(Texture texture)

Adds a texture to a new slot if it doesn't already exist within this puppet

deserialize
void deserialize(DataNode node, ModelState state)

Deserializes a Puppet from a payload DataNode.

draw
void draw(float delta)

Draws the puppet

find
T find(string name)

Finds Node by its name

find
T find(GUID guid)

Finds Node by its unique id

findParameter
Parameter findParameter(GUID guid)

Returns a parameter by GUID

findParameterIndex
ptrdiff_t findParameterIndex(string name)

Returns the index of a parameter by name

getCombinedBounds
vec4 getCombinedBounds()

Gets the combined bounds of the puppet

getIsNodeBound
bool getIsNodeBound(Node node)

Gets if a node is bound to ANY parameter.

getTextureSlotIndexFor
ptrdiff_t getTextureSlotIndexFor(Texture texture)

Gets the texture slot index for a texture

onDeserialize
void onDeserialize(DataNode object, ModelState state)

Deserializes a puppet

onFinalize
void onFinalize(ModelState state)
Undocumented in source. Be warned that the author may not have intended to support it.
onSerialize
void onSerialize(DataNode object)

Serializes a puppet into an existing object.

removeParameter
void removeParameter(Parameter param)

Removes a parameter from this puppet

rescanNodes
void rescanNodes()

Rescans the puppet's nodes

resetDrivers
void resetDrivers()

Reset drivers/physics nodes

serialize
void serialize(DataNode node)

Serializes a puppet.

setThumbnail
void setThumbnail(Texture texture)

Sets thumbnail of this puppet

toStream
bool toStream(Stream stream)

Loads a Puppet from a Stream.

update
void update(float delta)

Updates the nodes

Properties

animations
Animation[] animations [@property getter]

A read-only slice of animations attached to this puppet.

drawList
DrawList drawList [@property getter]

The active draw list for the puppet.

drivers
SimplePhysics[] drivers [@property getter]

A read-only slice of drivers

parameters
Parameter[] parameters [@property getter]

A read-only slice of animations attached to this puppet.

visuals
Visual[] visuals [@property getter]

A read-only slice of the root visuals being rendered.

Static functions

fromFile
Result!Puppet fromFile(string path, IOSink sink)

Loads a Puppet from a file.

fromStream
Result!Puppet fromStream(Stream stream, IOSink sink)

Loads a Puppet from a Stream.

Variables

enableDrivers
bool enableDrivers;

Whether drivers should run

extData
ubyte[][string] extData;

Extended vendor data

properties
PuppetProperties properties;

Properties for the puppet.

renderParameters
bool renderParameters;

Whether parameters should be rendered

root
Node root;

The root node of the puppet

textureCache
TextureCache textureCache;

INP Texture slots for this puppet

transform
Transform transform;

Puppet render transform

Meta