diff --git a/encode_test.go b/encode_test.go index 725d9ba..112fb30 100644 --- a/encode_test.go +++ b/encode_test.go @@ -175,7 +175,7 @@ func TestEncoder_Encode(t *testing.T) { {Extras: 8.0, Sampler: Index(2), Target: ChannelTarget{Extras: 8.0, Node: Index(5), Path: TRSTranslation}}, }}, {Extras: 8.0, Name: "an_3", Samplers: []*AnimationSampler{ - {Extras: 8.0, Input: Index(1), Output: Index(1), Interpolation: InterpolationCubicSpline}, + {Extras: 8.0, Input: 1, Output: 1, Interpolation: InterpolationCubicSpline}, }}, }}}, false}, {"withBufView", args{&Document{BufferViews: []*BufferView{ diff --git a/gltf.go b/gltf.go index 049dd29..fc3ee17 100644 --- a/gltf.go +++ b/gltf.go @@ -426,9 +426,9 @@ type Animation struct { type AnimationSampler struct { Extensions Extensions `json:"extensions,omitempty"` Extras interface{} `json:"extras,omitempty"` - Input *uint32 `json:"input,omitempty"` // The index of an accessor containing keyframe input values. + Input uint32 `json:"input"` // The index of an accessor containing keyframe input values. Interpolation Interpolation `json:"interpolation,omitempty" validate:"lte=2"` - Output *uint32 `json:"output,omitempty"` // The index of an accessor containing keyframe output values. + Output uint32 `json:"output"` // The index of an accessor containing keyframe output values. } // The Channel targets an animation's sampler at a node's property.