Skip to content

Commit

Permalink
Merge pull request #8 from jaakkor2/undefvarsfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnimuc authored Mar 15, 2024
2 parents 9ef0e20 + 88dc894 commit 34fad88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/material.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function Base.setproperty!(obj::OcclusionTextureInfo, sym::Symbol, x)
elseif sym === :texCoord && x !== nothing
x 0 || throw(ArgumentError("the set index of texture's TEXCOORD attribute used for texture coordinate mapping should be ≥ 0"))
elseif sym === :strength && x !== nothing
0 strength 1 || throw(ArgumentError("strength should be should be ≥ 0 and ≤ 1"))
0 x 1 || throw(ArgumentError("strength should be should be ≥ 0 and ≤ 1"))
end
setfield!(obj, sym, x)
end
Expand Down Expand Up @@ -141,7 +141,7 @@ function Base.setproperty!(obj::PBRMetallicRoughness, sym::Symbol, x)
elseif sym === :metallicFactor && x !== nothing
0 x 1 || throw(ArgumentError("the metalness of the material factor should ≥ 0 and ≤ 1"))
elseif sym === :roughnessFactor && x !== nothing
0 roughnessFactor 1 || throw(ArgumentError("the roughness of the material factor should ≥ 0 and ≤ 1"))
0 x 1 || throw(ArgumentError("the roughness of the material factor should ≥ 0 and ≤ 1"))
end
setfield!(obj, sym, x)
end
Expand Down

0 comments on commit 34fad88

Please sign in to comment.