提交 3a3d2b1e 编写于 作者: M Mugen87

Update builds.

上级 a9913a4d
...@@ -266,6 +266,16 @@ ...@@ -266,6 +266,16 @@
var GreaterEqualStencilFunc = 518; var GreaterEqualStencilFunc = 518;
var AlwaysStencilFunc = 519; var AlwaysStencilFunc = 519;
var StaticDrawUsage = 35044;
var DynamicDrawUsage = 35048;
var StreamDrawUsage = 35040;
var StaticReadUsage = 35045;
var DynamicReadUsage = 35049;
var StreamReadUsage = 35041;
var StaticCopyUsage = 35046;
var DynamicCopyUsage = 35050;
var StreamCopyUsage = 35042;
/** /**
* https://github.com/mrdoob/eventdispatcher.js/ * https://github.com/mrdoob/eventdispatcher.js/
*/ */
...@@ -8858,7 +8868,7 @@ ...@@ -8858,7 +8868,7 @@
this.count = array !== undefined ? array.length / itemSize : 0; this.count = array !== undefined ? array.length / itemSize : 0;
this.normalized = normalized === true; this.normalized = normalized === true;
this.dynamic = false; this.usage = StaticDrawUsage;
this.updateRange = { offset: 0, count: - 1 }; this.updateRange = { offset: 0, count: - 1 };
this.version = 0; this.version = 0;
...@@ -8881,9 +8891,9 @@ ...@@ -8881,9 +8891,9 @@
onUploadCallback: function () {}, onUploadCallback: function () {},
setDynamic: function ( value ) { setUsage: function ( value ) {
this.dynamic = value; this.usage = value;
return this; return this;
...@@ -8897,7 +8907,7 @@ ...@@ -8897,7 +8907,7 @@
this.count = source.count; this.count = source.count;
this.normalized = source.normalized; this.normalized = source.normalized;
this.dynamic = source.dynamic; this.usage = source.usage;
return this; return this;
...@@ -14940,7 +14950,7 @@ ...@@ -14940,7 +14950,7 @@
function createBuffer( attribute, bufferType ) { function createBuffer( attribute, bufferType ) {
var array = attribute.array; var array = attribute.array;
var usage = attribute.dynamic ? 35048 : 35044; var usage = attribute.usage;
var buffer = gl.createBuffer(); var buffer = gl.createBuffer();
...@@ -15001,20 +15011,12 @@ ...@@ -15001,20 +15011,12 @@
gl.bindBuffer( bufferType, buffer ); gl.bindBuffer( bufferType, buffer );
if ( attribute.dynamic === false ) { if ( updateRange.count === - 1 ) {
gl.bufferData( bufferType, array, 35044 );
} else if ( updateRange.count === - 1 ) {
// Not using update ranges // Not using update ranges
gl.bufferSubData( bufferType, 0, array ); gl.bufferSubData( bufferType, 0, array );
} else if ( updateRange.count === 0 ) {
console.error( 'THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually.' );
} else { } else {
gl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, gl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,
...@@ -25338,7 +25340,7 @@ ...@@ -25338,7 +25340,7 @@
if ( material.isShaderMaterial ) { if ( material.isShaderMaterial ) {
material.uniformsNeedUpdate = false; material.uniformsNeedUpdate = false; // #15581
} }
...@@ -26143,7 +26145,7 @@ ...@@ -26143,7 +26145,7 @@
this.stride = stride; this.stride = stride;
this.count = array !== undefined ? array.length / stride : 0; this.count = array !== undefined ? array.length / stride : 0;
this.dynamic = false; this.usage = StaticDrawUsage;
this.updateRange = { offset: 0, count: - 1 }; this.updateRange = { offset: 0, count: - 1 };
this.version = 0; this.version = 0;
...@@ -26166,9 +26168,9 @@ ...@@ -26166,9 +26168,9 @@
onUploadCallback: function () {}, onUploadCallback: function () {},
setDynamic: function ( value ) { setUsage: function ( value ) {
this.dynamic = value; this.usage = value;
return this; return this;
...@@ -26179,7 +26181,7 @@ ...@@ -26179,7 +26181,7 @@
this.array = new source.array.constructor( source.array ); this.array = new source.array.constructor( source.array );
this.count = source.count; this.count = source.count;
this.stride = source.stride; this.stride = source.stride;
this.dynamic = source.dynamic; this.usage = source.usage;
return this; return this;
...@@ -48368,13 +48370,33 @@ ...@@ -48368,13 +48370,33 @@
console.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' ); console.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' );
return this.array.length; return this.array.length;
}
},
dynamic: {
get: function () {
console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );
return this.usage === DynamicDrawUsage;
},
set: function ( value ) {
console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );
this.setUsage( value );
} }
} }
} ); } );
Object.assign( BufferAttribute.prototype, { Object.assign( BufferAttribute.prototype, {
setDynamic: function ( value ) {
console.warn( 'THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.' );
this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );
return this;
},
copyIndicesArray: function ( /* indices */ ) { copyIndicesArray: function ( /* indices */ ) {
console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' ); console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
...@@ -48390,7 +48412,6 @@ ...@@ -48390,7 +48412,6 @@
return this; return this;
} }
} ); } );
Object.assign( BufferGeometry.prototype, { Object.assign( BufferGeometry.prototype, {
...@@ -48452,8 +48473,33 @@ ...@@ -48452,8 +48473,33 @@
} ); } );
Object.defineProperties( InterleavedBuffer.prototype, {
dynamic: {
get: function () {
console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
return this.usage === DynamicDrawUsage;
},
set: function ( value ) {
console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
this.setUsage( value );
}
}
} );
Object.assign( InterleavedBuffer.prototype, { Object.assign( InterleavedBuffer.prototype, {
setDynamic: function ( value ) {
console.warn( 'THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.' );
this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );
return this;
},
setArray: function ( array ) { setArray: function ( array ) {
console.warn( 'THREE.InterleavedBuffer: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' ); console.warn( 'THREE.InterleavedBuffer: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
...@@ -48464,7 +48510,6 @@ ...@@ -48464,7 +48510,6 @@
return this; return this;
} }
} ); } );
// //
...@@ -49319,6 +49364,9 @@ ...@@ -49319,6 +49364,9 @@
exports.DstAlphaFactor = DstAlphaFactor; exports.DstAlphaFactor = DstAlphaFactor;
exports.DstColorFactor = DstColorFactor; exports.DstColorFactor = DstColorFactor;
exports.DynamicBufferAttribute = DynamicBufferAttribute; exports.DynamicBufferAttribute = DynamicBufferAttribute;
exports.DynamicCopyUsage = DynamicCopyUsage;
exports.DynamicDrawUsage = DynamicDrawUsage;
exports.DynamicReadUsage = DynamicReadUsage;
exports.EdgesGeometry = EdgesGeometry; exports.EdgesGeometry = EdgesGeometry;
exports.EdgesHelper = EdgesHelper; exports.EdgesHelper = EdgesHelper;
exports.EllipseCurve = EllipseCurve; exports.EllipseCurve = EllipseCurve;
...@@ -49590,7 +49638,13 @@ ...@@ -49590,7 +49638,13 @@
exports.SrcAlphaFactor = SrcAlphaFactor; exports.SrcAlphaFactor = SrcAlphaFactor;
exports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor; exports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor;
exports.SrcColorFactor = SrcColorFactor; exports.SrcColorFactor = SrcColorFactor;
exports.StaticCopyUsage = StaticCopyUsage;
exports.StaticDrawUsage = StaticDrawUsage;
exports.StaticReadUsage = StaticReadUsage;
exports.StereoCamera = StereoCamera; exports.StereoCamera = StereoCamera;
exports.StreamCopyUsage = StreamCopyUsage;
exports.StreamDrawUsage = StreamDrawUsage;
exports.StreamReadUsage = StreamReadUsage;
exports.StringKeyframeTrack = StringKeyframeTrack; exports.StringKeyframeTrack = StringKeyframeTrack;
exports.SubtractEquation = SubtractEquation; exports.SubtractEquation = SubtractEquation;
exports.SubtractiveBlending = SubtractiveBlending; exports.SubtractiveBlending = SubtractiveBlending;
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册