diff --git a/README.md b/README.md
index 68001e39..f2d2ac63 100644
--- a/README.md
+++ b/README.md
@@ -3,13 +3,13 @@
## A Three.js wrapper for GWT
# Maven
-Current Version 0.104, implements 0.104 version of three.js
+Current Version 0.105, implements 0.105 version of three.js
```xml
- *
* @param focalLength By default, the focal length is specified for a 35mm (full frame) camera.
*/
public native void setFocalLength(float focalLength);
@@ -190,13 +184,12 @@ public PerspectiveCamera(float fov, float aspect, float near, float far) {
* camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );
* // F
* camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h ); Note there is no reason monitors have to be the same size or in a grid.
- *
- * @param fullWidth — full width of multiview setup
+ * @param fullWidth — full width of multiview setup
* @param fullHeight — full height of multiview setup
- * @param x — horizontal offset of subcamera
- * @param y — vertical offset of subcamera
- * @param width — width of subcamera
- * @param height — height of subcamera
+ * @param x — horizontal offset of subcamera
+ * @param y — vertical offset of subcamera
+ * @param width — width of subcamera
+ * @param height — height of subcamera
*/
public native void setViewOffset(float fullWidth, float fullHeight, float x, float y, float width, float height);
@@ -207,7 +200,6 @@ public PerspectiveCamera(float fov, float aspect, float near, float far) {
/**
* Return camera data in JSON format.
- *
* @return String
*/
public native String toJSON();
diff --git a/core/src/main/java/org/treblereel/gwt/three4g/core/BufferAttribute.java b/core/src/main/java/org/treblereel/gwt/three4g/core/BufferAttribute.java
index 0c4a19b3..eb30fb60 100644
--- a/core/src/main/java/org/treblereel/gwt/three4g/core/BufferAttribute.java
+++ b/core/src/main/java/org/treblereel/gwt/three4g/core/BufferAttribute.java
@@ -430,4 +430,11 @@ public BufferAttribute(TypedArray array, int itemSize, boolean normalized) {
*/
public native T setXYZW(int index, V x, V y, V z, V w);
+ /**
+ * Return BufferAttribute data in JSON format.
+ *
+ * @return String
+ */
+ public native String toJSON();
+
}
diff --git a/core/src/main/java/org/treblereel/gwt/three4g/core/InstancedBufferGeometry.java b/core/src/main/java/org/treblereel/gwt/three4g/core/InstancedBufferGeometry.java
index df09f2d8..acb6076f 100644
--- a/core/src/main/java/org/treblereel/gwt/three4g/core/InstancedBufferGeometry.java
+++ b/core/src/main/java/org/treblereel/gwt/three4g/core/InstancedBufferGeometry.java
@@ -21,5 +21,10 @@ public class InstancedBufferGeometry extends BufferGeometry {
*/
public boolean isInstancedBufferGeometry;
-
+ /**
+ * Return InstancedBufferGeometry data in JSON format.
+ *
+ * @return String
+ */
+ public native String toJSON();
}
diff --git a/core/src/main/java/org/treblereel/gwt/three4g/core/Object3D.java b/core/src/main/java/org/treblereel/gwt/three4g/core/Object3D.java
index 043bdb75..3f00207a 100644
--- a/core/src/main/java/org/treblereel/gwt/three4g/core/Object3D.java
+++ b/core/src/main/java/org/treblereel/gwt/three4g/core/Object3D.java
@@ -193,6 +193,13 @@ public Object3D() {
*/
public native void applyQuaternion(Quaternion quaternion);
+ /**
+ * Adds object as a child of this, while maintaining the object's world transform.
+ * @param object3D an Object3D
+ * @return this instance of Object3D
+ */
+ public native Object3D attach(Object3D object3D);
+
/**
* Returns a clone of this object and optionally all descendants.
*
diff --git a/core/src/main/java/org/treblereel/gwt/three4g/math/Matrix4.java b/core/src/main/java/org/treblereel/gwt/three4g/math/Matrix4.java
index 1bb58dc8..f25e30a1 100644
--- a/core/src/main/java/org/treblereel/gwt/three4g/math/Matrix4.java
+++ b/core/src/main/java/org/treblereel/gwt/three4g/math/Matrix4.java
@@ -448,6 +448,27 @@ public Matrix4(){
*/
public native Matrix4 setPosition(Vector3 v);
+ /**
+ * Sets the position component for this matrix from vector v, without affecting the rest of the matrix - i.e. if the matrix is currently:
+ * a, b, c, d,
+ * e, f, g, h,
+ * i, j, k, l,
+ * m, n, o, p
+ *
+ * This becomes:
+ * a, b, c, v.x,
+ * e, f, g, v.y,
+ * i, j, k, v.z,
+ * m, n, o, p
+ *
+ * @param x float value
+ * @param y float value
+ * @param z float value
+ * @return instance of Matrix4
+ */
+ public native Matrix4 setPosition(float x, float y, float z);
+
+
/**
* Writes the elements of this matrix to an array in column-major format.
*
diff --git a/core/src/main/java/org/treblereel/gwt/three4g/math/SphericalHarmonics3.java b/core/src/main/java/org/treblereel/gwt/three4g/math/SphericalHarmonics3.java
index 4e76a562..cd5b93bb 100644
--- a/core/src/main/java/org/treblereel/gwt/three4g/math/SphericalHarmonics3.java
+++ b/core/src/main/java/org/treblereel/gwt/three4g/math/SphericalHarmonics3.java
@@ -1,10 +1,13 @@
package org.treblereel.gwt.three4g.math;
+import jsinterop.annotations.JsType;
+
/**
* Represents a third-order spherical harmonics (SH). Light probes use this class to encode lighting information.
* @author Dmitrii Tikhomirov
* Created by treblereel 6/28/20
*/
+@JsType(isNative = true, namespace = "THREE")
public class SphericalHarmonics3 {
/**
@@ -91,14 +94,14 @@ public class SphericalHarmonics3 {
/**
* Returns an array with the coefficients, or copies them into the provided array. The coefficients are represented as numbers.
- * @return
+ * @return instance of Vector3[]
*/
public native Vector3[] toArray();
/**
* Returns an array with the coefficients, or copies them into the provided array. The coefficients are represented as numbers.
* @param array - (optional) The target array.
- * @return
+ * @return instance of Vector3[]
*/
public native Vector3[] toArray(Vector3[] array);
@@ -106,7 +109,7 @@ public class SphericalHarmonics3 {
* Returns an array with the coefficients, or copies them into the provided array. The coefficients are represented as numbers.
* @param array - (optional) The target array.
* @param offset - (optional) The array offset.
- * @return
+ * @return instance of Vector3[]
*/
public native Vector3[] toArray(Vector3[] array, int offset);
diff --git a/core/src/main/java/org/treblereel/gwt/three4g/math/Triangle.java b/core/src/main/java/org/treblereel/gwt/three4g/math/Triangle.java
index 999da2be..29373307 100644
--- a/core/src/main/java/org/treblereel/gwt/three4g/math/Triangle.java
+++ b/core/src/main/java/org/treblereel/gwt/three4g/math/Triangle.java
@@ -4,7 +4,6 @@
/**
* A geometric triangle as defined by three Vector3s representing its three corners.
- *
* @author Dmitrii Tikhomirov
* Created by treblereel on 5/30/18.
*/
@@ -28,7 +27,6 @@ public class Triangle {
/**
* Creates a new Triangle.
- *
* @param a - the first corner of the triangle. Default is a Vector3 at (0, 0, 0).
* @param b - the second corner of the triangle. Default is a Vector3 at (0, 0, 0).
* @param c - the final corner of the triangle. Default is a Vector3 at (0, 0, 0).
@@ -37,13 +35,15 @@ public Triangle(Vector3 a, Vector3 b, Vector3 c) {
}
+ public native static boolean isFrontFacing(Vector3 a, Vector3 b, Vector3 c, Vector3 direction);
+
/**
* @return Returns a new triangle with the same a, b and c properties as this one.
*/
public native Triangle clone();
/**
- * @param point - Vector3
+ * @param point - Vector3
* @param target — the result will be copied into this Vector3.
* @return Returns the closest point on the triangle to point.
*/
@@ -57,7 +57,6 @@ public Triangle(Vector3 a, Vector3 b, Vector3 c) {
/**
* Copies the values of the passed triangles's a, b and c properties to this triangle.
- *
* @param triangle instance of Triangle
* @return instance of Triangle
*/
@@ -75,7 +74,7 @@ public Triangle(Vector3 a, Vector3 b, Vector3 c) {
public native float getArea();
/**
- * @param point - Vector3
+ * @param point - Vector3
* @param target — the result will be copied into this Vector3.
* @return Return a barycentric coordinate from the given vector.
*/
@@ -115,12 +114,13 @@ public Triangle(Vector3 a, Vector3 b, Vector3 c) {
/**
* Sets the triangle's vectors to the vectors in the array.
- *
* @param points - Array of Vector3s
- * @param i0 - Integer index
- * @param i1 - Integer index
- * @param i2 - Integer index
+ * @param i0 - Integer index
+ * @param i1 - Integer index
+ * @param i2 - Integer index
* @return instance of Triangle
*/
public native Triangle setFromPointsAndIndices(Vector3[] points, int i0, int i1, int i2);
+
+ public native boolean isFrontFacing(Vector3 direction);
}
diff --git a/core/src/main/java/org/treblereel/gwt/three4g/renderers/WebGLRenderer.java b/core/src/main/java/org/treblereel/gwt/three4g/renderers/WebGLRenderer.java
index e1412314..2b8a9872 100644
--- a/core/src/main/java/org/treblereel/gwt/three4g/renderers/WebGLRenderer.java
+++ b/core/src/main/java/org/treblereel/gwt/three4g/renderers/WebGLRenderer.java
@@ -499,6 +499,21 @@ public final double getHeight() {
* @param buffer instance of Uint8Array
*/
public native void readRenderTargetPixels(WebGLRenderTarget renderTarget, float x, float y, float width, float height, Uint8Array buffer);
+ /**
+ * Reads the pixel data from the renderTarget into the buffer you pass in. Buffer should be a Javascript Uint8Array
+ * instantiated with new Uint8Array( renderTargetWidth * renderTargetWidth * 4 ) to account for size and color information.
+ * This is a wrapper around gl.readPixels.
+ * See the interactive / cubes / gpu example.
+ * @param renderTarget instance of WebGLRenderTarget
+ * @param x as float
+ * @param y as float
+ * @param width as float
+ * @param height as float
+ * @param buffer instance of Uint8Array
+ * @param readRenderTargetPixels as int
+ */
+ public native void readRenderTargetPixels(WebGLRenderTarget renderTarget, float x, float y, float width, float height, Uint8Array buffer, int readRenderTargetPixels);
+
/**
* Render a scene using a camera.
diff --git a/core/src/main/java/org/treblereel/gwt/three4g/renderers/parameters/WebGLRendererParameters.java b/core/src/main/java/org/treblereel/gwt/three4g/renderers/parameters/WebGLRendererParameters.java
index 4b6d6766..2f8b7dc5 100644
--- a/core/src/main/java/org/treblereel/gwt/three4g/renderers/parameters/WebGLRendererParameters.java
+++ b/core/src/main/java/org/treblereel/gwt/three4g/renderers/parameters/WebGLRendererParameters.java
@@ -23,5 +23,6 @@ public class WebGLRendererParameters {
public String powerPreference; // Can be "high-performance", "low-power" or "default"
public boolean depth;
public boolean logarithmicDepthBuffer;
+ public boolean failIfMajorPerformanceCaveat;
}
diff --git a/core/src/main/java/org/treblereel/gwt/three4g/renderers/webvr/WebXRManager.java b/core/src/main/java/org/treblereel/gwt/three4g/renderers/webvr/WebXRManager.java
index b688d238..b52219fc 100644
--- a/core/src/main/java/org/treblereel/gwt/three4g/renderers/webvr/WebXRManager.java
+++ b/core/src/main/java/org/treblereel/gwt/three4g/renderers/webvr/WebXRManager.java
@@ -21,7 +21,7 @@ public class WebXRManager {
public boolean isPresenting;
- public String frameOfReferenceType;
+ public String referenceSpaceType;
public WebXRManager(WebGLRenderer renderer){
diff --git a/core/src/main/resources/org/treblereel/gwt/three4g/resources/js/three.js b/core/src/main/resources/org/treblereel/gwt/three4g/resources/js/three.js
index 1e35bfec..0119ed6d 100644
--- a/core/src/main/resources/org/treblereel/gwt/three4g/resources/js/three.js
+++ b/core/src/main/resources/org/treblereel/gwt/three4g/resources/js/three.js
@@ -185,7 +185,7 @@
} );
- var REVISION = '104';
+ var REVISION = '105';
var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
var CullFaceNone = 0;
var CullFaceBack = 1;
@@ -5589,13 +5589,23 @@
},
- setPosition: function ( v ) {
+ setPosition: function ( x, y, z ) {
var te = this.elements;
- te[ 12 ] = v.x;
- te[ 13 ] = v.y;
- te[ 14 ] = v.z;
+ if ( x.isVector3 ) {
+
+ te[ 12 ] = x.x;
+ te[ 13 ] = x.y;
+ te[ 14 ] = x.z;
+
+ } else {
+
+ te[ 12 ] = x;
+ te[ 13 ] = y;
+ te[ 14 ] = z;
+
+ }
return this;
@@ -6018,7 +6028,7 @@
var beginnormal_vertex = "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif";
- var bsdfs = "vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick( specularColor, dotNV );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}";
+ var bsdfs = "vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}";
var bumpmap_pars_fragment = "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif";
@@ -6090,7 +6100,7 @@
var lights_physical_fragment = "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif";
- var lights_physical_pars_fragment = "struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#endif\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\tfloat clearCoatInv = 1.0 - clearCoatDHR;\n\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec3 singleScattering = vec3( 0.0 );\n\t\tvec3 multiScattering = vec3( 0.0 );\n\t\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\t\tvec3 diffuse = material.diffuseColor;\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * singleScattering;\n\t\treflectedLight.indirectDiffuse += multiScattering * cosineWeightedIrradiance;\n\t\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n\t#else\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#endif\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}";
+ var lights_physical_pars_fragment = "struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#endif\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\tfloat clearCoatInv = 1.0 - clearCoatDHR;\n\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec3 singleScattering = vec3( 0.0 );\n\t\tvec3 multiScattering = vec3( 0.0 );\n\t\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\t\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * singleScattering;\n\t\treflectedLight.indirectDiffuse += multiScattering * cosineWeightedIrradiance;\n\t\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n\t#else\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#endif\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}";
var lights_fragment_begin = "\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif";
@@ -8586,6 +8596,38 @@
},
+ attach: function () {
+
+ // adds object as a child of this, while maintaining the object's world transform
+
+ var m = new Matrix4();
+
+ return function attach( object ) {
+
+ this.updateWorldMatrix( true, false );
+
+ m.getInverse( this.matrixWorld );
+
+ if ( object.parent !== null ) {
+
+ object.parent.updateWorldMatrix( true, false );
+
+ m.multiply( object.parent.matrixWorld );
+
+ }
+
+ object.applyMatrix( m );
+
+ object.updateWorldMatrix( false, false );
+
+ this.add( object );
+
+ return this;
+
+ };
+
+ }(),
+
getObjectById: function ( id ) {
return this.getObjectByProperty( 'id', id );
@@ -9267,7 +9309,7 @@
if ( uvs2 !== undefined ) this.faceVertexUvs[ 1 ] = [];
- for ( var i = 0, j = 0; i < positions.length; i += 3, j += 2 ) {
+ for ( var i = 0; i < positions.length; i += 3 ) {
scope.vertices.push( new Vector3().fromArray( positions, i ) );
@@ -10786,6 +10828,17 @@
return new this.constructor( this.array, this.itemSize ).copy( this );
+ },
+
+ toJSON: function () {
+
+ return {
+ itemSize: this.itemSize,
+ type: this.array.constructor.name,
+ array: Array.prototype.slice.call( this.array ),
+ normalized: this.normalized
+ };
+
}
} );
@@ -12224,12 +12277,7 @@
var attribute = attributes[ key ];
- var attributeData = {
- itemSize: attribute.itemSize,
- type: attribute.array.constructor.name,
- array: Array.prototype.slice.call( attribute.array ),
- normalized: attribute.normalized
- };
+ var attributeData = attribute.toJSON();
if ( attribute.name !== '' ) attributeData.name = attribute.name;
@@ -12250,12 +12298,7 @@
var attribute = attributeArray[ i ];
- var attributeData = {
- itemSize: attribute.itemSize,
- type: attribute.array.constructor.name,
- array: Array.prototype.slice.call( attribute.array ),
- normalized: attribute.normalized
- };
+ var attributeData = attribute.toJSON();
if ( attribute.name !== '' ) attributeData.name = attribute.name;
@@ -14003,6 +14046,23 @@
};
+ }(),
+
+ isFrontFacing: function () {
+
+ var v0 = new Vector3();
+ var v1 = new Vector3();
+
+ return function isFrontFacing( a, b, c, direction ) {
+
+ v0.subVectors( c, b );
+ v1.subVectors( a, b );
+
+ // strictly front facing
+ return ( v0.cross( v1 ).dot( direction ) < 0 ) ? true : false;
+
+ };
+
}()
} );
@@ -14099,15 +14159,21 @@
},
+ getUV: function ( point, uv1, uv2, uv3, target ) {
+
+ return Triangle.getUV( point, this.a, this.b, this.c, uv1, uv2, uv3, target );
+
+ },
+
containsPoint: function ( point ) {
return Triangle.containsPoint( point, this.a, this.b, this.c );
},
- getUV: function ( point, uv1, uv2, uv3, result ) {
+ isFrontFacing: function ( direction ) {
- return Triangle.getUV( point, this.a, this.b, this.c, uv1, uv2, uv3, result );
+ return Triangle.isFrontFacing( this.a, this.b, this.c, direction );
},
@@ -16116,7 +16182,7 @@
// Single scalar
- function setValue1f( gl, v ) {
+ function setValueV1f( gl, v ) {
var cache = this.cache;
@@ -16128,21 +16194,9 @@
}
- function setValue1i( gl, v ) {
-
- var cache = this.cache;
-
- if ( cache[ 0 ] === v ) return;
-
- gl.uniform1i( this.addr, v );
-
- cache[ 0 ] = v;
-
- }
-
// Single float vector (from flat array or THREE.VectorN)
- function setValue2fv( gl, v ) {
+ function setValueV2f( gl, v ) {
var cache = this.cache;
@@ -16169,7 +16223,7 @@
}
- function setValue3fv( gl, v ) {
+ function setValueV3f( gl, v ) {
var cache = this.cache;
@@ -16209,7 +16263,7 @@
}
- function setValue4fv( gl, v ) {
+ function setValueV4f( gl, v ) {
var cache = this.cache;
@@ -16240,7 +16294,7 @@
// Single matrix (from flat array or MatrixN)
- function setValue2fm( gl, v ) {
+ function setValueM2( gl, v ) {
var cache = this.cache;
var elements = v.elements;
@@ -16267,7 +16321,7 @@
}
- function setValue3fm( gl, v ) {
+ function setValueM3( gl, v ) {
var cache = this.cache;
var elements = v.elements;
@@ -16294,7 +16348,7 @@
}
- function setValue4fm( gl, v ) {
+ function setValueM4( gl, v ) {
var cache = this.cache;
var elements = v.elements;
@@ -16389,7 +16443,19 @@
// Integer / Boolean vectors or arrays thereof (always flat arrays)
- function setValue2iv( gl, v ) {
+ function setValueV1i( gl, v ) {
+
+ var cache = this.cache;
+
+ if ( cache[ 0 ] === v ) return;
+
+ gl.uniform1i( this.addr, v );
+
+ cache[ 0 ] = v;
+
+ }
+
+ function setValueV2i( gl, v ) {
var cache = this.cache;
@@ -16401,7 +16467,7 @@
}
- function setValue3iv( gl, v ) {
+ function setValueV3i( gl, v ) {
var cache = this.cache;
@@ -16413,7 +16479,7 @@
}
- function setValue4iv( gl, v ) {
+ function setValueV4i( gl, v ) {
var cache = this.cache;
@@ -16431,151 +16497,123 @@
switch ( type ) {
- case 0x1406: return setValue1f; // FLOAT
- case 0x8b50: return setValue2fv; // _VEC2
- case 0x8b51: return setValue3fv; // _VEC3
- case 0x8b52: return setValue4fv; // _VEC4
+ case 0x1406: return setValueV1f; // FLOAT
+ case 0x8b50: return setValueV2f; // _VEC2
+ case 0x8b51: return setValueV3f; // _VEC3
+ case 0x8b52: return setValueV4f; // _VEC4
- case 0x8b5a: return setValue2fm; // _MAT2
- case 0x8b5b: return setValue3fm; // _MAT3
- case 0x8b5c: return setValue4fm; // _MAT4
+ case 0x8b5a: return setValueM2; // _MAT2
+ case 0x8b5b: return setValueM3; // _MAT3
+ case 0x8b5c: return setValueM4; // _MAT4
case 0x8b5e: case 0x8d66: return setValueT1; // SAMPLER_2D, SAMPLER_EXTERNAL_OES
case 0x8b5f: return setValueT3D1; // SAMPLER_3D
case 0x8b60: return setValueT6; // SAMPLER_CUBE
case 0x8DC1: return setValueT2DArray1; // SAMPLER_2D_ARRAY
- case 0x1404: case 0x8b56: return setValue1i; // INT, BOOL
- case 0x8b53: case 0x8b57: return setValue2iv; // _VEC2
- case 0x8b54: case 0x8b58: return setValue3iv; // _VEC3
- case 0x8b55: case 0x8b59: return setValue4iv; // _VEC4
+ case 0x1404: case 0x8b56: return setValueV1i; // INT, BOOL
+ case 0x8b53: case 0x8b57: return setValueV2i; // _VEC2
+ case 0x8b54: case 0x8b58: return setValueV3i; // _VEC3
+ case 0x8b55: case 0x8b59: return setValueV4i; // _VEC4
}
}
// Array of scalars
+ function setValueV1fArray( gl, v ) {
- function setValue1fv( gl, v ) {
+ gl.uniform1fv( this.addr, v );
- var cache = this.cache;
+ }
- if ( arraysEqual( cache, v ) ) return;
+ // Integer / Boolean vectors or arrays thereof (always flat arrays)
+ function setValueV1iArray( gl, v ) {
- gl.uniform1fv( this.addr, v );
+ gl.uniform1iv( this.addr, v );
- copyArray( cache, v );
+ }
+
+ function setValueV2iArray( gl, v ) {
+
+ gl.uniform2iv( this.addr, v );
}
- function setValue1iv( gl, v ) {
- var cache = this.cache;
+ function setValueV3iArray( gl, v ) {
- if ( arraysEqual( cache, v ) ) return;
+ gl.uniform3iv( this.addr, v );
- gl.uniform1iv( this.addr, v );
+ }
- copyArray( cache, v );
+ function setValueV4iArray( gl, v ) {
+
+ gl.uniform4iv( this.addr, v );
}
+
// Array of vectors (flat or from THREE classes)
- function setValueV2a( gl, v ) {
+ function setValueV2fArray( gl, v ) {
- var cache = this.cache;
var data = flatten( v, this.size, 2 );
- if ( arraysEqual( cache, data ) ) return;
-
gl.uniform2fv( this.addr, data );
- this.updateCache( data );
-
}
- function setValueV3a( gl, v ) {
+ function setValueV3fArray( gl, v ) {
- var cache = this.cache;
var data = flatten( v, this.size, 3 );
- if ( arraysEqual( cache, data ) ) return;
-
gl.uniform3fv( this.addr, data );
- this.updateCache( data );
-
}
- function setValueV4a( gl, v ) {
+ function setValueV4fArray( gl, v ) {
- var cache = this.cache;
var data = flatten( v, this.size, 4 );
- if ( arraysEqual( cache, data ) ) return;
-
gl.uniform4fv( this.addr, data );
- this.updateCache( data );
-
}
// Array of matrices (flat or from THREE clases)
- function setValueM2a( gl, v ) {
+ function setValueM2Array( gl, v ) {
- var cache = this.cache;
var data = flatten( v, this.size, 4 );
- if ( arraysEqual( cache, data ) ) return;
-
gl.uniformMatrix2fv( this.addr, false, data );
- this.updateCache( data );
-
}
- function setValueM3a( gl, v ) {
+ function setValueM3Array( gl, v ) {
- var cache = this.cache;
var data = flatten( v, this.size, 9 );
- if ( arraysEqual( cache, data ) ) return;
-
gl.uniformMatrix3fv( this.addr, false, data );
- this.updateCache( data );
-
}
- function setValueM4a( gl, v ) {
+ function setValueM4Array( gl, v ) {
- var cache = this.cache;
var data = flatten( v, this.size, 16 );
- if ( arraysEqual( cache, data ) ) return;
-
gl.uniformMatrix4fv( this.addr, false, data );
- this.updateCache( data );
-
}
// Array of textures (2D / Cube)
- function setValueT1a( gl, v, textures ) {
+ function setValueT1Array( gl, v, textures ) {
- var cache = this.cache;
var n = v.length;
var units = allocTexUnits( textures, n );
- if ( arraysEqual( cache, units ) === false ) {
-
- gl.uniform1iv( this.addr, units );
- copyArray( cache, units );
-
- }
+ gl.uniform1iv( this.addr, units );
for ( var i = 0; i !== n; ++ i ) {
@@ -16585,19 +16623,13 @@
}
- function setValueT6a( gl, v, textures ) {
+ function setValueT6Array( gl, v, textures ) {
- var cache = this.cache;
var n = v.length;
var units = allocTexUnits( textures, n );
- if ( arraysEqual( cache, units ) === false ) {
-
- gl.uniform1iv( this.addr, units );
- copyArray( cache, units );
-
- }
+ gl.uniform1iv( this.addr, units );
for ( var i = 0; i !== n; ++ i ) {
@@ -16613,22 +16645,22 @@
switch ( type ) {
- case 0x1406: return setValue1fv; // FLOAT
- case 0x8b50: return setValueV2a; // _VEC2
- case 0x8b51: return setValueV3a; // _VEC3
- case 0x8b52: return setValueV4a; // _VEC4
+ case 0x1406: return setValueV1fArray; // FLOAT
+ case 0x8b50: return setValueV2fArray; // _VEC2
+ case 0x8b51: return setValueV3fArray; // _VEC3
+ case 0x8b52: return setValueV4fArray; // _VEC4
- case 0x8b5a: return setValueM2a; // _MAT2
- case 0x8b5b: return setValueM3a; // _MAT3
- case 0x8b5c: return setValueM4a; // _MAT4
+ case 0x8b5a: return setValueM2Array; // _MAT2
+ case 0x8b5b: return setValueM3Array; // _MAT3
+ case 0x8b5c: return setValueM4Array; // _MAT4
- case 0x8b5e: return setValueT1a; // SAMPLER_2D
- case 0x8b60: return setValueT6a; // SAMPLER_CUBE
+ case 0x8b5e: return setValueT1Array; // SAMPLER_2D
+ case 0x8b60: return setValueT6Array; // SAMPLER_CUBE
- case 0x1404: case 0x8b56: return setValue1iv; // INT, BOOL
- case 0x8b53: case 0x8b57: return setValue2iv; // _VEC2
- case 0x8b54: case 0x8b58: return setValue3iv; // _VEC3
- case 0x8b55: case 0x8b59: return setValue4iv; // _VEC4
+ case 0x1404: case 0x8b56: return setValueV1iArray; // INT, BOOL
+ case 0x8b53: case 0x8b57: return setValueV2iArray; // _VEC2
+ case 0x8b54: case 0x8b58: return setValueV3iArray; // _VEC3
+ case 0x8b55: case 0x8b59: return setValueV4iArray; // _VEC4
}
@@ -18912,6 +18944,8 @@
if ( lights.length === 0 ) return;
var currentRenderTarget = _renderer.getRenderTarget();
+ var activeCubeFace = _renderer.getActiveCubeFace();
+ var activeMipMapLevel = _renderer.getActiveMipMapLevel();
var _state = _renderer.state;
@@ -19069,7 +19103,7 @@
scope.needsUpdate = false;
- _renderer.setRenderTarget( currentRenderTarget );
+ _renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipMapLevel );
};
@@ -21971,6 +22005,7 @@
function WebVRManager( renderer ) {
+ var renderWidth, renderHeight;
var scope = this;
var device = null;
@@ -21984,7 +22019,7 @@
var framebufferScaleFactor = 1.0;
- var frameOfReferenceType = 'stage';
+ var referenceSpaceType = 'local-floor';
if ( typeof window !== 'undefined' && 'VRFrameData' in window ) {
@@ -21998,11 +22033,11 @@
var tempPosition = new Vector3();
var cameraL = new PerspectiveCamera();
- cameraL.bounds = new Vector4( 0.0, 0.0, 0.5, 1.0 );
+ cameraL.viewport = new Vector4();
cameraL.layers.enable( 1 );
var cameraR = new PerspectiveCamera();
- cameraR.bounds = new Vector4( 0.5, 0.0, 0.5, 1.0 );
+ cameraR.viewport = new Vector4();
cameraR.layers.enable( 2 );
var cameraVR = new ArrayCamera( [ cameraL, cameraR ] );
@@ -22024,13 +22059,16 @@
if ( isPresenting() ) {
var eyeParameters = device.getEyeParameters( 'left' );
- var renderWidth = eyeParameters.renderWidth * framebufferScaleFactor;
- var renderHeight = eyeParameters.renderHeight * framebufferScaleFactor;
+ renderWidth = 2 * eyeParameters.renderWidth * framebufferScaleFactor;
+ renderHeight = eyeParameters.renderHeight * framebufferScaleFactor;
currentPixelRatio = renderer.getPixelRatio();
renderer.getSize( currentSize );
- renderer.setDrawingBufferSize( renderWidth * 2, renderHeight, 1 );
+ renderer.setDrawingBufferSize( renderWidth, renderHeight, 1 );
+
+ cameraL.viewport.set( 0, 0, renderWidth / 2, renderHeight );
+ cameraR.viewport.set( renderWidth / 2, 0, renderWidth / 2, renderHeight );
animation.start();
@@ -22105,6 +22143,8 @@
var buttonId = gamepad.id === 'Daydream Controller' ? 0 : 1;
+ if ( triggers[ i ] === undefined ) triggers[ i ] = false;
+
if ( triggers[ i ] !== gamepad.buttons[ buttonId ].pressed ) {
triggers[ i ] = gamepad.buttons[ buttonId ].pressed;
@@ -22132,6 +22172,16 @@
}
+ function updateViewportFromBounds( viewport, bounds ) {
+
+ if ( bounds !== null && bounds.length === 4 ) {
+
+ viewport.set( bounds[ 0 ] * renderWidth, bounds[ 1 ] * renderHeight, bounds[ 2 ] * renderWidth, bounds[ 3 ] * renderHeight );
+
+ }
+
+ }
+
//
this.enabled = false;
@@ -22174,9 +22224,9 @@
};
- this.setFrameOfReferenceType = function ( value ) {
+ this.setReferenceSpaceType = function ( value ) {
- frameOfReferenceType = value;
+ referenceSpaceType = value;
};
@@ -22188,7 +22238,7 @@
this.getCamera = function ( camera ) {
- var userHeight = frameOfReferenceType === 'stage' ? 1.6 : 0;
+ var userHeight = referenceSpaceType === 'local-floor' ? 1.6 : 0;
if ( isPresenting() === false ) {
@@ -22206,7 +22256,7 @@
//
- if ( frameOfReferenceType === 'stage' ) {
+ if ( referenceSpaceType === 'local-floor' ) {
var stageParameters = device.stageParameters;
@@ -22263,7 +22313,7 @@
standingMatrixInverse.getInverse( standingMatrix );
- if ( frameOfReferenceType === 'stage' ) {
+ if ( referenceSpaceType === 'local-floor' ) {
cameraL.matrixWorldInverse.multiply( standingMatrixInverse );
cameraR.matrixWorldInverse.multiply( standingMatrixInverse );
@@ -22299,17 +22349,8 @@
var layer = layers[ 0 ];
- if ( layer.leftBounds !== null && layer.leftBounds.length === 4 ) {
-
- cameraL.bounds.fromArray( layer.leftBounds );
-
- }
-
- if ( layer.rightBounds !== null && layer.rightBounds.length === 4 ) {
-
- cameraR.bounds.fromArray( layer.rightBounds );
-
- }
+ updateViewportFromBounds( cameraL.viewport, layer.leftBounds );
+ updateViewportFromBounds( cameraR.viewport, layer.rightBounds );
}
@@ -22355,6 +22396,14 @@
};
+ // DEPRECATED
+
+ this.setFrameOfReferenceType = function () {
+
+ console.warn( 'THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.' );
+
+ };
+
}
/**
@@ -22365,13 +22414,10 @@
var gl = renderer.context;
- var device = null;
var session = null;
- var framebufferScaleFactor = 1.0;
-
- var frameOfReference = null;
- var frameOfReferenceType = 'stage';
+ var referenceSpace = null;
+ var referenceSpaceType = 'local-floor';
var pose = null;
@@ -22380,7 +22426,7 @@
function isPresenting() {
- return session !== null && frameOfReference !== null;
+ return session !== null && referenceSpace !== null;
}
@@ -22420,25 +22466,19 @@
};
- this.getDevice = function () {
-
- return device;
-
- };
+ //
- this.setDevice = function ( value ) {
+ function onSessionEvent( event ) {
- if ( value !== undefined ) device = value;
- if ( value instanceof XRDevice ) gl.setCompatibleXRDevice( value );
+ for ( var i = 0; i < controllers.length; i ++ ) {
- };
+ if ( inputSources[ i ] === event.inputSource ) {
- //
+ controllers[ i ].dispatchEvent( { type: event.type } );
- function onSessionEvent( event ) {
+ }
- var controller = controllers[ inputSources.indexOf( event.inputSource ) ];
- if ( controller ) controller.dispatchEvent( { type: event.type } );
+ }
}
@@ -22450,15 +22490,22 @@
}
- this.setFramebufferScaleFactor = function ( value ) {
+ function onRequestReferenceSpace( value ) {
- framebufferScaleFactor = value;
+ referenceSpace = value;
+
+ animation.setContext( session );
+ animation.start();
+
+ }
+
+ this.setFramebufferScaleFactor = function ( value ) {
};
- this.setFrameOfReferenceType = function ( value ) {
+ this.setReferenceSpaceType = function ( value ) {
- frameOfReferenceType = value;
+ referenceSpaceType = value;
};
@@ -22473,25 +22520,17 @@
session.addEventListener( 'selectend', onSessionEvent );
session.addEventListener( 'end', onSessionEnd );
- session.baseLayer = new XRWebGLLayer( session, gl, { framebufferScaleFactor: framebufferScaleFactor } );
- session.requestFrameOfReference( frameOfReferenceType ).then( function ( value ) {
-
- frameOfReference = value;
-
- renderer.setFramebuffer( session.baseLayer.framebuffer );
+ session.updateRenderState( { baseLayer: new XRWebGLLayer( session, gl ) } );
- animation.setContext( session );
- animation.start();
-
- } );
+ session.requestReferenceSpace( referenceSpaceType ).then( onRequestReferenceSpace );
//
- inputSources = session.getInputSources();
+ inputSources = session.inputSources;
session.addEventListener( 'inputsourceschange', function () {
- inputSources = session.getInputSources();
+ inputSources = session.inputSources;
console.log( inputSources );
for ( var i = 0; i < controllers.length; i ++ ) {
@@ -22568,18 +22607,20 @@
function onAnimationFrame( time, frame ) {
- pose = frame.getDevicePose( frameOfReference );
+ pose = frame.getViewerPose( referenceSpace );
if ( pose !== null ) {
- var layer = session.baseLayer;
- var views = frame.views;
+ var views = pose.views;
+ var baseLayer = session.renderState.baseLayer;
+
+ renderer.setFramebuffer( baseLayer.framebuffer );
for ( var i = 0; i < views.length; i ++ ) {
var view = views[ i ];
- var viewport = layer.getViewport( view );
- var viewMatrix = pose.getViewMatrix( view );
+ var viewport = baseLayer.getViewport( view );
+ var viewMatrix = view.transform.inverse.matrix;
var camera = cameraVR.cameras[ i ];
camera.matrix.fromArray( viewMatrix ).getInverse( camera.matrix );
@@ -22606,22 +22647,11 @@
if ( inputSource ) {
- var inputPose = frame.getInputPose( inputSource, frameOfReference );
+ var inputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );
if ( inputPose !== null ) {
- if ( 'targetRay' in inputPose ) {
-
- controller.matrix.elements = inputPose.targetRay.transformMatrix;
-
- } else if ( 'pointerMatrix' in inputPose ) {
-
- // DEPRECATED
-
- controller.matrix.elements = inputPose.pointerMatrix;
-
- }
-
+ controller.matrix.fromArray( inputPose.transform.matrix );
controller.matrix.decompose( controller.position, controller.rotation, controller.scale );
controller.visible = true;
@@ -22659,6 +22689,24 @@
};
+ this.getDevice = function () {
+
+ console.warn( 'THREE.WebXRManager: getDevice() has been deprecated.' );
+
+ };
+
+ this.setDevice = function () {
+
+ console.warn( 'THREE.WebXRManager: setDevice() has been deprecated.' );
+
+ };
+
+ this.setFrameOfReferenceType = function () {
+
+ console.warn( 'THREE.WebXRManager: setFrameOfReferenceType() has been deprecated.' );
+
+ };
+
this.submitFrame = function () {};
}
@@ -22686,7 +22734,8 @@
_antialias = parameters.antialias !== undefined ? parameters.antialias : false,
_premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true,
_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false,
- _powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default';
+ _powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default',
+ _failIfMajorPerformanceCaveat = parameters.failIfMajorPerformanceCaveat !== undefined ? parameters.failIfMajorPerformanceCaveat : false;
var currentRenderList = null;
var currentRenderState = null;
@@ -22703,7 +22752,7 @@
* Enables error checking and reporting when shader programs are being compiled
* @type {boolean}
*/
- checkShaderErrors: false
+ checkShaderErrors: true
};
// clearing
@@ -22753,6 +22802,8 @@
_framebuffer = null,
+ _currentActiveCubeFace = 0,
+ _currentActiveMipmapLevel = 0,
_currentRenderTarget = null,
_currentFramebuffer = null,
_currentMaterialId = - 1,
@@ -22818,7 +22869,9 @@
antialias: _antialias,
premultipliedAlpha: _premultipliedAlpha,
preserveDrawingBuffer: _preserveDrawingBuffer,
- powerPreference: _powerPreference
+ powerPreference: _powerPreference,
+ failIfMajorPerformanceCaveat: _failIfMajorPerformanceCaveat,
+ xrCompatible: true
};
// event listeners must be registered before WebGL context is created, see #12753
@@ -22927,7 +22980,7 @@
// vr
- var vr = ( typeof navigator !== 'undefined' && 'xr' in navigator ) ? new WebXRManager( _this ) : new WebVRManager( _this );
+ var vr = ( typeof navigator !== 'undefined' && 'xr' in navigator && 'supportsSession' in navigator.xr ) ? new WebXRManager( _this ) : new WebVRManager( _this );
this.vr = vr;
@@ -23998,22 +24051,7 @@
if ( object.layers.test( camera2.layers ) ) {
- if ( 'viewport' in camera2 ) { // XR
-
- state.viewport( _currentViewport.copy( camera2.viewport ) );
-
- } else {
-
- var bounds = camera2.bounds;
-
- var x = bounds.x * _width;
- var y = bounds.y * _height;
- var width = bounds.z * _width;
- var height = bounds.w * _height;
-
- state.viewport( _currentViewport.set( x, y, width, height ).multiplyScalar( _pixelRatio ) );
-
- }
+ state.viewport( _currentViewport.copy( camera2.viewport ) );
currentRenderState.setupLights( camera2 );
@@ -25043,13 +25081,26 @@
}
//
-
this.setFramebuffer = function ( value ) {
+ if ( _framebuffer !== value ) _gl.bindFramebuffer( 36160, value );
+
_framebuffer = value;
};
+ this.getActiveCubeFace = function () {
+
+ return _currentActiveCubeFace;
+
+ };
+
+ this.getActiveMipMapLevel = function () {
+
+ return _currentActiveMipmapLevel;
+
+ };
+
this.getRenderTarget = function () {
return _currentRenderTarget;
@@ -25059,6 +25110,8 @@
this.setRenderTarget = function ( renderTarget, activeCubeFace, activeMipMapLevel ) {
_currentRenderTarget = renderTarget;
+ _currentActiveCubeFace = activeCubeFace;
+ _currentActiveMipmapLevel = activeMipMapLevel;
if ( renderTarget && properties.get( renderTarget ).__webglFramebuffer === undefined ) {
@@ -25120,7 +25173,7 @@
};
- this.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer ) {
+ this.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer, activeCubeFaceIndex ) {
if ( ! ( renderTarget && renderTarget.isWebGLRenderTarget ) ) {
@@ -25131,6 +25184,12 @@
var framebuffer = properties.get( renderTarget ).__webglFramebuffer;
+ if ( renderTarget.isWebGLRenderTargetCube && activeCubeFaceIndex !== undefined ) {
+
+ framebuffer = framebuffer[ activeCubeFaceIndex ];
+
+ }
+
if ( framebuffer ) {
var restore = false;
@@ -25228,6 +25287,12 @@
};
+ /*
+ if ( typeof __THREE_DEVTOOLS__ !== undefined ) {
+ __THREE_DEVTOOLS__.dispatchEvent( { type: 'renderer', value: this } );
+ }
+ */
+
}
/**
@@ -25321,6 +25386,12 @@
this.autoUpdate = true; // checked by the renderer
+ /*
+ if ( typeof __THREE_DEVTOOLS__ !== undefined ) {
+ __THREE_DEVTOOLS__.dispatchEvent( { type: 'scene', value: this } );
+ }
+ */
+
}
Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
@@ -30343,7 +30414,7 @@
thetaStart = thetaStart !== undefined ? thetaStart : 0;
thetaLength = thetaLength !== undefined ? thetaLength : Math.PI;
- var thetaEnd = thetaStart + thetaLength;
+ var thetaEnd = Math.min( thetaStart + thetaLength, Math.PI );
var ix, iy;
@@ -30370,7 +30441,17 @@
// special case for the poles
- var uOffset = ( iy == 0 ) ? 0.5 / widthSegments : ( ( iy == heightSegments ) ? - 0.5 / widthSegments : 0 );
+ var uOffset = 0;
+
+ if ( iy == 0 && thetaStart == 0 ) {
+
+ uOffset = 0.5 / widthSegments;
+
+ } else if ( iy == heightSegments && thetaEnd == Math.PI ) {
+
+ uOffset = - 0.5 / widthSegments;
+
+ }
for ( ix = 0; ix <= widthSegments; ix ++ ) {
@@ -38035,8 +38116,17 @@
}
- // Merges multi-byte utf-8 characters.
- return decodeURIComponent( escape( s ) );
+ try {
+
+ // merges multi-byte utf-8 characters.
+
+ return decodeURIComponent( escape( s ) );
+
+ } catch ( e ) { // see #16358
+
+ return s;
+
+ }
},
@@ -38052,6 +38142,107 @@
};
+ /**
+ * @author benaadams / https://twitter.com/ben_a_adams
+ */
+
+ function InstancedBufferGeometry() {
+
+ BufferGeometry.call( this );
+
+ this.type = 'InstancedBufferGeometry';
+ this.maxInstancedCount = undefined;
+
+ }
+
+ InstancedBufferGeometry.prototype = Object.assign( Object.create( BufferGeometry.prototype ), {
+
+ constructor: InstancedBufferGeometry,
+
+ isInstancedBufferGeometry: true,
+
+ copy: function ( source ) {
+
+ BufferGeometry.prototype.copy.call( this, source );
+
+ this.maxInstancedCount = source.maxInstancedCount;
+
+ return this;
+
+ },
+
+ clone: function () {
+
+ return new this.constructor().copy( this );
+
+ },
+
+ toJSON: function () {
+
+ var data = BufferGeometry.prototype.toJSON.call( this );
+
+ data.maxInstancedCount = this.maxInstancedCount;
+
+ data.isInstancedBufferGeometry = true;
+
+ return data;
+
+ }
+
+ } );
+
+ /**
+ * @author benaadams / https://twitter.com/ben_a_adams
+ */
+
+ function InstancedBufferAttribute( array, itemSize, normalized, meshPerAttribute ) {
+
+ if ( typeof ( normalized ) === 'number' ) {
+
+ meshPerAttribute = normalized;
+
+ normalized = false;
+
+ console.error( 'THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.' );
+
+ }
+
+ BufferAttribute.call( this, array, itemSize, normalized );
+
+ this.meshPerAttribute = meshPerAttribute || 1;
+
+ }
+
+ InstancedBufferAttribute.prototype = Object.assign( Object.create( BufferAttribute.prototype ), {
+
+ constructor: InstancedBufferAttribute,
+
+ isInstancedBufferAttribute: true,
+
+ copy: function ( source ) {
+
+ BufferAttribute.prototype.copy.call( this, source );
+
+ this.meshPerAttribute = source.meshPerAttribute;
+
+ return this;
+
+ },
+
+ toJSON: function () {
+
+ var data = BufferAttribute.prototype.toJSON.call( this );
+
+ data.meshPerAttribute = this.meshPerAttribute;
+
+ data.isInstancedBufferAttribute = true;
+
+ return data;
+
+ }
+
+ } );
+
/**
* @author mrdoob / http://mrdoob.com/
*/
@@ -38080,7 +38271,7 @@
parse: function ( json ) {
- var geometry = new BufferGeometry();
+ var geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry();
var index = json.data.index;
@@ -38097,8 +38288,8 @@
var attribute = attributes[ key ];
var typedArray = new TYPED_ARRAYS[ attribute.type ]( attribute.array );
-
- var bufferAttribute = new BufferAttribute( typedArray, attribute.itemSize, attribute.normalized );
+ var bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute;
+ var bufferAttribute = new bufferAttributeConstr( typedArray, attribute.itemSize, attribute.normalized );
if ( attribute.name !== undefined ) bufferAttribute.name = attribute.name;
geometry.addAttribute( key, bufferAttribute );
@@ -38566,6 +38757,7 @@
break;
case 'BufferGeometry':
+ case 'InstancedBufferGeometry':
geometry = bufferGeometryLoader.parse( data );
@@ -41269,6 +41461,7 @@
Audio.call( this, listener );
this.panner = this.context.createPanner();
+ this.panner.panningModel = 'HRTF';
this.panner.connect( this.gain );
}
@@ -43243,11 +43436,19 @@
time = 0;
- } else break handle_stop;
+ } else {
+
+ this.time = time;
+
+ break handle_stop;
+
+ }
if ( this.clampWhenFinished ) this.paused = true;
else this.enabled = false;
+ this.time = time;
+
this._mixer.dispatchEvent( {
type: 'finished', action: this,
direction: deltaTime < 0 ? - 1 : 1
@@ -43299,6 +43500,8 @@
time = deltaTime > 0 ? duration : 0;
+ this.time = time;
+
this._mixer.dispatchEvent( {
type: 'finished', action: this,
direction: deltaTime > 0 ? 1 : - 1
@@ -43323,26 +43526,30 @@
this._loopCount = loopCount;
+ this.time = time;
+
this._mixer.dispatchEvent( {
type: 'loop', action: this, loopDelta: loopDelta
} );
}
+ } else {
+
+ this.time = time;
+
}
if ( pingPong && ( loopCount & 1 ) === 1 ) {
// invert time for the "pong round"
- this.time = time;
return duration - time;
}
}
- this.time = time;
return time;
},
@@ -44185,43 +44392,6 @@
};
- /**
- * @author benaadams / https://twitter.com/ben_a_adams
- */
-
- function InstancedBufferGeometry() {
-
- BufferGeometry.call( this );
-
- this.type = 'InstancedBufferGeometry';
- this.maxInstancedCount = undefined;
-
- }
-
- InstancedBufferGeometry.prototype = Object.assign( Object.create( BufferGeometry.prototype ), {
-
- constructor: InstancedBufferGeometry,
-
- isInstancedBufferGeometry: true,
-
- copy: function ( source ) {
-
- BufferGeometry.prototype.copy.call( this, source );
-
- this.maxInstancedCount = source.maxInstancedCount;
-
- return this;
-
- },
-
- clone: function () {
-
- return new this.constructor().copy( this );
-
- }
-
- } );
-
/**
* @author benaadams / https://twitter.com/ben_a_adams
*/
@@ -44252,46 +44422,6 @@
} );
- /**
- * @author benaadams / https://twitter.com/ben_a_adams
- */
-
- function InstancedBufferAttribute( array, itemSize, normalized, meshPerAttribute ) {
-
- if ( typeof ( normalized ) === 'number' ) {
-
- meshPerAttribute = normalized;
-
- normalized = false;
-
- console.error( 'THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.' );
-
- }
-
- BufferAttribute.call( this, array, itemSize, normalized );
-
- this.meshPerAttribute = meshPerAttribute || 1;
-
- }
-
- InstancedBufferAttribute.prototype = Object.assign( Object.create( BufferAttribute.prototype ), {
-
- constructor: InstancedBufferAttribute,
-
- isInstancedBufferAttribute: true,
-
- copy: function ( source ) {
-
- BufferAttribute.prototype.copy.call( this, source );
-
- this.meshPerAttribute = source.meshPerAttribute;
-
- return this;
-
- }
-
- } );
-
/**
* @author mrdoob / http://mrdoob.com/
* @author bhouston / http://clara.io/
@@ -48559,34 +48689,6 @@
//
- function Projector() {
-
- console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
-
- this.projectVector = function ( vector, camera ) {
-
- console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
- vector.project( camera );
-
- };
-
- this.unprojectVector = function ( vector, camera ) {
-
- console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
- vector.unproject( camera );
-
- };
-
- this.pickingRay = function () {
-
- console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
-
- };
-
- }
-
- //
-
function CanvasRenderer() {
console.error( 'THREE.CanvasRenderer has been removed' );
@@ -48633,345 +48735,290 @@
}
- exports.WebGLMultisampleRenderTarget = WebGLMultisampleRenderTarget;
- exports.WebGLRenderTargetCube = WebGLRenderTargetCube;
- exports.WebGLRenderTarget = WebGLRenderTarget;
- exports.WebGLRenderer = WebGLRenderer;
- exports.ShaderLib = ShaderLib;
- exports.UniformsLib = UniformsLib;
- exports.UniformsUtils = UniformsUtils;
- exports.ShaderChunk = ShaderChunk;
- exports.FogExp2 = FogExp2;
- exports.Fog = Fog;
- exports.Scene = Scene;
- exports.Sprite = Sprite;
- exports.LOD = LOD;
- exports.SkinnedMesh = SkinnedMesh;
- exports.Skeleton = Skeleton;
- exports.Bone = Bone;
- exports.Mesh = Mesh;
- exports.LineSegments = LineSegments;
- exports.LineLoop = LineLoop;
- exports.Line = Line;
- exports.Points = Points;
- exports.Group = Group;
- exports.VideoTexture = VideoTexture;
- exports.DataTexture = DataTexture;
- exports.DataTexture2DArray = DataTexture2DArray;
- exports.DataTexture3D = DataTexture3D;
- exports.CompressedTexture = CompressedTexture;
- exports.CubeTexture = CubeTexture;
- exports.CanvasTexture = CanvasTexture;
- exports.DepthTexture = DepthTexture;
- exports.Texture = Texture;
- exports.AnimationLoader = AnimationLoader;
- exports.CompressedTextureLoader = CompressedTextureLoader;
- exports.DataTextureLoader = DataTextureLoader;
- exports.CubeTextureLoader = CubeTextureLoader;
- exports.TextureLoader = TextureLoader;
- exports.ObjectLoader = ObjectLoader;
- exports.MaterialLoader = MaterialLoader;
- exports.BufferGeometryLoader = BufferGeometryLoader;
- exports.DefaultLoadingManager = DefaultLoadingManager;
- exports.LoadingManager = LoadingManager;
- exports.ImageLoader = ImageLoader;
- exports.ImageBitmapLoader = ImageBitmapLoader;
- exports.FontLoader = FontLoader;
- exports.FileLoader = FileLoader;
- exports.Loader = Loader;
- exports.LoaderUtils = LoaderUtils;
- exports.Cache = Cache;
- exports.AudioLoader = AudioLoader;
- exports.SpotLightShadow = SpotLightShadow;
- exports.SpotLight = SpotLight;
- exports.PointLight = PointLight;
- exports.RectAreaLight = RectAreaLight;
- exports.HemisphereLight = HemisphereLight;
- exports.HemisphereLightProbe = HemisphereLightProbe;
- exports.DirectionalLightShadow = DirectionalLightShadow;
- exports.DirectionalLight = DirectionalLight;
+ exports.ACESFilmicToneMapping = ACESFilmicToneMapping;
+ exports.AddEquation = AddEquation;
+ exports.AddOperation = AddOperation;
+ exports.AdditiveBlending = AdditiveBlending;
+ exports.AlphaFormat = AlphaFormat;
+ exports.AlwaysDepth = AlwaysDepth;
exports.AmbientLight = AmbientLight;
exports.AmbientLightProbe = AmbientLightProbe;
- exports.LightShadow = LightShadow;
- exports.Light = Light;
- exports.LightProbe = LightProbe;
- exports.StereoCamera = StereoCamera;
- exports.PerspectiveCamera = PerspectiveCamera;
- exports.OrthographicCamera = OrthographicCamera;
- exports.CubeCamera = CubeCamera;
+ exports.AnimationClip = AnimationClip;
+ exports.AnimationLoader = AnimationLoader;
+ exports.AnimationMixer = AnimationMixer;
+ exports.AnimationObjectGroup = AnimationObjectGroup;
+ exports.AnimationUtils = AnimationUtils;
+ exports.ArcCurve = ArcCurve;
exports.ArrayCamera = ArrayCamera;
- exports.Camera = Camera;
- exports.AudioListener = AudioListener;
- exports.PositionalAudio = PositionalAudio;
- exports.AudioContext = AudioContext;
- exports.AudioAnalyser = AudioAnalyser;
+ exports.ArrowHelper = ArrowHelper;
exports.Audio = Audio;
- exports.VectorKeyframeTrack = VectorKeyframeTrack;
- exports.StringKeyframeTrack = StringKeyframeTrack;
- exports.QuaternionKeyframeTrack = QuaternionKeyframeTrack;
- exports.NumberKeyframeTrack = NumberKeyframeTrack;
- exports.ColorKeyframeTrack = ColorKeyframeTrack;
+ exports.AudioAnalyser = AudioAnalyser;
+ exports.AudioContext = AudioContext;
+ exports.AudioListener = AudioListener;
+ exports.AudioLoader = AudioLoader;
+ exports.AxesHelper = AxesHelper;
+ exports.AxisHelper = AxisHelper;
+ exports.BackSide = BackSide;
+ exports.BasicDepthPacking = BasicDepthPacking;
+ exports.BasicShadowMap = BasicShadowMap;
+ exports.BinaryTextureLoader = BinaryTextureLoader;
+ exports.Bone = Bone;
exports.BooleanKeyframeTrack = BooleanKeyframeTrack;
- exports.PropertyMixer = PropertyMixer;
- exports.PropertyBinding = PropertyBinding;
- exports.KeyframeTrack = KeyframeTrack;
- exports.AnimationUtils = AnimationUtils;
- exports.AnimationObjectGroup = AnimationObjectGroup;
- exports.AnimationMixer = AnimationMixer;
- exports.AnimationClip = AnimationClip;
- exports.Uniform = Uniform;
- exports.InstancedBufferGeometry = InstancedBufferGeometry;
- exports.BufferGeometry = BufferGeometry;
- exports.Geometry = Geometry;
- exports.InterleavedBufferAttribute = InterleavedBufferAttribute;
- exports.InstancedInterleavedBuffer = InstancedInterleavedBuffer;
- exports.InterleavedBuffer = InterleavedBuffer;
- exports.InstancedBufferAttribute = InstancedBufferAttribute;
- exports.Face3 = Face3;
- exports.Object3D = Object3D;
- exports.Raycaster = Raycaster;
- exports.Layers = Layers;
- exports.EventDispatcher = EventDispatcher;
- exports.Clock = Clock;
- exports.QuaternionLinearInterpolant = QuaternionLinearInterpolant;
- exports.LinearInterpolant = LinearInterpolant;
- exports.DiscreteInterpolant = DiscreteInterpolant;
- exports.CubicInterpolant = CubicInterpolant;
- exports.Interpolant = Interpolant;
- exports.Triangle = Triangle;
- exports.Math = _Math;
- exports.Spherical = Spherical;
- exports.Cylindrical = Cylindrical;
- exports.Plane = Plane;
- exports.Frustum = Frustum;
- exports.Sphere = Sphere;
- exports.Ray = Ray;
- exports.Matrix4 = Matrix4;
- exports.Matrix3 = Matrix3;
- exports.Box3 = Box3;
+ exports.BoundingBoxHelper = BoundingBoxHelper;
exports.Box2 = Box2;
- exports.Line3 = Line3;
- exports.Euler = Euler;
- exports.Vector4 = Vector4;
- exports.Vector3 = Vector3;
- exports.Vector2 = Vector2;
- exports.Quaternion = Quaternion;
- exports.Color = Color;
- exports.SphericalHarmonics3 = SphericalHarmonics3;
- exports.ImmediateRenderObject = ImmediateRenderObject;
- exports.VertexNormalsHelper = VertexNormalsHelper;
- exports.SpotLightHelper = SpotLightHelper;
- exports.SkeletonHelper = SkeletonHelper;
- exports.PointLightHelper = PointLightHelper;
- exports.RectAreaLightHelper = RectAreaLightHelper;
- exports.HemisphereLightHelper = HemisphereLightHelper;
- exports.LightProbeHelper = LightProbeHelper;
- exports.GridHelper = GridHelper;
- exports.PolarGridHelper = PolarGridHelper;
- exports.PositionalAudioHelper = PositionalAudioHelper;
- exports.FaceNormalsHelper = FaceNormalsHelper;
- exports.DirectionalLightHelper = DirectionalLightHelper;
- exports.CameraHelper = CameraHelper;
- exports.BoxHelper = BoxHelper;
+ exports.Box3 = Box3;
exports.Box3Helper = Box3Helper;
- exports.PlaneHelper = PlaneHelper;
- exports.ArrowHelper = ArrowHelper;
- exports.AxesHelper = AxesHelper;
- exports.Shape = Shape;
- exports.Path = Path;
- exports.ShapePath = ShapePath;
- exports.Font = Font;
- exports.CurvePath = CurvePath;
- exports.Curve = Curve;
- exports.ImageUtils = ImageUtils;
- exports.ShapeUtils = ShapeUtils;
- exports.WebGLUtils = WebGLUtils;
- exports.WireframeGeometry = WireframeGeometry;
- exports.ParametricGeometry = ParametricGeometry;
- exports.ParametricBufferGeometry = ParametricBufferGeometry;
- exports.TetrahedronGeometry = TetrahedronGeometry;
- exports.TetrahedronBufferGeometry = TetrahedronBufferGeometry;
- exports.OctahedronGeometry = OctahedronGeometry;
- exports.OctahedronBufferGeometry = OctahedronBufferGeometry;
- exports.IcosahedronGeometry = IcosahedronGeometry;
- exports.IcosahedronBufferGeometry = IcosahedronBufferGeometry;
- exports.DodecahedronGeometry = DodecahedronGeometry;
- exports.DodecahedronBufferGeometry = DodecahedronBufferGeometry;
- exports.PolyhedronGeometry = PolyhedronGeometry;
- exports.PolyhedronBufferGeometry = PolyhedronBufferGeometry;
- exports.TubeGeometry = TubeGeometry;
- exports.TubeBufferGeometry = TubeBufferGeometry;
- exports.TorusKnotGeometry = TorusKnotGeometry;
- exports.TorusKnotBufferGeometry = TorusKnotBufferGeometry;
- exports.TorusGeometry = TorusGeometry;
- exports.TorusBufferGeometry = TorusBufferGeometry;
- exports.TextGeometry = TextGeometry;
- exports.TextBufferGeometry = TextBufferGeometry;
- exports.SphereGeometry = SphereGeometry;
- exports.SphereBufferGeometry = SphereBufferGeometry;
- exports.RingGeometry = RingGeometry;
- exports.RingBufferGeometry = RingBufferGeometry;
- exports.PlaneGeometry = PlaneGeometry;
- exports.PlaneBufferGeometry = PlaneBufferGeometry;
- exports.LatheGeometry = LatheGeometry;
- exports.LatheBufferGeometry = LatheBufferGeometry;
- exports.ShapeGeometry = ShapeGeometry;
- exports.ShapeBufferGeometry = ShapeBufferGeometry;
- exports.ExtrudeGeometry = ExtrudeGeometry;
- exports.ExtrudeBufferGeometry = ExtrudeBufferGeometry;
- exports.EdgesGeometry = EdgesGeometry;
- exports.ConeGeometry = ConeGeometry;
- exports.ConeBufferGeometry = ConeBufferGeometry;
- exports.CylinderGeometry = CylinderGeometry;
- exports.CylinderBufferGeometry = CylinderBufferGeometry;
- exports.CircleGeometry = CircleGeometry;
- exports.CircleBufferGeometry = CircleBufferGeometry;
- exports.BoxGeometry = BoxGeometry;
- exports.CubeGeometry = BoxGeometry;
exports.BoxBufferGeometry = BoxBufferGeometry;
- exports.ShadowMaterial = ShadowMaterial;
- exports.SpriteMaterial = SpriteMaterial;
- exports.RawShaderMaterial = RawShaderMaterial;
- exports.ShaderMaterial = ShaderMaterial;
- exports.PointsMaterial = PointsMaterial;
- exports.MeshPhysicalMaterial = MeshPhysicalMaterial;
- exports.MeshStandardMaterial = MeshStandardMaterial;
- exports.MeshPhongMaterial = MeshPhongMaterial;
- exports.MeshToonMaterial = MeshToonMaterial;
- exports.MeshNormalMaterial = MeshNormalMaterial;
- exports.MeshLambertMaterial = MeshLambertMaterial;
- exports.MeshDepthMaterial = MeshDepthMaterial;
- exports.MeshDistanceMaterial = MeshDistanceMaterial;
- exports.MeshBasicMaterial = MeshBasicMaterial;
- exports.MeshMatcapMaterial = MeshMatcapMaterial;
- exports.LineDashedMaterial = LineDashedMaterial;
- exports.LineBasicMaterial = LineBasicMaterial;
- exports.Material = Material;
- exports.Float64BufferAttribute = Float64BufferAttribute;
- exports.Float32BufferAttribute = Float32BufferAttribute;
- exports.Uint32BufferAttribute = Uint32BufferAttribute;
- exports.Int32BufferAttribute = Int32BufferAttribute;
- exports.Uint16BufferAttribute = Uint16BufferAttribute;
- exports.Int16BufferAttribute = Int16BufferAttribute;
- exports.Uint8ClampedBufferAttribute = Uint8ClampedBufferAttribute;
- exports.Uint8BufferAttribute = Uint8BufferAttribute;
- exports.Int8BufferAttribute = Int8BufferAttribute;
+ exports.BoxGeometry = BoxGeometry;
+ exports.BoxHelper = BoxHelper;
exports.BufferAttribute = BufferAttribute;
- exports.ArcCurve = ArcCurve;
+ exports.BufferGeometry = BufferGeometry;
+ exports.BufferGeometryLoader = BufferGeometryLoader;
+ exports.ByteType = ByteType;
+ exports.Cache = Cache;
+ exports.Camera = Camera;
+ exports.CameraHelper = CameraHelper;
+ exports.CanvasRenderer = CanvasRenderer;
+ exports.CanvasTexture = CanvasTexture;
exports.CatmullRomCurve3 = CatmullRomCurve3;
+ exports.CineonToneMapping = CineonToneMapping;
+ exports.CircleBufferGeometry = CircleBufferGeometry;
+ exports.CircleGeometry = CircleGeometry;
+ exports.ClampToEdgeWrapping = ClampToEdgeWrapping;
+ exports.Clock = Clock;
+ exports.ClosedSplineCurve3 = ClosedSplineCurve3;
+ exports.Color = Color;
+ exports.ColorKeyframeTrack = ColorKeyframeTrack;
+ exports.CompressedTexture = CompressedTexture;
+ exports.CompressedTextureLoader = CompressedTextureLoader;
+ exports.ConeBufferGeometry = ConeBufferGeometry;
+ exports.ConeGeometry = ConeGeometry;
+ exports.CubeCamera = CubeCamera;
+ exports.CubeGeometry = BoxGeometry;
+ exports.CubeReflectionMapping = CubeReflectionMapping;
+ exports.CubeRefractionMapping = CubeRefractionMapping;
+ exports.CubeTexture = CubeTexture;
+ exports.CubeTextureLoader = CubeTextureLoader;
+ exports.CubeUVReflectionMapping = CubeUVReflectionMapping;
+ exports.CubeUVRefractionMapping = CubeUVRefractionMapping;
exports.CubicBezierCurve = CubicBezierCurve;
exports.CubicBezierCurve3 = CubicBezierCurve3;
- exports.EllipseCurve = EllipseCurve;
- exports.LineCurve = LineCurve;
- exports.LineCurve3 = LineCurve3;
- exports.QuadraticBezierCurve = QuadraticBezierCurve;
- exports.QuadraticBezierCurve3 = QuadraticBezierCurve3;
- exports.SplineCurve = SplineCurve;
- exports.REVISION = REVISION;
- exports.MOUSE = MOUSE;
- exports.CullFaceNone = CullFaceNone;
+ exports.CubicInterpolant = CubicInterpolant;
exports.CullFaceBack = CullFaceBack;
exports.CullFaceFront = CullFaceFront;
exports.CullFaceFrontBack = CullFaceFrontBack;
- exports.FrontFaceDirectionCW = FrontFaceDirectionCW;
- exports.FrontFaceDirectionCCW = FrontFaceDirectionCCW;
- exports.BasicShadowMap = BasicShadowMap;
- exports.PCFShadowMap = PCFShadowMap;
- exports.PCFSoftShadowMap = PCFSoftShadowMap;
- exports.FrontSide = FrontSide;
- exports.BackSide = BackSide;
- exports.DoubleSide = DoubleSide;
- exports.FlatShading = FlatShading;
- exports.SmoothShading = SmoothShading;
- exports.NoColors = NoColors;
- exports.FaceColors = FaceColors;
- exports.VertexColors = VertexColors;
- exports.NoBlending = NoBlending;
- exports.NormalBlending = NormalBlending;
- exports.AdditiveBlending = AdditiveBlending;
- exports.SubtractiveBlending = SubtractiveBlending;
- exports.MultiplyBlending = MultiplyBlending;
+ exports.CullFaceNone = CullFaceNone;
+ exports.Curve = Curve;
+ exports.CurvePath = CurvePath;
exports.CustomBlending = CustomBlending;
- exports.AddEquation = AddEquation;
- exports.SubtractEquation = SubtractEquation;
- exports.ReverseSubtractEquation = ReverseSubtractEquation;
- exports.MinEquation = MinEquation;
- exports.MaxEquation = MaxEquation;
- exports.ZeroFactor = ZeroFactor;
- exports.OneFactor = OneFactor;
- exports.SrcColorFactor = SrcColorFactor;
- exports.OneMinusSrcColorFactor = OneMinusSrcColorFactor;
- exports.SrcAlphaFactor = SrcAlphaFactor;
- exports.OneMinusSrcAlphaFactor = OneMinusSrcAlphaFactor;
+ exports.CylinderBufferGeometry = CylinderBufferGeometry;
+ exports.CylinderGeometry = CylinderGeometry;
+ exports.Cylindrical = Cylindrical;
+ exports.DataTexture = DataTexture;
+ exports.DataTexture2DArray = DataTexture2DArray;
+ exports.DataTexture3D = DataTexture3D;
+ exports.DataTextureLoader = DataTextureLoader;
+ exports.DefaultLoadingManager = DefaultLoadingManager;
+ exports.DepthFormat = DepthFormat;
+ exports.DepthStencilFormat = DepthStencilFormat;
+ exports.DepthTexture = DepthTexture;
+ exports.DirectionalLight = DirectionalLight;
+ exports.DirectionalLightHelper = DirectionalLightHelper;
+ exports.DirectionalLightShadow = DirectionalLightShadow;
+ exports.DiscreteInterpolant = DiscreteInterpolant;
+ exports.DodecahedronBufferGeometry = DodecahedronBufferGeometry;
+ exports.DodecahedronGeometry = DodecahedronGeometry;
+ exports.DoubleSide = DoubleSide;
exports.DstAlphaFactor = DstAlphaFactor;
- exports.OneMinusDstAlphaFactor = OneMinusDstAlphaFactor;
exports.DstColorFactor = DstColorFactor;
- exports.OneMinusDstColorFactor = OneMinusDstColorFactor;
- exports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor;
- exports.NeverDepth = NeverDepth;
- exports.AlwaysDepth = AlwaysDepth;
- exports.LessDepth = LessDepth;
- exports.LessEqualDepth = LessEqualDepth;
+ exports.DynamicBufferAttribute = DynamicBufferAttribute;
+ exports.EdgesGeometry = EdgesGeometry;
+ exports.EdgesHelper = EdgesHelper;
+ exports.EllipseCurve = EllipseCurve;
exports.EqualDepth = EqualDepth;
- exports.GreaterEqualDepth = GreaterEqualDepth;
- exports.GreaterDepth = GreaterDepth;
- exports.NotEqualDepth = NotEqualDepth;
- exports.MultiplyOperation = MultiplyOperation;
- exports.MixOperation = MixOperation;
- exports.AddOperation = AddOperation;
- exports.NoToneMapping = NoToneMapping;
- exports.LinearToneMapping = LinearToneMapping;
- exports.ReinhardToneMapping = ReinhardToneMapping;
- exports.Uncharted2ToneMapping = Uncharted2ToneMapping;
- exports.CineonToneMapping = CineonToneMapping;
- exports.ACESFilmicToneMapping = ACESFilmicToneMapping;
- exports.UVMapping = UVMapping;
- exports.CubeReflectionMapping = CubeReflectionMapping;
- exports.CubeRefractionMapping = CubeRefractionMapping;
exports.EquirectangularReflectionMapping = EquirectangularReflectionMapping;
exports.EquirectangularRefractionMapping = EquirectangularRefractionMapping;
- exports.SphericalReflectionMapping = SphericalReflectionMapping;
- exports.CubeUVReflectionMapping = CubeUVReflectionMapping;
- exports.CubeUVRefractionMapping = CubeUVRefractionMapping;
- exports.RepeatWrapping = RepeatWrapping;
- exports.ClampToEdgeWrapping = ClampToEdgeWrapping;
+ exports.Euler = Euler;
+ exports.EventDispatcher = EventDispatcher;
+ exports.ExtrudeBufferGeometry = ExtrudeBufferGeometry;
+ exports.ExtrudeGeometry = ExtrudeGeometry;
+ exports.Face3 = Face3;
+ exports.Face4 = Face4;
+ exports.FaceColors = FaceColors;
+ exports.FaceNormalsHelper = FaceNormalsHelper;
+ exports.FileLoader = FileLoader;
+ exports.FlatShading = FlatShading;
+ exports.Float32Attribute = Float32Attribute;
+ exports.Float32BufferAttribute = Float32BufferAttribute;
+ exports.Float64Attribute = Float64Attribute;
+ exports.Float64BufferAttribute = Float64BufferAttribute;
+ exports.FloatType = FloatType;
+ exports.Fog = Fog;
+ exports.FogExp2 = FogExp2;
+ exports.Font = Font;
+ exports.FontLoader = FontLoader;
+ exports.FrontFaceDirectionCCW = FrontFaceDirectionCCW;
+ exports.FrontFaceDirectionCW = FrontFaceDirectionCW;
+ exports.FrontSide = FrontSide;
+ exports.Frustum = Frustum;
+ exports.GammaEncoding = GammaEncoding;
+ exports.Geometry = Geometry;
+ exports.GeometryUtils = GeometryUtils;
+ exports.GreaterDepth = GreaterDepth;
+ exports.GreaterEqualDepth = GreaterEqualDepth;
+ exports.GridHelper = GridHelper;
+ exports.Group = Group;
+ exports.HalfFloatType = HalfFloatType;
+ exports.HemisphereLight = HemisphereLight;
+ exports.HemisphereLightHelper = HemisphereLightHelper;
+ exports.HemisphereLightProbe = HemisphereLightProbe;
+ exports.IcosahedronBufferGeometry = IcosahedronBufferGeometry;
+ exports.IcosahedronGeometry = IcosahedronGeometry;
+ exports.ImageBitmapLoader = ImageBitmapLoader;
+ exports.ImageLoader = ImageLoader;
+ exports.ImageUtils = ImageUtils;
+ exports.ImmediateRenderObject = ImmediateRenderObject;
+ exports.InstancedBufferAttribute = InstancedBufferAttribute;
+ exports.InstancedBufferGeometry = InstancedBufferGeometry;
+ exports.InstancedInterleavedBuffer = InstancedInterleavedBuffer;
+ exports.Int16Attribute = Int16Attribute;
+ exports.Int16BufferAttribute = Int16BufferAttribute;
+ exports.Int32Attribute = Int32Attribute;
+ exports.Int32BufferAttribute = Int32BufferAttribute;
+ exports.Int8Attribute = Int8Attribute;
+ exports.Int8BufferAttribute = Int8BufferAttribute;
+ exports.IntType = IntType;
+ exports.InterleavedBuffer = InterleavedBuffer;
+ exports.InterleavedBufferAttribute = InterleavedBufferAttribute;
+ exports.Interpolant = Interpolant;
+ exports.InterpolateDiscrete = InterpolateDiscrete;
+ exports.InterpolateLinear = InterpolateLinear;
+ exports.InterpolateSmooth = InterpolateSmooth;
+ exports.JSONLoader = JSONLoader;
+ exports.KeyframeTrack = KeyframeTrack;
+ exports.LOD = LOD;
+ exports.LatheBufferGeometry = LatheBufferGeometry;
+ exports.LatheGeometry = LatheGeometry;
+ exports.Layers = Layers;
+ exports.LensFlare = LensFlare;
+ exports.LessDepth = LessDepth;
+ exports.LessEqualDepth = LessEqualDepth;
+ exports.Light = Light;
+ exports.LightProbe = LightProbe;
+ exports.LightProbeHelper = LightProbeHelper;
+ exports.LightShadow = LightShadow;
+ exports.Line = Line;
+ exports.Line3 = Line3;
+ exports.LineBasicMaterial = LineBasicMaterial;
+ exports.LineCurve = LineCurve;
+ exports.LineCurve3 = LineCurve3;
+ exports.LineDashedMaterial = LineDashedMaterial;
+ exports.LineLoop = LineLoop;
+ exports.LinePieces = LinePieces;
+ exports.LineSegments = LineSegments;
+ exports.LineStrip = LineStrip;
+ exports.LinearEncoding = LinearEncoding;
+ exports.LinearFilter = LinearFilter;
+ exports.LinearInterpolant = LinearInterpolant;
+ exports.LinearMipMapLinearFilter = LinearMipMapLinearFilter;
+ exports.LinearMipMapNearestFilter = LinearMipMapNearestFilter;
+ exports.LinearToneMapping = LinearToneMapping;
+ exports.Loader = Loader;
+ exports.LoaderUtils = LoaderUtils;
+ exports.LoadingManager = LoadingManager;
+ exports.LogLuvEncoding = LogLuvEncoding;
+ exports.LoopOnce = LoopOnce;
+ exports.LoopPingPong = LoopPingPong;
+ exports.LoopRepeat = LoopRepeat;
+ exports.LuminanceAlphaFormat = LuminanceAlphaFormat;
+ exports.LuminanceFormat = LuminanceFormat;
+ exports.MOUSE = MOUSE;
+ exports.Material = Material;
+ exports.MaterialLoader = MaterialLoader;
+ exports.Math = _Math;
+ exports.Matrix3 = Matrix3;
+ exports.Matrix4 = Matrix4;
+ exports.MaxEquation = MaxEquation;
+ exports.Mesh = Mesh;
+ exports.MeshBasicMaterial = MeshBasicMaterial;
+ exports.MeshDepthMaterial = MeshDepthMaterial;
+ exports.MeshDistanceMaterial = MeshDistanceMaterial;
+ exports.MeshFaceMaterial = MeshFaceMaterial;
+ exports.MeshLambertMaterial = MeshLambertMaterial;
+ exports.MeshMatcapMaterial = MeshMatcapMaterial;
+ exports.MeshNormalMaterial = MeshNormalMaterial;
+ exports.MeshPhongMaterial = MeshPhongMaterial;
+ exports.MeshPhysicalMaterial = MeshPhysicalMaterial;
+ exports.MeshStandardMaterial = MeshStandardMaterial;
+ exports.MeshToonMaterial = MeshToonMaterial;
+ exports.MinEquation = MinEquation;
exports.MirroredRepeatWrapping = MirroredRepeatWrapping;
+ exports.MixOperation = MixOperation;
+ exports.MultiMaterial = MultiMaterial;
+ exports.MultiplyBlending = MultiplyBlending;
+ exports.MultiplyOperation = MultiplyOperation;
exports.NearestFilter = NearestFilter;
- exports.NearestMipMapNearestFilter = NearestMipMapNearestFilter;
exports.NearestMipMapLinearFilter = NearestMipMapLinearFilter;
- exports.LinearFilter = LinearFilter;
- exports.LinearMipMapNearestFilter = LinearMipMapNearestFilter;
- exports.LinearMipMapLinearFilter = LinearMipMapLinearFilter;
- exports.UnsignedByteType = UnsignedByteType;
- exports.ByteType = ByteType;
- exports.ShortType = ShortType;
- exports.UnsignedShortType = UnsignedShortType;
- exports.IntType = IntType;
- exports.UnsignedIntType = UnsignedIntType;
- exports.FloatType = FloatType;
- exports.HalfFloatType = HalfFloatType;
- exports.UnsignedShort4444Type = UnsignedShort4444Type;
- exports.UnsignedShort5551Type = UnsignedShort5551Type;
- exports.UnsignedShort565Type = UnsignedShort565Type;
- exports.UnsignedInt248Type = UnsignedInt248Type;
- exports.AlphaFormat = AlphaFormat;
- exports.RGBFormat = RGBFormat;
+ exports.NearestMipMapNearestFilter = NearestMipMapNearestFilter;
+ exports.NeverDepth = NeverDepth;
+ exports.NoBlending = NoBlending;
+ exports.NoColors = NoColors;
+ exports.NoToneMapping = NoToneMapping;
+ exports.NormalBlending = NormalBlending;
+ exports.NotEqualDepth = NotEqualDepth;
+ exports.NumberKeyframeTrack = NumberKeyframeTrack;
+ exports.Object3D = Object3D;
+ exports.ObjectLoader = ObjectLoader;
+ exports.ObjectSpaceNormalMap = ObjectSpaceNormalMap;
+ exports.OctahedronBufferGeometry = OctahedronBufferGeometry;
+ exports.OctahedronGeometry = OctahedronGeometry;
+ exports.OneFactor = OneFactor;
+ exports.OneMinusDstAlphaFactor = OneMinusDstAlphaFactor;
+ exports.OneMinusDstColorFactor = OneMinusDstColorFactor;
+ exports.OneMinusSrcAlphaFactor = OneMinusSrcAlphaFactor;
+ exports.OneMinusSrcColorFactor = OneMinusSrcColorFactor;
+ exports.OrthographicCamera = OrthographicCamera;
+ exports.PCFShadowMap = PCFShadowMap;
+ exports.PCFSoftShadowMap = PCFSoftShadowMap;
+ exports.ParametricBufferGeometry = ParametricBufferGeometry;
+ exports.ParametricGeometry = ParametricGeometry;
+ exports.Particle = Particle;
+ exports.ParticleBasicMaterial = ParticleBasicMaterial;
+ exports.ParticleSystem = ParticleSystem;
+ exports.ParticleSystemMaterial = ParticleSystemMaterial;
+ exports.Path = Path;
+ exports.PerspectiveCamera = PerspectiveCamera;
+ exports.Plane = Plane;
+ exports.PlaneBufferGeometry = PlaneBufferGeometry;
+ exports.PlaneGeometry = PlaneGeometry;
+ exports.PlaneHelper = PlaneHelper;
+ exports.PointCloud = PointCloud;
+ exports.PointCloudMaterial = PointCloudMaterial;
+ exports.PointLight = PointLight;
+ exports.PointLightHelper = PointLightHelper;
+ exports.Points = Points;
+ exports.PointsMaterial = PointsMaterial;
+ exports.PolarGridHelper = PolarGridHelper;
+ exports.PolyhedronBufferGeometry = PolyhedronBufferGeometry;
+ exports.PolyhedronGeometry = PolyhedronGeometry;
+ exports.PositionalAudio = PositionalAudio;
+ exports.PositionalAudioHelper = PositionalAudioHelper;
+ exports.PropertyBinding = PropertyBinding;
+ exports.PropertyMixer = PropertyMixer;
+ exports.QuadraticBezierCurve = QuadraticBezierCurve;
+ exports.QuadraticBezierCurve3 = QuadraticBezierCurve3;
+ exports.Quaternion = Quaternion;
+ exports.QuaternionKeyframeTrack = QuaternionKeyframeTrack;
+ exports.QuaternionLinearInterpolant = QuaternionLinearInterpolant;
+ exports.REVISION = REVISION;
+ exports.RGBADepthPacking = RGBADepthPacking;
exports.RGBAFormat = RGBAFormat;
- exports.LuminanceFormat = LuminanceFormat;
- exports.LuminanceAlphaFormat = LuminanceAlphaFormat;
- exports.RGBEFormat = RGBEFormat;
- exports.DepthFormat = DepthFormat;
- exports.DepthStencilFormat = DepthStencilFormat;
- exports.RedFormat = RedFormat;
- exports.RGB_S3TC_DXT1_Format = RGB_S3TC_DXT1_Format;
- exports.RGBA_S3TC_DXT1_Format = RGBA_S3TC_DXT1_Format;
- exports.RGBA_S3TC_DXT3_Format = RGBA_S3TC_DXT3_Format;
- exports.RGBA_S3TC_DXT5_Format = RGBA_S3TC_DXT5_Format;
- exports.RGB_PVRTC_4BPPV1_Format = RGB_PVRTC_4BPPV1_Format;
- exports.RGB_PVRTC_2BPPV1_Format = RGB_PVRTC_2BPPV1_Format;
- exports.RGBA_PVRTC_4BPPV1_Format = RGBA_PVRTC_4BPPV1_Format;
- exports.RGBA_PVRTC_2BPPV1_Format = RGBA_PVRTC_2BPPV1_Format;
- exports.RGB_ETC1_Format = RGB_ETC1_Format;
+ exports.RGBA_ASTC_10x10_Format = RGBA_ASTC_10x10_Format;
+ exports.RGBA_ASTC_10x5_Format = RGBA_ASTC_10x5_Format;
+ exports.RGBA_ASTC_10x6_Format = RGBA_ASTC_10x6_Format;
+ exports.RGBA_ASTC_10x8_Format = RGBA_ASTC_10x8_Format;
+ exports.RGBA_ASTC_12x10_Format = RGBA_ASTC_12x10_Format;
+ exports.RGBA_ASTC_12x12_Format = RGBA_ASTC_12x12_Format;
exports.RGBA_ASTC_4x4_Format = RGBA_ASTC_4x4_Format;
exports.RGBA_ASTC_5x4_Format = RGBA_ASTC_5x4_Format;
exports.RGBA_ASTC_5x5_Format = RGBA_ASTC_5x5_Format;
@@ -48980,73 +49027,127 @@
exports.RGBA_ASTC_8x5_Format = RGBA_ASTC_8x5_Format;
exports.RGBA_ASTC_8x6_Format = RGBA_ASTC_8x6_Format;
exports.RGBA_ASTC_8x8_Format = RGBA_ASTC_8x8_Format;
- exports.RGBA_ASTC_10x5_Format = RGBA_ASTC_10x5_Format;
- exports.RGBA_ASTC_10x6_Format = RGBA_ASTC_10x6_Format;
- exports.RGBA_ASTC_10x8_Format = RGBA_ASTC_10x8_Format;
- exports.RGBA_ASTC_10x10_Format = RGBA_ASTC_10x10_Format;
- exports.RGBA_ASTC_12x10_Format = RGBA_ASTC_12x10_Format;
- exports.RGBA_ASTC_12x12_Format = RGBA_ASTC_12x12_Format;
- exports.LoopOnce = LoopOnce;
- exports.LoopRepeat = LoopRepeat;
- exports.LoopPingPong = LoopPingPong;
- exports.InterpolateDiscrete = InterpolateDiscrete;
- exports.InterpolateLinear = InterpolateLinear;
- exports.InterpolateSmooth = InterpolateSmooth;
- exports.ZeroCurvatureEnding = ZeroCurvatureEnding;
- exports.ZeroSlopeEnding = ZeroSlopeEnding;
- exports.WrapAroundEnding = WrapAroundEnding;
- exports.TrianglesDrawMode = TrianglesDrawMode;
- exports.TriangleStripDrawMode = TriangleStripDrawMode;
- exports.TriangleFanDrawMode = TriangleFanDrawMode;
- exports.LinearEncoding = LinearEncoding;
- exports.sRGBEncoding = sRGBEncoding;
- exports.GammaEncoding = GammaEncoding;
+ exports.RGBA_PVRTC_2BPPV1_Format = RGBA_PVRTC_2BPPV1_Format;
+ exports.RGBA_PVRTC_4BPPV1_Format = RGBA_PVRTC_4BPPV1_Format;
+ exports.RGBA_S3TC_DXT1_Format = RGBA_S3TC_DXT1_Format;
+ exports.RGBA_S3TC_DXT3_Format = RGBA_S3TC_DXT3_Format;
+ exports.RGBA_S3TC_DXT5_Format = RGBA_S3TC_DXT5_Format;
+ exports.RGBDEncoding = RGBDEncoding;
exports.RGBEEncoding = RGBEEncoding;
- exports.LogLuvEncoding = LogLuvEncoding;
- exports.RGBM7Encoding = RGBM7Encoding;
+ exports.RGBEFormat = RGBEFormat;
+ exports.RGBFormat = RGBFormat;
exports.RGBM16Encoding = RGBM16Encoding;
- exports.RGBDEncoding = RGBDEncoding;
- exports.BasicDepthPacking = BasicDepthPacking;
- exports.RGBADepthPacking = RGBADepthPacking;
+ exports.RGBM7Encoding = RGBM7Encoding;
+ exports.RGB_ETC1_Format = RGB_ETC1_Format;
+ exports.RGB_PVRTC_2BPPV1_Format = RGB_PVRTC_2BPPV1_Format;
+ exports.RGB_PVRTC_4BPPV1_Format = RGB_PVRTC_4BPPV1_Format;
+ exports.RGB_S3TC_DXT1_Format = RGB_S3TC_DXT1_Format;
+ exports.RawShaderMaterial = RawShaderMaterial;
+ exports.Ray = Ray;
+ exports.Raycaster = Raycaster;
+ exports.RectAreaLight = RectAreaLight;
+ exports.RectAreaLightHelper = RectAreaLightHelper;
+ exports.RedFormat = RedFormat;
+ exports.ReinhardToneMapping = ReinhardToneMapping;
+ exports.RepeatWrapping = RepeatWrapping;
+ exports.ReverseSubtractEquation = ReverseSubtractEquation;
+ exports.RingBufferGeometry = RingBufferGeometry;
+ exports.RingGeometry = RingGeometry;
+ exports.Scene = Scene;
+ exports.SceneUtils = SceneUtils;
+ exports.ShaderChunk = ShaderChunk;
+ exports.ShaderLib = ShaderLib;
+ exports.ShaderMaterial = ShaderMaterial;
+ exports.ShadowMaterial = ShadowMaterial;
+ exports.Shape = Shape;
+ exports.ShapeBufferGeometry = ShapeBufferGeometry;
+ exports.ShapeGeometry = ShapeGeometry;
+ exports.ShapePath = ShapePath;
+ exports.ShapeUtils = ShapeUtils;
+ exports.ShortType = ShortType;
+ exports.Skeleton = Skeleton;
+ exports.SkeletonHelper = SkeletonHelper;
+ exports.SkinnedMesh = SkinnedMesh;
+ exports.SmoothShading = SmoothShading;
+ exports.Sphere = Sphere;
+ exports.SphereBufferGeometry = SphereBufferGeometry;
+ exports.SphereGeometry = SphereGeometry;
+ exports.Spherical = Spherical;
+ exports.SphericalHarmonics3 = SphericalHarmonics3;
+ exports.SphericalReflectionMapping = SphericalReflectionMapping;
+ exports.Spline = Spline;
+ exports.SplineCurve = SplineCurve;
+ exports.SplineCurve3 = SplineCurve3;
+ exports.SpotLight = SpotLight;
+ exports.SpotLightHelper = SpotLightHelper;
+ exports.SpotLightShadow = SpotLightShadow;
+ exports.Sprite = Sprite;
+ exports.SpriteMaterial = SpriteMaterial;
+ exports.SrcAlphaFactor = SrcAlphaFactor;
+ exports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor;
+ exports.SrcColorFactor = SrcColorFactor;
+ exports.StereoCamera = StereoCamera;
+ exports.StringKeyframeTrack = StringKeyframeTrack;
+ exports.SubtractEquation = SubtractEquation;
+ exports.SubtractiveBlending = SubtractiveBlending;
exports.TangentSpaceNormalMap = TangentSpaceNormalMap;
- exports.ObjectSpaceNormalMap = ObjectSpaceNormalMap;
- exports.Face4 = Face4;
- exports.LineStrip = LineStrip;
- exports.LinePieces = LinePieces;
- exports.MeshFaceMaterial = MeshFaceMaterial;
- exports.MultiMaterial = MultiMaterial;
- exports.PointCloud = PointCloud;
- exports.Particle = Particle;
- exports.ParticleSystem = ParticleSystem;
- exports.PointCloudMaterial = PointCloudMaterial;
- exports.ParticleBasicMaterial = ParticleBasicMaterial;
- exports.ParticleSystemMaterial = ParticleSystemMaterial;
- exports.Vertex = Vertex;
- exports.DynamicBufferAttribute = DynamicBufferAttribute;
- exports.Int8Attribute = Int8Attribute;
- exports.Uint8Attribute = Uint8Attribute;
- exports.Uint8ClampedAttribute = Uint8ClampedAttribute;
- exports.Int16Attribute = Int16Attribute;
+ exports.TetrahedronBufferGeometry = TetrahedronBufferGeometry;
+ exports.TetrahedronGeometry = TetrahedronGeometry;
+ exports.TextBufferGeometry = TextBufferGeometry;
+ exports.TextGeometry = TextGeometry;
+ exports.Texture = Texture;
+ exports.TextureLoader = TextureLoader;
+ exports.TorusBufferGeometry = TorusBufferGeometry;
+ exports.TorusGeometry = TorusGeometry;
+ exports.TorusKnotBufferGeometry = TorusKnotBufferGeometry;
+ exports.TorusKnotGeometry = TorusKnotGeometry;
+ exports.Triangle = Triangle;
+ exports.TriangleFanDrawMode = TriangleFanDrawMode;
+ exports.TriangleStripDrawMode = TriangleStripDrawMode;
+ exports.TrianglesDrawMode = TrianglesDrawMode;
+ exports.TubeBufferGeometry = TubeBufferGeometry;
+ exports.TubeGeometry = TubeGeometry;
+ exports.UVMapping = UVMapping;
exports.Uint16Attribute = Uint16Attribute;
- exports.Int32Attribute = Int32Attribute;
+ exports.Uint16BufferAttribute = Uint16BufferAttribute;
exports.Uint32Attribute = Uint32Attribute;
- exports.Float32Attribute = Float32Attribute;
- exports.Float64Attribute = Float64Attribute;
- exports.ClosedSplineCurve3 = ClosedSplineCurve3;
- exports.SplineCurve3 = SplineCurve3;
- exports.Spline = Spline;
- exports.AxisHelper = AxisHelper;
- exports.BoundingBoxHelper = BoundingBoxHelper;
- exports.EdgesHelper = EdgesHelper;
+ exports.Uint32BufferAttribute = Uint32BufferAttribute;
+ exports.Uint8Attribute = Uint8Attribute;
+ exports.Uint8BufferAttribute = Uint8BufferAttribute;
+ exports.Uint8ClampedAttribute = Uint8ClampedAttribute;
+ exports.Uint8ClampedBufferAttribute = Uint8ClampedBufferAttribute;
+ exports.Uncharted2ToneMapping = Uncharted2ToneMapping;
+ exports.Uniform = Uniform;
+ exports.UniformsLib = UniformsLib;
+ exports.UniformsUtils = UniformsUtils;
+ exports.UnsignedByteType = UnsignedByteType;
+ exports.UnsignedInt248Type = UnsignedInt248Type;
+ exports.UnsignedIntType = UnsignedIntType;
+ exports.UnsignedShort4444Type = UnsignedShort4444Type;
+ exports.UnsignedShort5551Type = UnsignedShort5551Type;
+ exports.UnsignedShort565Type = UnsignedShort565Type;
+ exports.UnsignedShortType = UnsignedShortType;
+ exports.Vector2 = Vector2;
+ exports.Vector3 = Vector3;
+ exports.Vector4 = Vector4;
+ exports.VectorKeyframeTrack = VectorKeyframeTrack;
+ exports.Vertex = Vertex;
+ exports.VertexColors = VertexColors;
+ exports.VertexNormalsHelper = VertexNormalsHelper;
+ exports.VideoTexture = VideoTexture;
+ exports.WebGLMultisampleRenderTarget = WebGLMultisampleRenderTarget;
+ exports.WebGLRenderTarget = WebGLRenderTarget;
+ exports.WebGLRenderTargetCube = WebGLRenderTargetCube;
+ exports.WebGLRenderer = WebGLRenderer;
+ exports.WebGLUtils = WebGLUtils;
+ exports.WireframeGeometry = WireframeGeometry;
exports.WireframeHelper = WireframeHelper;
+ exports.WrapAroundEnding = WrapAroundEnding;
exports.XHRLoader = XHRLoader;
- exports.BinaryTextureLoader = BinaryTextureLoader;
- exports.GeometryUtils = GeometryUtils;
- exports.Projector = Projector;
- exports.CanvasRenderer = CanvasRenderer;
- exports.JSONLoader = JSONLoader;
- exports.SceneUtils = SceneUtils;
- exports.LensFlare = LensFlare;
+ exports.ZeroCurvatureEnding = ZeroCurvatureEnding;
+ exports.ZeroFactor = ZeroFactor;
+ exports.ZeroSlopeEnding = ZeroSlopeEnding;
+ exports.sRGBEncoding = sRGBEncoding;
Object.defineProperty(exports, '__esModule', { value: true });
diff --git a/core/src/main/resources/org/treblereel/gwt/three4g/resources/js/three.min.js b/core/src/main/resources/org/treblereel/gwt/three4g/resources/js/three.min.js
index 2e58a927..0123525b 100644
--- a/core/src/main/resources/org/treblereel/gwt/three4g/resources/js/three.min.js
+++ b/core/src/main/resources/org/treblereel/gwt/three4g/resources/js/three.min.js
@@ -1,328 +1,329 @@
// threejs.org/license
-(function(k,ta){"object"===typeof exports&&"undefined"!==typeof module?ta(exports):"function"===typeof define&&define.amd?define(["exports"],ta):(k=k||self,ta(k.THREE={}))})(this,function(k){function ta(){}function C(a,b){this.x=a||0;this.y=b||0}function ma(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function n(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function na(){this.elements=[1,0,0,0,1,0,0,0,1];0