Static methods

staticinlinefromJSON(name:String):FoxSkinData

Constructor

new()

Variables

@:value(new FoxObject())finalroot:FoxObject = new FoxObject()

@:value([])bones:Array<FoxBone> = []

@:value(new FoxTextureBuffer(1, 4))boneData:FoxTextureBuffer = new FoxTextureBuffer(1, 4)

A texture buffer that stores bone transformations

@:value(new FoxTextureBuffer(1, 4))__prevBoneData:FoxTextureBuffer = new FoxTextureBuffer(1, 4)

The previous bone transformations texture buffer

assetsKey:String

private@:value(new Matrix3D())__tempMatrix:Matrix3D = new Matrix3D()

@:value(true)needsUpdate:Bool = true

Methods

@:value({ parentIndex : -1 })addBone(bone:FoxBone, parentIndex:Int = -1):Void

removeBone(bone:FoxBone):Void

removeBoneByIndex(index:Int):Void

getBoneByName(name:String):FoxBone

@:value({ parentIndex : -1 })reparentBone(boneIndex:Int, parentIndex:Int = -1):Void

reparentBoneByName(boneIndex:Int, parentName:String):Void

update(dt:Float):Void

copy():FoxSkinData

Copies this skin data (bones and transforms) to a new instance

Note that bonesData (the texture buffer) will be allocated on its own based on the current bones array in the next frame. If you need to, you can allocate it right away by calling update(0)

createRestAnimation():FoxAnimation

Creates tracks for each bone using their current transform and returns a FoxAnimation, this is the base pose for the whole armature.

This is needed for additive animation layering if the model hasn't been exported with one.

destroy():Void