tida.puppet

Add-on module for loading 2D puppets and displaying them in the game. <INP Format information

Currently supported: - Loading .inp format including JSON data and textures. - Displays nodes of type Part (the rest are ignored) - Reading the transformation of the node, identifier, type, Mesh data, transparency. - Setting the 'part' texture. - Saving to an .inp file. - Sorting zoffset.

Not implemented: - Mask mod. - Path Deform. - JointBindingData.

There are some modifications that are not described in the reference: - It is not necessary to specify the index data.

For rendering, you need a context. The format is loaded in the following way:

Puppet puppet = new Puppet();
puppet.load("data.inp"); // or puppet.loadFromMem(...);

The function render.draw is used for displaying, since this is an IDrawable object:

render.draw(puppet, Vecf(32, 32));

Authors implementations for Tida: TodNaz Authors INP format: LunaTheFoxgirl

Members

Aliases

UUID
alias UUID = int
Undocumented in source.

Classes

Puppet
class Puppet
PuppetDrawable
class PuppetDrawable
Undocumented in source.
PuppetMask
class PuppetMask
PuppetNode
class PuppetNode
Undocumented in source.
PuppetPart
class PuppetPart

Texture display node

PuppetPathDeform
class PuppetPathDeform

Enums

MaskMode
enum MaskMode
Undocumented in source.
PuppetNodeType
enum PuppetNodeType

Node type

Functions

jsonToNode
PuppetNode jsonToNode(JSONValue json, Puppet puppet, PuppetNode parent)
Undocumented in source. Be warned that the author may not have intended to support it.
nodeByName
PuppetNode nodeByName(PuppetNode node, string name)

Find a node by name.

nodeByUUID
PuppetNode nodeByUUID(PuppetNode node, UUID uuid)

Find a node by identificator.

Structs

MeshData
struct MeshData

Geometry information.

PuppetJointBindingData
struct PuppetJointBindingData
PuppetMeta
struct PuppetMeta

Information about the puppet.

Transform
struct Transform

Transformation structure for the matrix.

Meta

License

MIT