Skip to content

Commit

Permalink
Updated material to default to physical
Browse files Browse the repository at this point in the history
  • Loading branch information
kpal81xd committed Nov 7, 2024
1 parent 21ce715 commit b3199fb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/framework/parsers/material/json-standard-material.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,10 @@ class JsonStandardMaterialParser {
// or from old versions into current version
migrate(data) {
// replace old shader property with new shadingModel property
if (data.shadingModel === undefined) {
if (data.shader === 'blinn') {
data.shadingModel = SPECULAR_BLINN;
} else {
data.shadingModel = SPECULAR_PHONG;
}
if (data.shader) {
data.shadingModel = data.shader === 'blinn' ? SPECULAR_BLINN : SPECULAR_PHONG;
} else if (data.shadingModel === undefined) {
data.shadingModel = SPECULAR_BLINN;
}
if (data.shader) delete data.shader;

Expand Down

0 comments on commit b3199fb

Please sign in to comment.