redcamel / RedGL2

RedGL - Javascript 3D library (webgl)
https://redcamel.github.io/RedGL2/example
MIT License
155 stars 16 forks source link

Fails to display if only doubleSided is used in the material #706

Closed cx20 closed 2 years ago

cx20 commented 4 years ago

I tried displaying the new SimpleSkin model in RedGL. However, an error occurs and is not displayed.

RedGL + new SimpleSkin.gltf result:

RedGL.min.js:1025 
Uncaught TypeError: Cannot use 'in' operator to search for 'baseColorTexture' in undefined

Probably due to the lack of pbrMetallicRoughness in this model's material, but this is not a required item.

  "materials" : [ {
    "doubleSided" : true
  } ],
cx20 commented 3 years ago

BTW, In the latest version of SimpleSkin.gltf, it seems that the materials has been removed to simplify the sample model.

Use the model below to test this issue. SimpleSkin.gltf (with doubleSided)

redcamel commented 3 years ago

@cx20 ok... i will check this problem.

redcamel commented 2 years ago

@cx20 https://redcamel.github.io/RedGL2/rnd/gltfNewModel/RedGLTFLoader_newModel.html