|
@@ -49,6 +49,8 @@ THREE.AWDLoader = ( function () {
|
|
|
|
|
|
this.id = 0;
|
|
this.id = 0;
|
|
this.data = null;
|
|
this.data = null;
|
|
|
|
+ this.namespace = 0;
|
|
|
|
+ this.flags = 0;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -167,7 +169,7 @@ THREE.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(),
|
|
@@ -233,6 +235,8 @@ THREE.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;
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -401,7 +405,8 @@ THREE.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();
|
|
|
|
|
|
@@ -454,7 +459,9 @@ 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.name = name;
|
|
|
|
|
|
} else {
|
|
} else {
|
|
// embed texture not supported
|
|
// embed texture not supported
|
|
@@ -487,8 +494,9 @@ THREE.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;
|
|
|
|
|