mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-08-22 21:30:43 +02:00
30 lines
889 B
JavaScript
Executable File
30 lines
889 B
JavaScript
Executable File
/**
|
|
* @author mrdoob / http://mrdoob.com/
|
|
*/
|
|
|
|
THREE.PlaneGeometry6 = function ( width, height, widthSegments, heightSegments ) {
|
|
|
|
THREE.PlaneBufferGeometry.call( this, width, height, widthSegments, heightSegments );
|
|
|
|
var indices = this.attributes.index.array;
|
|
var vertices = this.attributes.position.array;
|
|
var normals = this.attributes.normal.array;
|
|
var uvs = this.attributes.uv.array;
|
|
|
|
this.indices = indices;
|
|
this.vertices = [];
|
|
this.normals = [];
|
|
this.uvs = [];
|
|
|
|
for ( var i = 0, l = vertices.length / 3; i < l; i ++ ) {
|
|
|
|
this.vertices.push( new THREE.TypedVector3( vertices, i * 3 ) );
|
|
this.normals.push( new THREE.TypedVector3( normals, i * 3 ) );
|
|
this.uvs.push( new THREE.TypedVector2( uvs, i * 2 ) );
|
|
|
|
}
|
|
|
|
};
|
|
|
|
THREE.PlaneGeometry6.prototype = Object.create( THREE.PlaneBufferGeometry.prototype );
|
|
THREE.PlaneGeometry6.prototype.constructor = THREE.PlaneGeometry6; |