Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Aug 4, 2017
2 parents 9d6e652 + c63ee06 commit 1c8122b
Show file tree
Hide file tree
Showing 30 changed files with 1,779 additions and 1,277 deletions.
317 changes: 167 additions & 150 deletions build/three.js

Large diffs are not rendered by default.

1,344 changes: 672 additions & 672 deletions build/three.min.js

Large diffs are not rendered by default.

318 changes: 167 additions & 151 deletions build/three.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/api/core/Layers.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2>Constructor</h2>

<h3>[name]()</h3>
<div>
Create a new Layers object, with an initial mask set to layer 1.
Create a new Layers object, with an initial mask set to 1 (layer 0).
</div>

<h2>Properties</h2>
Expand Down
28 changes: 28 additions & 0 deletions editor/js/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,34 @@ Editor.prototype = {

},

getObjectMaterial: function ( object, slot ) {

var material = object.material;

if ( Array.isArray( material ) ) {

material = material[ slot ];

}

return material;

},

setObjectMaterial: function ( object, slot, newMaterial ) {

if ( Array.isArray( object.material ) ) {

object.material[ slot ] = newMaterial;

} else {

object.material = newMaterial;

}

},

//

select: function ( object ) {
Expand Down
2 changes: 1 addition & 1 deletion editor/js/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ var Loader = function ( editor ) {
var contents = event.target.result;

var loader = new THREE.GLTF2Loader();
loader.parse( contents, function ( result ) {
loader.parse( contents, '', function ( result ) {

result.scene.name = filename;
editor.execute( new AddObjectCommand( result.scene ) );
Expand Down
Loading

0 comments on commit 1c8122b

Please sign in to comment.