|
@@ -112,8 +112,7 @@ THREE.VRMLLoader.prototype = {
|
|
|
|
|
|
if ( /appearance/.exec( data ) ) {
|
|
|
|
|
|
- var material = defines[ /USE (\w+)/.exec( data )[ 1 ] ].clone();
|
|
|
- parent.setMaterial( material );
|
|
|
+ parent.material = defines[ /USE (\w+)/.exec( data )[ 1 ] ].clone();
|
|
|
|
|
|
} else {
|
|
|
|
|
@@ -216,7 +215,7 @@ THREE.VRMLLoader.prototype = {
|
|
|
|
|
|
}
|
|
|
|
|
|
- parent.setGeometry( new THREE.CubeGeometry( width, height, depth ) );
|
|
|
+ parent.geometry = new THREE.CubeGeometry( width, height, depth );
|
|
|
|
|
|
} else if ( /Cylinder/.exec( data.string ) ) {
|
|
|
|
|
@@ -238,7 +237,7 @@ THREE.VRMLLoader.prototype = {
|
|
|
|
|
|
}
|
|
|
|
|
|
- parent.setGeometry( new THREE.CylinderGeometry( radius, radius, height ) );
|
|
|
+ parent.geometry = new THREE.CylinderGeometry( radius, radius, height );
|
|
|
|
|
|
} else if ( /Cone/.exec( data.string ) ) {
|
|
|
|
|
@@ -260,15 +259,13 @@ THREE.VRMLLoader.prototype = {
|
|
|
|
|
|
}
|
|
|
|
|
|
- parent.setGeometry( new THREE.CylinderGeometry( topRadius, bottomRadius, height ) );
|
|
|
+ parent.geometry = new THREE.CylinderGeometry( topRadius, bottomRadius, height );
|
|
|
|
|
|
} else if ( /Sphere/.exec( data.string ) ) {
|
|
|
|
|
|
var result = /radius( +[\d|\.|\+|\-|e]+)/.exec( data.children[ 0 ] );
|
|
|
|
|
|
- parent.setGeometry( new THREE.SphereGeometry(
|
|
|
- parseFloat( result[ 1 ] )
|
|
|
- ) );
|
|
|
+ parent.geometry = new THREE.SphereGeometry( parseFloat( result[ 1 ] ) );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -336,7 +333,7 @@ THREE.VRMLLoader.prototype = {
|
|
|
|
|
|
}
|
|
|
|
|
|
- parent.setMaterial( material );
|
|
|
+ parent.material = material;
|
|
|
|
|
|
}
|
|
|
|