|
@@ -3,7 +3,7 @@
|
|
|
* Copyright 2010-2023 Three.js Authors
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
*/
|
|
|
-const REVISION = '159';
|
|
|
+const REVISION = '160dev';
|
|
|
|
|
|
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
|
|
|
const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
|
|
@@ -9911,7 +9911,7 @@ class BufferAttribute {
|
|
|
|
|
|
get updateRange() {
|
|
|
|
|
|
- console.warn( 'THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.' ); // @deprecated, r159
|
|
|
+ console.warn( 'THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159
|
|
|
return this._updateRange;
|
|
|
|
|
|
}
|
|
@@ -28129,7 +28129,7 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
|
|
|
const info = getUniformSize( value );
|
|
|
|
|
|
- if ( typeof value === 'number' ) {
|
|
|
+ if ( typeof value === 'number' || typeof value === 'boolean' ) {
|
|
|
|
|
|
uniform.__data[ 0 ] = value;
|
|
|
gl.bufferSubData( gl.UNIFORM_BUFFER, offset + arrayOffset, uniform.__data );
|
|
@@ -28141,15 +28141,15 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
uniform.__data[ 0 ] = value.elements[ 0 ];
|
|
|
uniform.__data[ 1 ] = value.elements[ 1 ];
|
|
|
uniform.__data[ 2 ] = value.elements[ 2 ];
|
|
|
- uniform.__data[ 3 ] = value.elements[ 0 ];
|
|
|
+ uniform.__data[ 3 ] = 0;
|
|
|
uniform.__data[ 4 ] = value.elements[ 3 ];
|
|
|
uniform.__data[ 5 ] = value.elements[ 4 ];
|
|
|
uniform.__data[ 6 ] = value.elements[ 5 ];
|
|
|
- uniform.__data[ 7 ] = value.elements[ 0 ];
|
|
|
+ uniform.__data[ 7 ] = 0;
|
|
|
uniform.__data[ 8 ] = value.elements[ 6 ];
|
|
|
uniform.__data[ 9 ] = value.elements[ 7 ];
|
|
|
uniform.__data[ 10 ] = value.elements[ 8 ];
|
|
|
- uniform.__data[ 11 ] = value.elements[ 0 ];
|
|
|
+ uniform.__data[ 11 ] = 0;
|
|
|
|
|
|
} else {
|
|
|
|
|
@@ -28179,7 +28179,7 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
|
|
|
// cache entry does not exist so far
|
|
|
|
|
|
- if ( typeof value === 'number' ) {
|
|
|
+ if ( typeof value === 'number' || typeof value === 'boolean' ) {
|
|
|
|
|
|
cache[ index ] = value;
|
|
|
|
|
@@ -28205,7 +28205,7 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
|
|
|
// compare current value with cached entry
|
|
|
|
|
|
- if ( typeof value === 'number' ) {
|
|
|
+ if ( typeof value === 'number' || typeof value === 'boolean' ) {
|
|
|
|
|
|
if ( cache[ index ] !== value ) {
|
|
|
|
|
@@ -28223,7 +28223,16 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
|
|
|
const cachedObject = cachedObjects[ i ];
|
|
|
|
|
|
- if ( cachedObject.equals( values[ i ] ) === false ) {
|
|
|
+ if ( typeof cachedObject === 'number' || typeof cachedObject === 'boolean' ) {
|
|
|
+
|
|
|
+ if ( cachedObject !== values[ i ] ) {
|
|
|
+
|
|
|
+ cachedObjects[ i ] = values[ i ];
|
|
|
+ return true;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ } else if ( cachedObject.equals( values[ i ] ) === false ) {
|
|
|
|
|
|
cachedObject.copy( values[ i ] );
|
|
|
return true;
|
|
@@ -28327,9 +28336,9 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
|
|
|
// determine sizes according to STD140
|
|
|
|
|
|
- if ( typeof value === 'number' ) {
|
|
|
+ if ( typeof value === 'number' || typeof value === 'boolean' ) {
|
|
|
|
|
|
- // float/int
|
|
|
+ // float/int/bool
|
|
|
|
|
|
info.boundary = 4;
|
|
|
info.storage = 4;
|
|
@@ -31138,7 +31147,7 @@ class InterleavedBuffer {
|
|
|
|
|
|
get updateRange() {
|
|
|
|
|
|
- console.warn( 'THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.' ); // @deprecated, r159
|
|
|
+ console.warn( 'THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159
|
|
|
return this._updateRange;
|
|
|
|
|
|
}
|