|
|
@@ -5,7 +5,7 @@
|
|
|
*/
|
|
|
'use strict';
|
|
|
|
|
|
-const REVISION = '177';
|
|
|
+const REVISION = '178';
|
|
|
|
|
|
/**
|
|
|
* Represents mouse buttons and interaction types in context of controls.
|
|
|
@@ -1619,8 +1619,8 @@ const InterpolationSamplingMode = {
|
|
|
NORMAL: 'normal',
|
|
|
CENTROID: 'centroid',
|
|
|
SAMPLE: 'sample',
|
|
|
- FLAT_FIRST: 'flat first',
|
|
|
- FLAT_EITHER: 'flat either'
|
|
|
+ FIRST: 'first',
|
|
|
+ EITHER: 'either'
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
@@ -3869,7 +3869,7 @@ class Quaternion {
|
|
|
|
|
|
let r = vFrom.dot( vTo ) + 1;
|
|
|
|
|
|
- if ( r < Number.EPSILON ) {
|
|
|
+ if ( r < 1e-8 ) { // the epsilon value has been discussed in #31286
|
|
|
|
|
|
// vFrom and vTo point in opposite directions
|
|
|
|
|
|
@@ -13190,7 +13190,7 @@ const _removedEvent = { type: 'removed' };
|
|
|
const _childaddedEvent = { type: 'childadded', child: null };
|
|
|
|
|
|
/**
|
|
|
- * Fires when a new child object has been added.
|
|
|
+ * Fires when a child object has been removed.
|
|
|
*
|
|
|
* @event Object3D#childremoved
|
|
|
* @type {Object}
|
|
|
@@ -17786,7 +17786,7 @@ class BufferAttribute {
|
|
|
/**
|
|
|
* Applies to integer data only. Indicates how the underlying data in the buffer maps to
|
|
|
* the values in the GLSL code. For instance, if `array` is an instance of `UInt16Array`,
|
|
|
- * and `normalized` is `true`, the values `0 -+65535` in the array data will be mapped to
|
|
|
+ * and `normalized` is `true`, the values `0 - +65535` in the array data will be mapped to
|
|
|
* `0.0f - +1.0f` in the GLSL attribute. If `normalized` is `false`, the values will be converted
|
|
|
* to floats unmodified, i.e. `65535` becomes `65535.0f`.
|
|
|
*
|
|
|
@@ -18539,8 +18539,8 @@ class Uint32BufferAttribute extends BufferAttribute {
|
|
|
* Convenient class that can be used when creating a `Float16` buffer attribute with
|
|
|
* a plain `Array` instance.
|
|
|
*
|
|
|
- * This class automatically converts to and from FP16 since `Float16Array` is not
|
|
|
- * natively supported in JavaScript.
|
|
|
+ * This class automatically converts to and from FP16 via `Uint16Array` since `Float16Array`
|
|
|
+ * browser support is still problematic.
|
|
|
*
|
|
|
* @augments BufferAttribute
|
|
|
*/
|
|
|
@@ -26306,6 +26306,7 @@ class Plane {
|
|
|
}
|
|
|
|
|
|
const _sphere$3 = /*@__PURE__*/ new Sphere();
|
|
|
+const _defaultSpriteCenter = /*@__PURE__*/ new Vector2( 0.5, 0.5 );
|
|
|
const _vector$6 = /*@__PURE__*/ new Vector3();
|
|
|
|
|
|
/**
|
|
|
@@ -26463,7 +26464,10 @@ class Frustum {
|
|
|
intersectsSprite( sprite ) {
|
|
|
|
|
|
_sphere$3.center.set( 0, 0, 0 );
|
|
|
- _sphere$3.radius = 0.7071067811865476;
|
|
|
+
|
|
|
+ const offset = _defaultSpriteCenter.distanceTo( sprite.center );
|
|
|
+
|
|
|
+ _sphere$3.radius = 0.7071067811865476 + offset;
|
|
|
_sphere$3.applyMatrix4( sprite.matrixWorld );
|
|
|
|
|
|
return this.intersectsSphere( _sphere$3 );
|
|
|
@@ -33896,11 +33900,11 @@ class Path extends CurvePath {
|
|
|
* Adds an arc as an instance of {@link EllipseCurve} to the path, positioned relative
|
|
|
* to the current point.
|
|
|
*
|
|
|
- * @param {number} aX - The x coordinate of the center of the arc offsetted from the previous curve.
|
|
|
- * @param {number} aY - The y coordinate of the center of the arc offsetted from the previous curve.
|
|
|
- * @param {number} aRadius - The radius of the arc.
|
|
|
- * @param {number} aStartAngle - The start angle in radians.
|
|
|
- * @param {number} aEndAngle - The end angle in radians.
|
|
|
+ * @param {number} [aX=0] - The x coordinate of the center of the arc offsetted from the previous curve.
|
|
|
+ * @param {number} [aY=0] - The y coordinate of the center of the arc offsetted from the previous curve.
|
|
|
+ * @param {number} [aRadius=1] - The radius of the arc.
|
|
|
+ * @param {number} [aStartAngle=0] - The start angle in radians.
|
|
|
+ * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians.
|
|
|
* @param {boolean} [aClockwise=false] - Whether to sweep the arc clockwise or not.
|
|
|
* @return {Path} A reference to this path.
|
|
|
*/
|
|
|
@@ -33919,11 +33923,11 @@ class Path extends CurvePath {
|
|
|
/**
|
|
|
* Adds an absolutely positioned arc as an instance of {@link EllipseCurve} to the path.
|
|
|
*
|
|
|
- * @param {number} aX - The x coordinate of the center of the arc.
|
|
|
- * @param {number} aY - The y coordinate of the center of the arc.
|
|
|
- * @param {number} aRadius - The radius of the arc.
|
|
|
- * @param {number} aStartAngle - The start angle in radians.
|
|
|
- * @param {number} aEndAngle - The end angle in radians.
|
|
|
+ * @param {number} [aX=0] - The x coordinate of the center of the arc.
|
|
|
+ * @param {number} [aY=0] - The y coordinate of the center of the arc.
|
|
|
+ * @param {number} [aRadius=1] - The radius of the arc.
|
|
|
+ * @param {number} [aStartAngle=0] - The start angle in radians.
|
|
|
+ * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians.
|
|
|
* @param {boolean} [aClockwise=false] - Whether to sweep the arc clockwise or not.
|
|
|
* @return {Path} A reference to this path.
|
|
|
*/
|
|
|
@@ -33939,12 +33943,12 @@ class Path extends CurvePath {
|
|
|
* Adds an ellipse as an instance of {@link EllipseCurve} to the path, positioned relative
|
|
|
* to the current point
|
|
|
*
|
|
|
- * @param {number} aX - The x coordinate of the center of the ellipse offsetted from the previous curve.
|
|
|
- * @param {number} aY - The y coordinate of the center of the ellipse offsetted from the previous curve.
|
|
|
- * @param {number} xRadius - The radius of the ellipse in the x axis.
|
|
|
- * @param {number} yRadius - The radius of the ellipse in the y axis.
|
|
|
- * @param {number} aStartAngle - The start angle in radians.
|
|
|
- * @param {number} aEndAngle - The end angle in radians.
|
|
|
+ * @param {number} [aX=0] - The x coordinate of the center of the ellipse offsetted from the previous curve.
|
|
|
+ * @param {number} [aY=0] - The y coordinate of the center of the ellipse offsetted from the previous curve.
|
|
|
+ * @param {number} [xRadius=1] - The radius of the ellipse in the x axis.
|
|
|
+ * @param {number} [yRadius=1] - The radius of the ellipse in the y axis.
|
|
|
+ * @param {number} [aStartAngle=0] - The start angle in radians.
|
|
|
+ * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians.
|
|
|
* @param {boolean} [aClockwise=false] - Whether to sweep the ellipse clockwise or not.
|
|
|
* @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis.
|
|
|
* @return {Path} A reference to this path.
|
|
|
@@ -33963,12 +33967,12 @@ class Path extends CurvePath {
|
|
|
/**
|
|
|
* Adds an absolutely positioned ellipse as an instance of {@link EllipseCurve} to the path.
|
|
|
*
|
|
|
- * @param {number} aX - The x coordinate of the absolute center of the ellipse.
|
|
|
- * @param {number} aY - The y coordinate of the absolute center of the ellipse.
|
|
|
- * @param {number} xRadius - The radius of the ellipse in the x axis.
|
|
|
- * @param {number} yRadius - The radius of the ellipse in the y axis.
|
|
|
- * @param {number} aStartAngle - The start angle in radians.
|
|
|
- * @param {number} aEndAngle - The end angle in radians.
|
|
|
+ * @param {number} [aX=0] - The x coordinate of the absolute center of the ellipse.
|
|
|
+ * @param {number} [aY=0] - The y coordinate of the absolute center of the ellipse.
|
|
|
+ * @param {number} [xRadius=1] - The radius of the ellipse in the x axis.
|
|
|
+ * @param {number} [yRadius=1] - The radius of the ellipse in the y axis.
|
|
|
+ * @param {number} [aStartAngle=0] - The start angle in radians.
|
|
|
+ * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians.
|
|
|
* @param {boolean} [aClockwise=false] - Whether to sweep the ellipse clockwise or not.
|
|
|
* @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis.
|
|
|
* @return {Path} A reference to this path.
|
|
|
@@ -43788,7 +43792,7 @@ class FileLoader extends Loader {
|
|
|
|
|
|
url = this.manager.resolveURL( url );
|
|
|
|
|
|
- const cached = Cache.get( url );
|
|
|
+ const cached = Cache.get( `file:${url}` );
|
|
|
|
|
|
if ( cached !== undefined ) {
|
|
|
|
|
|
@@ -43977,7 +43981,7 @@ class FileLoader extends Loader {
|
|
|
|
|
|
// Add to cache only on HTTP success, so that we do not cache
|
|
|
// error response bodies as proper responses to requests.
|
|
|
- Cache.add( url, data );
|
|
|
+ Cache.add( `file:${url}`, data );
|
|
|
|
|
|
const callbacks = loading[ url ];
|
|
|
delete loading[ url ];
|
|
|
@@ -44293,6 +44297,8 @@ class CompressedTextureLoader extends Loader {
|
|
|
|
|
|
}
|
|
|
|
|
|
+const _loading = new WeakMap();
|
|
|
+
|
|
|
/**
|
|
|
* A loader for loading images. The class loads images with the HTML `Image` API.
|
|
|
*
|
|
|
@@ -44339,19 +44345,36 @@ class ImageLoader extends Loader {
|
|
|
|
|
|
const scope = this;
|
|
|
|
|
|
- const cached = Cache.get( url );
|
|
|
+ const cached = Cache.get( `image:${url}` );
|
|
|
|
|
|
if ( cached !== undefined ) {
|
|
|
|
|
|
- scope.manager.itemStart( url );
|
|
|
+ if ( cached.complete === true ) {
|
|
|
|
|
|
- setTimeout( function () {
|
|
|
+ scope.manager.itemStart( url );
|
|
|
|
|
|
- if ( onLoad ) onLoad( cached );
|
|
|
+ setTimeout( function () {
|
|
|
|
|
|
- scope.manager.itemEnd( url );
|
|
|
+ if ( onLoad ) onLoad( cached );
|
|
|
|
|
|
- }, 0 );
|
|
|
+ scope.manager.itemEnd( url );
|
|
|
+
|
|
|
+ }, 0 );
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ let arr = _loading.get( cached );
|
|
|
+
|
|
|
+ if ( arr === undefined ) {
|
|
|
+
|
|
|
+ arr = [];
|
|
|
+ _loading.set( cached, arr );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ arr.push( { onLoad, onError } );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
return cached;
|
|
|
|
|
|
@@ -44363,10 +44386,21 @@ class ImageLoader extends Loader {
|
|
|
|
|
|
removeEventListeners();
|
|
|
|
|
|
- Cache.add( url, this );
|
|
|
-
|
|
|
if ( onLoad ) onLoad( this );
|
|
|
|
|
|
+ //
|
|
|
+
|
|
|
+ const callbacks = _loading.get( this ) || [];
|
|
|
+
|
|
|
+ for ( let i = 0; i < callbacks.length; i ++ ) {
|
|
|
+
|
|
|
+ const callback = callbacks[ i ];
|
|
|
+ if ( callback.onLoad ) callback.onLoad( this );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ _loading.delete( this );
|
|
|
+
|
|
|
scope.manager.itemEnd( url );
|
|
|
|
|
|
}
|
|
|
@@ -44377,6 +44411,22 @@ class ImageLoader extends Loader {
|
|
|
|
|
|
if ( onError ) onError( event );
|
|
|
|
|
|
+ Cache.remove( `image:${url}` );
|
|
|
+
|
|
|
+ //
|
|
|
+
|
|
|
+ const callbacks = _loading.get( this ) || [];
|
|
|
+
|
|
|
+ for ( let i = 0; i < callbacks.length; i ++ ) {
|
|
|
+
|
|
|
+ const callback = callbacks[ i ];
|
|
|
+ if ( callback.onError ) callback.onError( event );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ _loading.delete( this );
|
|
|
+
|
|
|
+
|
|
|
scope.manager.itemError( url );
|
|
|
scope.manager.itemEnd( url );
|
|
|
|
|
|
@@ -44398,6 +44448,7 @@ class ImageLoader extends Loader {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ Cache.add( `image:${url}`, image );
|
|
|
scope.manager.itemStart( url );
|
|
|
|
|
|
image.src = url;
|
|
|
@@ -48640,7 +48691,7 @@ class ImageBitmapLoader extends Loader {
|
|
|
|
|
|
const scope = this;
|
|
|
|
|
|
- const cached = Cache.get( url );
|
|
|
+ const cached = Cache.get( `image-bitmap:${url}` );
|
|
|
|
|
|
if ( cached !== undefined ) {
|
|
|
|
|
|
@@ -48703,7 +48754,7 @@ class ImageBitmapLoader extends Loader {
|
|
|
|
|
|
} ).then( function ( imageBitmap ) {
|
|
|
|
|
|
- Cache.add( url, imageBitmap );
|
|
|
+ Cache.add( `image-bitmap:${url}`, imageBitmap );
|
|
|
|
|
|
if ( onLoad ) onLoad( imageBitmap );
|
|
|
|
|
|
@@ -48717,14 +48768,14 @@ class ImageBitmapLoader extends Loader {
|
|
|
|
|
|
_errorMap.set( promise, e );
|
|
|
|
|
|
- Cache.remove( url );
|
|
|
+ Cache.remove( `image-bitmap:${url}` );
|
|
|
|
|
|
scope.manager.itemError( url );
|
|
|
scope.manager.itemEnd( url );
|
|
|
|
|
|
} );
|
|
|
|
|
|
- Cache.add( url, promise );
|
|
|
+ Cache.add( `image-bitmap:${url}`, promise );
|
|
|
scope.manager.itemStart( url );
|
|
|
|
|
|
}
|
|
|
@@ -49116,7 +49167,7 @@ class Clock {
|
|
|
*/
|
|
|
start() {
|
|
|
|
|
|
- this.startTime = now();
|
|
|
+ this.startTime = performance.now();
|
|
|
|
|
|
this.oldTime = this.startTime;
|
|
|
this.elapsedTime = 0;
|
|
|
@@ -49165,7 +49216,7 @@ class Clock {
|
|
|
|
|
|
if ( this.running ) {
|
|
|
|
|
|
- const newTime = now();
|
|
|
+ const newTime = performance.now();
|
|
|
|
|
|
diff = ( newTime - this.oldTime ) / 1000;
|
|
|
this.oldTime = newTime;
|
|
|
@@ -49180,12 +49231,6 @@ class Clock {
|
|
|
|
|
|
}
|
|
|
|
|
|
-function now() {
|
|
|
-
|
|
|
- return performance.now();
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
const _position$1 = /*@__PURE__*/ new Vector3();
|
|
|
const _quaternion$1 = /*@__PURE__*/ new Quaternion();
|
|
|
const _scale$1 = /*@__PURE__*/ new Vector3();
|
|
|
@@ -54221,8 +54266,9 @@ class GLBufferAttribute {
|
|
|
* @param {number} itemSize - The item size.
|
|
|
* @param {number} elementSize - The corresponding size (in bytes) for the given `type` parameter.
|
|
|
* @param {number} count - The expected number of vertices in VBO.
|
|
|
+ * @param {boolean} [normalized=false] - Whether the data are normalized or not.
|
|
|
*/
|
|
|
- constructor( buffer, type, itemSize, elementSize, count ) {
|
|
|
+ constructor( buffer, type, itemSize, elementSize, count, normalized = false ) {
|
|
|
|
|
|
/**
|
|
|
* This flag can be used for type testing.
|
|
|
@@ -54275,6 +54321,17 @@ class GLBufferAttribute {
|
|
|
*/
|
|
|
this.count = count;
|
|
|
|
|
|
+ /**
|
|
|
+ * Applies to integer data only. Indicates how the underlying data in the buffer maps to
|
|
|
+ * the values in the GLSL code. For instance, if `buffer` contains data of `gl.UNSIGNED_SHORT`,
|
|
|
+ * and `normalized` is `true`, the values `0 - +65535` in the buffer data will be mapped to
|
|
|
+ * `0.0f - +1.0f` in the GLSL attribute. If `normalized` is `false`, the values will be converted
|
|
|
+ * to floats unmodified, i.e. `65535` becomes `65535.0f`.
|
|
|
+ *
|
|
|
+ * @type {boolean}
|
|
|
+ */
|
|
|
+ this.normalized = normalized;
|
|
|
+
|
|
|
/**
|
|
|
* A version number, incremented every time the `needsUpdate` is set to `true`.
|
|
|
*
|
|
|
@@ -56690,34 +56747,34 @@ class CameraHelper extends LineSegments {
|
|
|
|
|
|
// near
|
|
|
|
|
|
- setPoint( 'n1', pointMap, geometry, _camera, -1, -1, nearZ );
|
|
|
- setPoint( 'n2', pointMap, geometry, _camera, w, -1, nearZ );
|
|
|
- setPoint( 'n3', pointMap, geometry, _camera, -1, h, nearZ );
|
|
|
+ setPoint( 'n1', pointMap, geometry, _camera, - w, - h, nearZ );
|
|
|
+ setPoint( 'n2', pointMap, geometry, _camera, w, - h, nearZ );
|
|
|
+ setPoint( 'n3', pointMap, geometry, _camera, - w, h, nearZ );
|
|
|
setPoint( 'n4', pointMap, geometry, _camera, w, h, nearZ );
|
|
|
|
|
|
// far
|
|
|
|
|
|
- setPoint( 'f1', pointMap, geometry, _camera, -1, -1, 1 );
|
|
|
- setPoint( 'f2', pointMap, geometry, _camera, w, -1, 1 );
|
|
|
- setPoint( 'f3', pointMap, geometry, _camera, -1, h, 1 );
|
|
|
+ setPoint( 'f1', pointMap, geometry, _camera, - w, - h, 1 );
|
|
|
+ setPoint( 'f2', pointMap, geometry, _camera, w, - h, 1 );
|
|
|
+ setPoint( 'f3', pointMap, geometry, _camera, - w, h, 1 );
|
|
|
setPoint( 'f4', pointMap, geometry, _camera, w, h, 1 );
|
|
|
|
|
|
// up
|
|
|
|
|
|
setPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, nearZ );
|
|
|
- setPoint( 'u2', pointMap, geometry, _camera, -1 * 0.7, h * 1.1, nearZ );
|
|
|
+ setPoint( 'u2', pointMap, geometry, _camera, - w * 0.7, h * 1.1, nearZ );
|
|
|
setPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, nearZ );
|
|
|
|
|
|
// cross
|
|
|
|
|
|
- setPoint( 'cf1', pointMap, geometry, _camera, -1, 0, 1 );
|
|
|
+ setPoint( 'cf1', pointMap, geometry, _camera, - w, 0, 1 );
|
|
|
setPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 );
|
|
|
- setPoint( 'cf3', pointMap, geometry, _camera, 0, -1, 1 );
|
|
|
+ setPoint( 'cf3', pointMap, geometry, _camera, 0, - h, 1 );
|
|
|
setPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 );
|
|
|
|
|
|
- setPoint( 'cn1', pointMap, geometry, _camera, -1, 0, nearZ );
|
|
|
+ setPoint( 'cn1', pointMap, geometry, _camera, - w, 0, nearZ );
|
|
|
setPoint( 'cn2', pointMap, geometry, _camera, w, 0, nearZ );
|
|
|
- setPoint( 'cn3', pointMap, geometry, _camera, 0, -1, nearZ );
|
|
|
+ setPoint( 'cn3', pointMap, geometry, _camera, 0, - h, nearZ );
|
|
|
setPoint( 'cn4', pointMap, geometry, _camera, 0, h, nearZ );
|
|
|
|
|
|
geometry.getAttribute( 'position' ).needsUpdate = true;
|
|
|
@@ -58174,6 +58231,10 @@ function WebGLAttributes( gl ) {
|
|
|
|
|
|
type = gl.FLOAT;
|
|
|
|
|
|
+ } else if ( typeof Float16Array !== 'undefined' && array instanceof Float16Array ) {
|
|
|
+
|
|
|
+ type = gl.HALF_FLOAT;
|
|
|
+
|
|
|
} else if ( array instanceof Uint16Array ) {
|
|
|
|
|
|
if ( attribute.isFloat16BufferAttribute ) {
|
|
|
@@ -65151,7 +65212,7 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
useFog: material.fog === true,
|
|
|
fogExp2: ( !! fog && fog.isFogExp2 ),
|
|
|
|
|
|
- flatShading: material.flatShading === true,
|
|
|
+ flatShading: ( material.flatShading === true && material.wireframe === false ),
|
|
|
|
|
|
sizeAttenuation: material.sizeAttenuation === true,
|
|
|
logarithmicDepthBuffer: logarithmicDepthBuffer,
|
|
|
@@ -65364,6 +65425,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
_programLayers.enable( 20 );
|
|
|
if ( parameters.batchingColor )
|
|
|
_programLayers.enable( 21 );
|
|
|
+ if ( parameters.gradientMap )
|
|
|
+ _programLayers.enable( 22 );
|
|
|
|
|
|
array.push( _programLayers.mask );
|
|
|
_programLayers.disableAll();
|
|
|
@@ -67545,7 +67608,7 @@ function WebGLState( gl, extensions ) {
|
|
|
break;
|
|
|
|
|
|
case MultiplyBlending:
|
|
|
- gl.blendFuncSeparate( gl.ZERO, gl.SRC_COLOR, gl.ZERO, gl.SRC_ALPHA );
|
|
|
+ gl.blendFuncSeparate( gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA, gl.ZERO, gl.ONE );
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
@@ -67563,15 +67626,15 @@ function WebGLState( gl, extensions ) {
|
|
|
break;
|
|
|
|
|
|
case AdditiveBlending:
|
|
|
- gl.blendFunc( gl.SRC_ALPHA, gl.ONE );
|
|
|
+ gl.blendFuncSeparate( gl.SRC_ALPHA, gl.ONE, gl.ONE, gl.ONE );
|
|
|
break;
|
|
|
|
|
|
case SubtractiveBlending:
|
|
|
- gl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE );
|
|
|
+ console.error( 'THREE.WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true' );
|
|
|
break;
|
|
|
|
|
|
case MultiplyBlending:
|
|
|
- gl.blendFunc( gl.ZERO, gl.SRC_COLOR );
|
|
|
+ console.error( 'THREE.WebGLState: MultiplyBlending requires material.premultipliedAlpha = true' );
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
@@ -74706,6 +74769,9 @@ class WebGLRenderer {
|
|
|
//
|
|
|
|
|
|
const currentRenderTarget = _this.getRenderTarget();
|
|
|
+ const currentActiveCubeFace = _this.getActiveCubeFace();
|
|
|
+ const currentActiveMipmapLevel = _this.getActiveMipmapLevel();
|
|
|
+
|
|
|
_this.setRenderTarget( transmissionRenderTarget );
|
|
|
|
|
|
_this.getClearColor( _currentClearColor );
|
|
|
@@ -74775,7 +74841,7 @@ class WebGLRenderer {
|
|
|
|
|
|
}
|
|
|
|
|
|
- _this.setRenderTarget( currentRenderTarget );
|
|
|
+ _this.setRenderTarget( currentRenderTarget, currentActiveCubeFace, currentActiveMipmapLevel );
|
|
|
|
|
|
_this.setClearColor( _currentClearColor, _currentClearAlpha );
|
|
|
|
|
|
@@ -75705,7 +75771,7 @@ class WebGLRenderer {
|
|
|
|
|
|
if ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) {
|
|
|
|
|
|
- // when using MRT, select the corect color buffer for the subsequent read command
|
|
|
+ // when using MRT, select the correct color buffer for the subsequent read command
|
|
|
|
|
|
if ( renderTarget.textures.length > 1 ) _gl.readBuffer( _gl.COLOR_ATTACHMENT0 + textureIndex );
|
|
|
|