Skip to content

Commit

Permalink
mrdoob#9756 Updated to WWOBJLoader2 V1.1.0:
Browse files Browse the repository at this point in the history
Adjusted to removal of MultiMaterial
  • Loading branch information
kaisalmen committed Mar 22, 2017
1 parent 60fb013 commit 367b264
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions examples/js/loaders/OBJLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,7 @@ THREE.OBJLoader.prototype = {

}

var multiMaterial = new THREE.MultiMaterial( createdMaterials );
mesh = ( ! isLine ? new THREE.Mesh( buffergeometry, multiMaterial ) : new THREE.LineSegments( buffergeometry, multiMaterial ) );
mesh = ( ! isLine ? new THREE.Mesh( buffergeometry, createdMaterials ) : new THREE.LineSegments( buffergeometry, createdMaterials ) );

} else {

Expand Down
4 changes: 2 additions & 2 deletions examples/js/loaders/OBJLoader2.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'use strict';

if ( THREE.OBJLoader2 === undefined ) { THREE.OBJLoader2 = {} }
THREE.OBJLoader2.version = '1.0.6';
THREE.OBJLoader2.version = '1.1.0';

/**
* Use this class to load OBJ data from files or to parse OBJ data from arraybuffer or text
Expand Down Expand Up @@ -965,7 +965,7 @@ THREE.OBJLoader2 = (function () {
}
if ( ! normalBA ) bufferGeometry.computeVertexNormals();

if ( createMultiMaterial ) material = new THREE.MultiMaterial( materials );
if ( createMultiMaterial ) material = materials;
var mesh = new THREE.Mesh( bufferGeometry, material );
this.sceneGraphBaseNode.add( mesh );

Expand Down
5 changes: 2 additions & 3 deletions examples/js/loaders/WWOBJLoader2.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'use strict';

if ( THREE.OBJLoader2 === undefined ) { THREE.OBJLoader2 = {} }
THREE.OBJLoader2.version = '1.0.6';
THREE.OBJLoader2.version = '1.1.0';

/**
* OBJ data will be loaded by dynamically created web worker.
Expand Down Expand Up @@ -416,10 +416,9 @@ THREE.OBJLoader2.WWOBJLoader2 = (function () {
if ( createMultiMaterial ) multiMaterials.push( material );

}

if ( createMultiMaterial ) {

material = new THREE.MultiMaterial( multiMaterials );
material = multiMaterials;
var materialGroups = payload.materialGroups;
var materialGroup;
for ( var key in materialGroups ) {
Expand Down

0 comments on commit 367b264

Please sign in to comment.