threejs-model-loader
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -7,2 +7,6 @@ # Changelog | ||
## [0.0.9] - 2018-08-05 | ||
### Fixed | ||
- Textures are no longer discarded when the material is a MeshBasicMaterial in the web component. | ||
## [0.0.8] - 2018-08-05 | ||
@@ -9,0 +13,0 @@ ### Added |
@@ -395,3 +395,3 @@ // model-viewer element | ||
if ( c instanceof THREE.Mesh ) { | ||
if ( c.isMesh ) { | ||
@@ -406,4 +406,6 @@ if ( c.material ) { | ||
const mat = new THREE.MeshPhongMaterial( { color: 0x888888 } ); | ||
if ( c.geometry instanceof THREE.BufferGeometry && 'color' in c.geometry.attributes | ||
|| c.geometry instanceof THREE.Geometry ) { | ||
if ( | ||
c.geometry.isBufferGeometry && 'color' in c.geometry.attributes | ||
|| c.geometry.isGeometry | ||
) { | ||
@@ -414,3 +416,3 @@ mat.vertexColors = THREE.VertexColors; | ||
if ( c.geometry instanceof THREE.BufferGeometry && ! ( 'normal' in c.geometry.attributes ) ) { | ||
if ( c.geometry.isBufferGeometry && ! ( 'normal' in c.geometry.attributes ) ) { | ||
@@ -421,2 +423,4 @@ c.geometry.computeVertexNormals(); | ||
mat.map = m.map; | ||
mats[ i ] = mat; | ||
@@ -423,0 +427,0 @@ m = mat; |
@@ -0,0 +0,0 @@ /** |
{ | ||
"name": "threejs-model-loader", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "THREE.js Model Loader that delegates to the appropriate geometry loader", | ||
@@ -5,0 +5,0 @@ "main": "ModelLoader.js", |
22368
411