Răsfoiți Sursa

Merge branch 'master' into dev

Mr.doob 12 ani în urmă
părinte
comite
0a9818564b
2 a modificat fișierele cu 5 adăugiri și 3 ștergeri
  1. 1 0
      README.md
  2. 4 3
      examples/js/loaders/MTLLoader.js

+ 1 - 0
README.md

@@ -62,6 +62,7 @@ This code creates a scene, then creates a camera, adds the camera and cube to th
 
 </script>
 ```
+If everything went well you should see [this](http://jsfiddle.net/ksRyQ/).
 
 ### Change log ###
 

+ 4 - 3
examples/js/loaders/MTLLoader.js

@@ -4,10 +4,11 @@
  * @author angelxuanchang
  */
 
-THREE.MTLLoader = function( baseUrl, options ) {
+THREE.MTLLoader = function( baseUrl, options, crossOrigin ) {
 
 	this.baseUrl = baseUrl;
 	this.options = options;
+	this.crossOrigin = crossOrigin;
 
 };
 
@@ -353,7 +354,7 @@ THREE.MTLLoader.MaterialCreator.prototype = {
 
 					// Diffuse texture map
 
-					params[ 'map' ] = THREE.MTLLoader.loadTexture( this.baseUrl + value );
+					params[ 'map' ] = this.loadTexture( this.baseUrl + value );
 					params[ 'map' ].wrapS = this.wrap;
 					params[ 'map' ].wrapT = this.wrap;
 
@@ -404,7 +405,7 @@ THREE.MTLLoader.MaterialCreator.prototype = {
 
 };
 
-THREE.MTLLoader.loadTexture = function ( url, mapping, onLoad, onError ) {
+THREE.MTLLoader.prototype.loadTexture = function ( url, mapping, onLoad, onError ) {
 
 	var isCompressed = /\.dds$/i.test( url );