forked from tparisi/Unity-glTF-Exporter
-
Notifications
You must be signed in to change notification settings - Fork 4
/
GlTF_AnimSampler.cs
21 lines (18 loc) · 709 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
using UnityEngine;
using System.Collections;
public class GlTF_AnimSampler : GlTF_Writer {
public string input = "TIME";
public string interpolation = "LINEAR"; // only things in glTF as of today
public string output = "translation"; // or whatever
public GlTF_AnimSampler (string n, string o) { name = n; output = o; }
public override void Write()
{
Indent(); jsonWriter.Write ("\"" + name + "\": {\n");
IndentIn();
Indent(); jsonWriter.Write ("\"input\": \"" + input + "\",\n");
Indent(); jsonWriter.Write ("\"interpolation\": \"" + interpolation + "\",\n");
Indent(); jsonWriter.Write ("\"output\": \"" + output + "\"\n");
IndentOut();
Indent(); jsonWriter.Write ("}");
}
}