浏览代码

Merge pull request #7559 from makc/patch-1

replace ImageUtils with TextureLoader in VRMLLoader
Mr.doob 9 年之前
父节点
当前提交
b7ad25aeee
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      examples/js/loaders/VRMLLoader.js

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

@@ -44,14 +44,15 @@ THREE.VRMLLoader.prototype = {
 
 		this.crossOrigin = value;
 
-		THREE.ImageUtils.crossOrigin = value;
-
 	},
 
 	parse: function ( data ) {
 
 		var texturePath = this.texturePath || '';
 
+		var textureLoader = new THREE.TextureLoader( this.manager );
+		textureLoader.setCrossOrigin( this.crossOrigin );
+
 		var parseV1 = function ( lines, scene ) {
 
 			console.warn( 'VRML V1.0 not supported yet' );
@@ -929,7 +930,7 @@ THREE.VRMLLoader.prototype = {
 
 								parent.material.name = textureName[ 1 ];
 
-								parent.material.map = THREE.ImageUtils.loadTexture (texturePath + textureName[ 1 ]);
+								parent.material.map = textureLoader.load( texturePath + textureName[ 1 ] );
 
 							}