Browse Source

run modularize

Gero3 6 years ago
parent
commit
71e457a14d
2 changed files with 15 additions and 7 deletions
  1. 2 2
      examples/js/loaders/AWDLoader.js
  2. 13 5
      examples/jsm/loaders/AWDLoader.js

+ 2 - 2
examples/js/loaders/AWDLoader.js

@@ -405,7 +405,7 @@ THREE.AWDLoader = ( function () {
 
 
 			while ( methods_parsed < num_methods ) {
 			while ( methods_parsed < num_methods ) {
 
 
-				// read method_type before 
+				// read method_type before
 				this.readU16();
 				this.readU16();
 				this.parseProperties( null );
 				this.parseProperties( null );
 				this.parseUserAttributes();
 				this.parseUserAttributes();
@@ -459,7 +459,7 @@ THREE.AWDLoader = ( function () {
 				var url = this.readUTFBytes( data_len );
 				var url = this.readUTFBytes( data_len );
 				console.log( url );
 				console.log( url );
 
 
-				asset = this.loadTexture(url);
+				asset = this.loadTexture( url );
 				asset.userData = {};
 				asset.userData = {};
 				asset.userData.name = name;
 				asset.userData.name = name;
 
 

+ 13 - 5
examples/jsm/loaders/AWDLoader.js

@@ -63,6 +63,8 @@ var AWDLoader = ( function () {
 
 
 		this.id = 0;
 		this.id = 0;
 		this.data = null;
 		this.data = null;
+		this.namespace = 0;
+		this.flags = 0;
 
 
 	}
 	}
 
 
@@ -181,7 +183,7 @@ var AWDLoader = ( function () {
 		parseNextBlock: function () {
 		parseNextBlock: function () {
 
 
 			var assetData,
 			var assetData,
-				ns, type, len, block,
+				block,
 				blockId = this.readU32(),
 				blockId = this.readU32(),
 				ns = this.readU8(),
 				ns = this.readU8(),
 				type = this.readU8(),
 				type = this.readU8(),
@@ -247,6 +249,8 @@ var AWDLoader = ( function () {
 			this._blocks[ blockId ] = block = new Block();
 			this._blocks[ blockId ] = block = new Block();
 			block.data = assetData;
 			block.data = assetData;
 			block.id = blockId;
 			block.id = blockId;
+			block.namespace = ns;
+			block.flags = flags;
 
 
 
 
 		},
 		},
@@ -415,7 +419,8 @@ var AWDLoader = ( function () {
 
 
 			while ( methods_parsed < num_methods ) {
 			while ( methods_parsed < num_methods ) {
 
 
-				var method_type = this.readU16();
+				// read method_type before 
+				this.readU16();
 				this.parseProperties( null );
 				this.parseProperties( null );
 				this.parseUserAttributes();
 				this.parseUserAttributes();
 
 
@@ -468,7 +473,9 @@ var AWDLoader = ( function () {
 				var url = this.readUTFBytes( data_len );
 				var url = this.readUTFBytes( data_len );
 				console.log( url );
 				console.log( url );
 
 
-				asset = this.loadTexture( url );
+				asset = this.loadTexture(url);
+				asset.userData = {};
+				asset.userData.name = name;
 
 
 			} else {
 			} else {
 				// embed texture not supported
 				// embed texture not supported
@@ -501,8 +508,9 @@ var AWDLoader = ( function () {
 		parseSkeleton: function () {
 		parseSkeleton: function () {
 
 
 			// Array<Bone>
 			// Array<Bone>
-			var name = this.readUTF(),
-				num_joints = this.readU16(),
+			//
+			this.readUTF();
+			var	num_joints = this.readU16(),
 				skeleton = [],
 				skeleton = [],
 				joints_parsed = 0;
 				joints_parsed = 0;