|
@@ -7,7 +7,7 @@
|
|
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {}));
|
|
|
-}(this, (function (exports) { 'use strict';
|
|
|
+})(this, (function (exports) { 'use strict';
|
|
|
|
|
|
const REVISION = '134dev';
|
|
|
const MOUSE = {
|
|
@@ -11822,8 +11822,9 @@
|
|
|
|
|
|
_textureToCubeUV(texture, cubeUVRenderTarget) {
|
|
|
const renderer = this._renderer;
|
|
|
+ const isCubeTexture = texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping;
|
|
|
|
|
|
- if (texture.isCubeTexture) {
|
|
|
+ if (isCubeTexture) {
|
|
|
if (this._cubemapShader == null) {
|
|
|
this._cubemapShader = _getCubemapShader();
|
|
|
}
|
|
@@ -11833,12 +11834,12 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const material = texture.isCubeTexture ? this._cubemapShader : this._equirectShader;
|
|
|
+ const material = isCubeTexture ? this._cubemapShader : this._equirectShader;
|
|
|
const mesh = new Mesh(_lodPlanes[0], material);
|
|
|
const uniforms = material.uniforms;
|
|
|
uniforms['envMap'].value = texture;
|
|
|
|
|
|
- if (!texture.isCubeTexture) {
|
|
|
+ if (!isCubeTexture) {
|
|
|
uniforms['texelSize'].value.set(1.0 / texture.image.width, 1.0 / texture.image.height);
|
|
|
}
|
|
|
|
|
@@ -20131,6 +20132,8 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ WebGLRenderer.prototype.isWebGLRenderer = true;
|
|
|
+
|
|
|
class WebGL1Renderer extends WebGLRenderer {}
|
|
|
|
|
|
WebGL1Renderer.prototype.isWebGL1Renderer = true;
|
|
@@ -28305,21 +28308,24 @@
|
|
|
const image = createElementNS('img');
|
|
|
|
|
|
function onImageLoad() {
|
|
|
- image.removeEventListener('load', onImageLoad, false);
|
|
|
- image.removeEventListener('error', onImageError, false);
|
|
|
+ removeEventListeners();
|
|
|
Cache.add(url, this);
|
|
|
if (onLoad) onLoad(this);
|
|
|
scope.manager.itemEnd(url);
|
|
|
}
|
|
|
|
|
|
function onImageError(event) {
|
|
|
- image.removeEventListener('load', onImageLoad, false);
|
|
|
- image.removeEventListener('error', onImageError, false);
|
|
|
+ removeEventListeners();
|
|
|
if (onError) onError(event);
|
|
|
scope.manager.itemError(url);
|
|
|
scope.manager.itemEnd(url);
|
|
|
}
|
|
|
|
|
|
+ function removeEventListeners() {
|
|
|
+ image.removeEventListener('load', onImageLoad, false);
|
|
|
+ image.removeEventListener('error', onImageError, false);
|
|
|
+ }
|
|
|
+
|
|
|
image.addEventListener('load', onImageLoad, false);
|
|
|
image.addEventListener('error', onImageError, false);
|
|
|
|
|
@@ -33620,15 +33626,15 @@
|
|
|
// TODO: delete this comment?
|
|
|
const distanceGeometry = new THREE.IcosahedronBufferGeometry( 1, 2 );
|
|
|
const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );
|
|
|
- this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
|
|
|
+ this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
|
|
|
this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );
|
|
|
- const d = light.distance;
|
|
|
- if ( d === 0.0 ) {
|
|
|
- this.lightDistance.visible = false;
|
|
|
- } else {
|
|
|
- this.lightDistance.scale.set( d, d, d );
|
|
|
- }
|
|
|
- this.add( this.lightDistance );
|
|
|
+ const d = light.distance;
|
|
|
+ if ( d === 0.0 ) {
|
|
|
+ this.lightDistance.visible = false;
|
|
|
+ } else {
|
|
|
+ this.lightDistance.scale.set( d, d, d );
|
|
|
+ }
|
|
|
+ this.add( this.lightDistance );
|
|
|
*/
|
|
|
}
|
|
|
|
|
@@ -33645,12 +33651,12 @@
|
|
|
}
|
|
|
/*
|
|
|
const d = this.light.distance;
|
|
|
- if ( d === 0.0 ) {
|
|
|
- this.lightDistance.visible = false;
|
|
|
- } else {
|
|
|
- this.lightDistance.visible = true;
|
|
|
+ if ( d === 0.0 ) {
|
|
|
+ this.lightDistance.visible = false;
|
|
|
+ } else {
|
|
|
+ this.lightDistance.visible = true;
|
|
|
this.lightDistance.scale.set( d, d, d );
|
|
|
- }
|
|
|
+ }
|
|
|
*/
|
|
|
|
|
|
}
|
|
@@ -34049,7 +34055,7 @@
|
|
|
1/___0/|
|
|
|
| 6__|_7
|
|
|
2/___3/
|
|
|
- 0: max.x, max.y, max.z
|
|
|
+ 0: max.x, max.y, max.z
|
|
|
1: min.x, max.y, max.z
|
|
|
2: min.x, min.y, max.z
|
|
|
3: max.x, min.y, max.z
|
|
@@ -36298,4 +36304,4 @@
|
|
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
|
|
-})));
|
|
|
+}));
|