Skip to content

Commit

Permalink
Merge pull request #62 from qmuntal/sampler
Browse files Browse the repository at this point in the history
Mark AnimationSampler Input and Output fields as required
  • Loading branch information
qmuntal authored Sep 28, 2022
2 parents 5ee7dab + 253edc7 commit 6914b8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions gltf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6914b8d

Please sign in to comment.