Table of Contents

Class BoneAnimation

Namespace
PlumJsonAnimator.Models
Assembly
PlumJsonAnimator.dll

Class BoneAnimation contains the bone's transformations during animation

public class BoneAnimation
Inheritance
BoneAnimation
Inherited Members

Constructors

BoneAnimation(GlobalState, Interpolation)

public BoneAnimation(GlobalState globalState, Interpolation interpolation)

Parameters

globalState GlobalState
interpolation Interpolation

Methods

AddRotateFrame(double, double)

Adds rotate keyframe to bone

public void AddRotateFrame(double time, double value)

Parameters

time double
value double

AddTranslateFrame(double, double, double)

Adds translate keyframe to bone

public void AddTranslateFrame(double time, double x, double y)

Parameters

time double
x double
y double

BoneStep(Bone, double)

Sets the bone to the desired state according current time

public void BoneStep(Bone b, double time)

Parameters

b Bone

Bone

time double

Current time

DeleteKeyFrame(double, TransformModesTypes)

Delete keyframe

public void DeleteKeyFrame(double time, TransformModesTypes keyFrameType)

Parameters

time double
keyFrameType TransformModesTypes

FindTime(double, TransformModesTypes, bool)

Finds time of the next or the previous keyframe

public double FindTime(double time, TransformModesTypes type, bool isNext)

Parameters

time double

Current time

type TransformModesTypes

Type of target keyframe

isNext bool

Search for the next or the previous keyframe

Returns

double

Double, time of the target keyframe

GenerateCode()

public string GenerateCode()

Returns

string

GenerateJSONData()

public BoneAnimationData GenerateJSONData()

Returns

BoneAnimationData

GetKeyFeamesMarks()

public Dictionary<double, Dictionary<KeyFrameTypes, bool>> GetKeyFeamesMarks()

Returns

Dictionary<double, Dictionary<KeyFrameTypes, bool>>

MaxTime()

Finds the longest time from all keyframe dictionary

public double MaxTime()

Returns

double