|
@@ -14,6 +14,8 @@ THREE.Mesh = function ( geometry, material ) {
|
|
this.geometry = geometry !== undefined ? geometry : new THREE.Geometry();
|
|
this.geometry = geometry !== undefined ? geometry : new THREE.Geometry();
|
|
this.material = material !== undefined ? material : new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } );
|
|
this.material = material !== undefined ? material : new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } );
|
|
|
|
|
|
|
|
+ this.drawMode = THREE.TrianglesDrawMode;
|
|
|
|
+
|
|
this.updateMorphTargets();
|
|
this.updateMorphTargets();
|
|
|
|
|
|
};
|
|
};
|
|
@@ -21,6 +23,12 @@ THREE.Mesh = function ( geometry, material ) {
|
|
THREE.Mesh.prototype = Object.create( THREE.Object3D.prototype );
|
|
THREE.Mesh.prototype = Object.create( THREE.Object3D.prototype );
|
|
THREE.Mesh.prototype.constructor = THREE.Mesh;
|
|
THREE.Mesh.prototype.constructor = THREE.Mesh;
|
|
|
|
|
|
|
|
+THREE.Mesh.prototype.setDrawMode = function ( mode ) {
|
|
|
|
+
|
|
|
|
+ this.drawMode = mode;
|
|
|
|
+
|
|
|
|
+};
|
|
|
|
+
|
|
THREE.Mesh.prototype.updateMorphTargets = function () {
|
|
THREE.Mesh.prototype.updateMorphTargets = function () {
|
|
|
|
|
|
if ( this.geometry.morphTargets !== undefined && this.geometry.morphTargets.length > 0 ) {
|
|
if ( this.geometry.morphTargets !== undefined && this.geometry.morphTargets.length > 0 ) {
|