提交 76c66400 编写于 作者: M Mr.doob

BufferGeometry: Removed dynamic property.

上级 c2c9ad7f
......@@ -141,7 +141,6 @@
};
_particleGeom = new THREE.BufferGeometry();
_particleGeom.dynamic = false;
_particleGeom.attributes = {
position: {
......@@ -151,8 +150,7 @@
alpha: {
itemSize: 1,
array: new Float32Array( amountOfParticles ),
dynamic: true
array: new Float32Array( amountOfParticles )
}
};
......
......@@ -13,10 +13,6 @@ THREE.BufferGeometry = function () {
this.attributes = {};
// attributes typed arrays are kept only if dynamic flag is set
this.dynamic = true;
// offsets for chunks when using indexed elements
this.offsets = [];
......
......@@ -100,7 +100,6 @@
var material = object.material;
if ( material === undefined ) return intersects;
if ( geometry.dynamic === false ) return intersects;
var a, b, c;
var precision = raycaster.precision;
......
......@@ -2444,7 +2444,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
function setDirectBuffers ( geometry, hint, dispose ) {
function setDirectBuffers( geometry, hint ) {
var attributes = geometry.attributes;
......@@ -2472,12 +2472,6 @@ THREE.WebGLRenderer = function ( parameters ) {
}
if ( dispose && ! attributeItem.dynamic ) {
attributeItem.array = null;
}
}
}
......@@ -3562,7 +3556,7 @@ THREE.WebGLRenderer = function ( parameters ) {
};
function renderObjects ( renderList, reverse, materialType, camera, lights, fog, useBlending, overrideMaterial ) {
function renderObjects( renderList, reverse, materialType, camera, lights, fog, useBlending, overrideMaterial ) {
var webglObject, object, buffer, material, start, end, delta;
......@@ -4058,11 +4052,11 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( geometry instanceof THREE.BufferGeometry ) {
setDirectBuffers( geometry, _gl.DYNAMIC_DRAW, !geometry.dynamic );
setDirectBuffers( geometry, _gl.DYNAMIC_DRAW );
} else if ( geometry instanceof THREE.Geometry2 ) {
setGeometry2Buffers( geometry, _gl.DYNAMIC_DRAW, !geometry.dynamic );
setGeometry2Buffers( geometry, _gl.DYNAMIC_DRAW );
} else if ( object instanceof THREE.Mesh ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册