|
@@ -9,16 +9,9 @@ THREE.BufferGeometry = function () {
|
|
|
|
|
|
this.name = '';
|
|
this.name = '';
|
|
|
|
|
|
- // attributes
|
|
|
|
-
|
|
|
|
this.attributes = {};
|
|
this.attributes = {};
|
|
-
|
|
|
|
- // offsets for chunks when using indexed elements
|
|
|
|
-
|
|
|
|
this.offsets = [];
|
|
this.offsets = [];
|
|
|
|
|
|
- // boundings
|
|
|
|
-
|
|
|
|
this.boundingBox = null;
|
|
this.boundingBox = null;
|
|
this.boundingSphere = null;
|
|
this.boundingSphere = null;
|
|
|
|
|
|
@@ -60,6 +53,18 @@ THREE.BufferGeometry.prototype = {
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ addDrawCall: function ( start, count, indexOffset ) {
|
|
|
|
+
|
|
|
|
+ this.offsets.push( {
|
|
|
|
+
|
|
|
|
+ start: start,
|
|
|
|
+ count: count,
|
|
|
|
+ index: indexOffset || 0
|
|
|
|
+
|
|
|
|
+ } );
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
applyMatrix: function ( matrix ) {
|
|
applyMatrix: function ( matrix ) {
|
|
|
|
|
|
var position = this.attributes.position;
|
|
var position = this.attributes.position;
|