Skip to content

Commit 782e57e

Browse files
authored
Merge pull request #86 from qmuntal/valrem
Remove validation tags
2 parents 71e4f2d + d12d51d commit 782e57e

File tree

4 files changed

+72
-72
lines changed

4 files changed

+72
-72
lines changed

encode.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ func (n *Node) UnmarshalJSON(data []byte) error {
278278
func (n *Node) MarshalJSON() ([]byte, error) {
279279
type alias Node
280280
tmp := &struct {
281-
Matrix *[16]float64 `json:"matrix,omitempty"` // A 4x4 transformation matrix stored in column-major order.
282-
Rotation *[4]float64 `json:"rotation,omitempty" validate:"omitempty,dive,gte=-1,lte=1"` // The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
281+
Matrix *[16]float64 `json:"matrix,omitempty"` // A 4x4 transformation matrix stored in column-major order.
282+
Rotation *[4]float64 `json:"rotation,omitempty"` // The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
283283
Scale *[3]float64 `json:"scale,omitempty"`
284284
Translation *[3]float64 `json:"translation,omitempty"`
285285
*alias
@@ -339,8 +339,8 @@ func (m *Material) UnmarshalJSON(data []byte) error {
339339
func (m *Material) MarshalJSON() ([]byte, error) {
340340
type alias Material
341341
tmp := &struct {
342-
EmissiveFactor *[3]float64 `json:"emissiveFactor,omitempty" validate:"dive,gte=0,lte=1"`
343-
AlphaCutoff *float64 `json:"alphaCutoff,omitempty" validate:"omitempty,gte=0"`
342+
EmissiveFactor *[3]float64 `json:"emissiveFactor,omitempty"`
343+
AlphaCutoff *float64 `json:"alphaCutoff,omitempty"`
344344
*alias
345345
}{
346346
alias: (*alias)(m),

ext/lightspunctual/lightspunctual.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ type Lights []*Light
8181
type Light struct {
8282
Type string `json:"type"`
8383
Name string `json:"name,omitempty"`
84-
Color *[3]float64 `json:"color,omitempty" validate:"omitempty,dive,gte=0,lte=1"`
84+
Color *[3]float64 `json:"color,omitempty"`
8585
Intensity *float64 `json:"intensity,omitempty"`
8686
Range *float64 `json:"range,omitempty"`
8787
Spot *Spot `json:"spot,omitempty"`

ext/specular/specular.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ func init() {
2525

2626
// PBRSpecularGlossiness defines a specular-glossiness material model.
2727
type PBRSpecularGlossiness struct {
28-
DiffuseFactor *[4]float64 `json:"diffuseFactor,omitempty" validate:"omitempty,dive,gte=0,lte=1"`
28+
DiffuseFactor *[4]float64 `json:"diffuseFactor,omitempty"`
2929
DiffuseTexture *gltf.TextureInfo `json:"diffuseTexture,omitempty"`
30-
SpecularFactor *[3]float64 `json:"specularFactor,omitempty" validate:"omitempty,dive,gte=0,lte=1"`
31-
GlossinessFactor *float64 `json:"glossinessFactor,omitempty" validate:"omitempty,gte=0,lte=1"`
30+
SpecularFactor *[3]float64 `json:"specularFactor,omitempty"`
31+
GlossinessFactor *float64 `json:"glossinessFactor,omitempty"`
3232
SpecularGlossinessTexture *gltf.TextureInfo `json:"specularGlossinessTexture,omitempty"`
3333
}
3434

0 commit comments

Comments
 (0)