|
|
@@ -24227,6 +24227,28 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
}
|
|
|
|
|
|
+ if ( glFormat === _gl.RGB_INTEGER ) {
|
|
|
+
|
|
|
+ if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.RGB8UI;
|
|
|
+ if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.RGB16UI;
|
|
|
+ if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.RGB32UI;
|
|
|
+ if ( glType === _gl.BYTE ) internalFormat = _gl.RGB8I;
|
|
|
+ if ( glType === _gl.SHORT ) internalFormat = _gl.RGB16I;
|
|
|
+ if ( glType === _gl.INT ) internalFormat = _gl.RGB32I;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( glFormat === _gl.RGBA_INTEGER ) {
|
|
|
+
|
|
|
+ if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.RGBA8UI;
|
|
|
+ if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.RGBA16UI;
|
|
|
+ if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.RGBA32UI;
|
|
|
+ if ( glType === _gl.BYTE ) internalFormat = _gl.RGBA8I;
|
|
|
+ if ( glType === _gl.SHORT ) internalFormat = _gl.RGBA16I;
|
|
|
+ if ( glType === _gl.INT ) internalFormat = _gl.RGBA32I;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if ( glFormat === _gl.RGB ) {
|
|
|
|
|
|
if ( glType === _gl.UNSIGNED_INT_5_9_9_9_REV ) internalFormat = _gl.RGB9_E5;
|
|
|
@@ -32390,6 +32412,27 @@ class LOD extends Object3D {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ removeLevel( distance ) {
|
|
|
+
|
|
|
+ const levels = this.levels;
|
|
|
+
|
|
|
+ for ( let i = 0; i < levels.length; i ++ ) {
|
|
|
+
|
|
|
+ if ( levels[ i ].distance === distance ) {
|
|
|
+
|
|
|
+ const removedElements = levels.splice( i, 1 );
|
|
|
+ this.remove( removedElements[ 0 ].object );
|
|
|
+
|
|
|
+ return true;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
getCurrentLevel() {
|
|
|
|
|
|
return this._currentLevel;
|
|
|
@@ -34196,6 +34239,42 @@ class BatchedMesh extends Mesh {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ setGeometryIdAt( instanceId, geometryId ) {
|
|
|
+
|
|
|
+ // return early if the geometry is out of range or not active
|
|
|
+ const drawInfo = this._drawInfo;
|
|
|
+ if ( instanceId >= drawInfo.length || drawInfo[ instanceId ].active === false ) {
|
|
|
+
|
|
|
+ return null;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // check if the provided geometryId is within the valid range
|
|
|
+ if ( geometryId < 0 || geometryId >= this._geometryCount ) {
|
|
|
+
|
|
|
+ return null;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ drawInfo[ instanceId ].geometryIndex = geometryId;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ getGeometryIdAt( instanceId ) {
|
|
|
+
|
|
|
+ const drawInfo = this._drawInfo;
|
|
|
+ if ( instanceId >= drawInfo.length || drawInfo[ instanceId ].active === false ) {
|
|
|
+
|
|
|
+ return - 1;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return drawInfo[ instanceId ].geometryIndex;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
raycast( raycaster, intersects ) {
|
|
|
|
|
|
const drawInfo = this._drawInfo;
|
|
|
@@ -48213,7 +48292,7 @@ class Audio extends Object3D {
|
|
|
|
|
|
}
|
|
|
|
|
|
- stop() {
|
|
|
+ stop( delay = 0 ) {
|
|
|
|
|
|
if ( this.hasPlaybackControl === false ) {
|
|
|
|
|
|
@@ -48226,7 +48305,7 @@ class Audio extends Object3D {
|
|
|
|
|
|
if ( this.source !== null ) {
|
|
|
|
|
|
- this.source.stop();
|
|
|
+ this.source.stop( this.context.currentTime + delay );
|
|
|
this.source.onended = null;
|
|
|
|
|
|
}
|
|
|
@@ -53868,7 +53947,7 @@ class ShapePath {
|
|
|
|
|
|
class Controls extends EventDispatcher {
|
|
|
|
|
|
- constructor( object, domElement ) {
|
|
|
+ constructor( object, domElement = null ) {
|
|
|
|
|
|
super();
|
|
|
|