forked from alvani/Unity-glTF-Exporter
-
Notifications
You must be signed in to change notification settings - Fork 14
/
GlTF_AnimSampler.cs
22 lines (20 loc) · 697 Bytes
/
GlTF_AnimSampler.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#if UNITY_EDITOR
using UnityEngine;
using System.Collections;
public class GlTF_AnimSampler : GlTF_Writer {
public int input = -1; // accessor index
public string interpolation = "LINEAR"; // Can also be STEP in glTF 2.0
public int output = -1; // accessor index
public GlTF_AnimSampler(int i, int o) { input = i; output = o; }
public override void Write()
{
Indent(); jsonWriter.Write ("{\n");
IndentIn();
Indent(); jsonWriter.Write ("\"input\": " + input + ",\n");
Indent(); jsonWriter.Write ("\"interpolation\": \"" + interpolation + "\",\n");
Indent(); jsonWriter.Write ("\"output\": " + output + "\n");
IndentOut();
Indent(); jsonWriter.Write ("}");
}
}
#endif