Skip to content

Commit

Permalink
Merge pull request #86 from qmuntal/valrem
Browse files Browse the repository at this point in the history
Remove validation tags
  • Loading branch information
qmuntal authored Jul 4, 2024
2 parents 71e4f2d + d12d51d commit 782e57e
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 72 deletions.
8 changes: 4 additions & 4 deletions encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ func (n *Node) UnmarshalJSON(data []byte) error {
func (n *Node) MarshalJSON() ([]byte, error) {
type alias Node
tmp := &struct {
Matrix *[16]float64 `json:"matrix,omitempty"` // A 4x4 transformation matrix stored in column-major order.
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.
Matrix *[16]float64 `json:"matrix,omitempty"` // A 4x4 transformation matrix stored in column-major order.
Rotation *[4]float64 `json:"rotation,omitempty"` // The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
Scale *[3]float64 `json:"scale,omitempty"`
Translation *[3]float64 `json:"translation,omitempty"`
*alias
Expand Down Expand Up @@ -339,8 +339,8 @@ func (m *Material) UnmarshalJSON(data []byte) error {
func (m *Material) MarshalJSON() ([]byte, error) {
type alias Material
tmp := &struct {
EmissiveFactor *[3]float64 `json:"emissiveFactor,omitempty" validate:"dive,gte=0,lte=1"`
AlphaCutoff *float64 `json:"alphaCutoff,omitempty" validate:"omitempty,gte=0"`
EmissiveFactor *[3]float64 `json:"emissiveFactor,omitempty"`
AlphaCutoff *float64 `json:"alphaCutoff,omitempty"`
*alias
}{
alias: (*alias)(m),
Expand Down
2 changes: 1 addition & 1 deletion ext/lightspunctual/lightspunctual.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type Lights []*Light
type Light struct {
Type string `json:"type"`
Name string `json:"name,omitempty"`
Color *[3]float64 `json:"color,omitempty" validate:"omitempty,dive,gte=0,lte=1"`
Color *[3]float64 `json:"color,omitempty"`
Intensity *float64 `json:"intensity,omitempty"`
Range *float64 `json:"range,omitempty"`
Spot *Spot `json:"spot,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions ext/specular/specular.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ func init() {

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

Expand Down
Loading

0 comments on commit 782e57e

Please sign in to comment.