Skip to content

Commit 6914b8d

Browse files
authored
Merge pull request #62 from qmuntal/sampler
Mark AnimationSampler Input and Output fields as required
2 parents 5ee7dab + 253edc7 commit 6914b8d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

encode_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func TestEncoder_Encode(t *testing.T) {
175175
{Extras: 8.0, Sampler: Index(2), Target: ChannelTarget{Extras: 8.0, Node: Index(5), Path: TRSTranslation}},
176176
}},
177177
{Extras: 8.0, Name: "an_3", Samplers: []*AnimationSampler{
178-
{Extras: 8.0, Input: Index(1), Output: Index(1), Interpolation: InterpolationCubicSpline},
178+
{Extras: 8.0, Input: 1, Output: 1, Interpolation: InterpolationCubicSpline},
179179
}},
180180
}}}, false},
181181
{"withBufView", args{&Document{BufferViews: []*BufferView{

gltf.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,9 @@ type Animation struct {
426426
type AnimationSampler struct {
427427
Extensions Extensions `json:"extensions,omitempty"`
428428
Extras interface{} `json:"extras,omitempty"`
429-
Input *uint32 `json:"input,omitempty"` // The index of an accessor containing keyframe input values.
429+
Input uint32 `json:"input"` // The index of an accessor containing keyframe input values.
430430
Interpolation Interpolation `json:"interpolation,omitempty" validate:"lte=2"`
431-
Output *uint32 `json:"output,omitempty"` // The index of an accessor containing keyframe output values.
431+
Output uint32 `json:"output"` // The index of an accessor containing keyframe output values.
432432
}
433433

434434
// The Channel targets an animation's sampler at a node's property.

0 commit comments

Comments
 (0)