@plastic-software/three 0.175.9 → 0.175.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/three.cjs +204 -204
- package/build/three.core.js +158 -158
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +47 -47
- package/build/three.module.min.js +1 -1
- package/build/three.webgpu.js +96 -114
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +96 -114
- package/build/three.webgpu.nodes.min.js +1 -1
- package/package.json +1 -1
package/build/three.webgpu.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
|
-
import { Color, Vector2, Vector3, Vector4, Matrix2, Matrix3, Matrix4, EventDispatcher, MathUtils, WebGLCoordinateSystem, WebGPUCoordinateSystem, ColorManagement, SRGBTransfer, NoToneMapping, StaticDrawUsage, InterleavedBuffer,
|
|
6
|
+
import { Color, Vector2, Vector3, Vector4, Matrix2, Matrix3, Matrix4, EventDispatcher, MathUtils, WebGLCoordinateSystem, WebGPUCoordinateSystem, ColorManagement, SRGBTransfer, NoToneMapping, StaticDrawUsage, InterleavedBuffer, InterleavedBufferAttribute, DynamicDrawUsage, NoColorSpace, UnsignedIntType, IntType, NearestFilter, Sphere, BackSide, Euler, CubeReflectionMapping, CubeRefractionMapping, TangentSpaceNormalMap, ObjectSpaceNormalMap, InstancedInterleavedBuffer, InstancedBufferAttribute, DataArrayTexture, FloatType, FramebufferTexture, LinearMipmapLinearFilter, DepthTexture, Material, NormalBlending, LineBasicMaterial, LineDashedMaterial, NoBlending, MeshNormalMaterial, SRGBColorSpace, WebGLCubeRenderTarget, BoxGeometry, Mesh, Scene, LinearFilter, CubeCamera, CubeTexture, EquirectangularReflectionMapping, EquirectangularRefractionMapping, AddOperation, MixOperation, MultiplyOperation, MeshBasicMaterial, MeshLambertMaterial, MeshPhongMaterial, OrthographicCamera, PerspectiveCamera, RenderTarget, CubeUVReflectionMapping, BufferGeometry, BufferAttribute, LinearSRGBColorSpace, RGBAFormat, HalfFloatType, Texture, MeshStandardMaterial, MeshPhysicalMaterial, MeshToonMaterial, MeshMatcapMaterial, SpriteMaterial, PointsMaterial, ShadowMaterial, Uint32BufferAttribute, Uint16BufferAttribute, arrayNeedsUint32, DoubleSide, Camera, DepthStencilFormat, DepthFormat, UnsignedInt248Type, UnsignedByteType, Plane, Object3D, LinearMipMapLinearFilter, Float32BufferAttribute, UVMapping, LessCompare, VSMShadowMap, RGFormat, BasicShadowMap, SphereGeometry, LinearMipmapNearestFilter, NearestMipmapLinearFilter, Float16BufferAttribute, REVISION, ArrayCamera, PlaneGeometry, FrontSide, CustomBlending, AddEquation, ZeroFactor, CylinderGeometry, Quaternion, WebXRController, RAD2DEG, PCFShadowMap, Frustum, DataTexture, RedIntegerFormat, RedFormat, ShortType, ByteType, UnsignedShortType, RGIntegerFormat, RGBIntegerFormat, RGBFormat, RGBAIntegerFormat, warnOnce, createCanvasElement, ReverseSubtractEquation, SubtractEquation, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, DstAlphaFactor, DstColorFactor, SrcAlphaSaturateFactor, SrcAlphaFactor, SrcColorFactor, OneFactor, CullFaceNone, CullFaceBack, CullFaceFront, MultiplyBlending, SubtractiveBlending, AdditiveBlending, NotEqualDepth, GreaterDepth, GreaterEqualDepth, EqualDepth, LessEqualDepth, LessDepth, AlwaysDepth, NeverDepth, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedInt5999Type, AlphaFormat, LuminanceFormat, LuminanceAlphaFormat, RGB_S3TC_DXT1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGB_PVRTC_4BPPV1_Format, RGB_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_PVRTC_2BPPV1_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGBA_ETC2_EAC_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_10x10_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_BPTC_Format, RED_RGTC1_Format, SIGNED_RED_RGTC1_Format, RED_GREEN_RGTC2_Format, SIGNED_RED_GREEN_RGTC2_Format, MirroredRepeatWrapping, ClampToEdgeWrapping, RepeatWrapping, NearestMipmapNearestFilter, NotEqualCompare, GreaterCompare, GreaterEqualCompare, EqualCompare, LessEqualCompare, AlwaysCompare, NeverCompare, NotEqualStencilFunc, GreaterStencilFunc, GreaterEqualStencilFunc, EqualStencilFunc, LessEqualStencilFunc, LessStencilFunc, AlwaysStencilFunc, NeverStencilFunc, DecrementWrapStencilOp, IncrementWrapStencilOp, DecrementStencilOp, IncrementStencilOp, InvertStencilOp, ReplaceStencilOp, ZeroStencilOp, KeepStencilOp, MaxEquation, MinEquation, SpotLight, PointLight, DirectionalLight, RectAreaLight, AmbientLight, HemisphereLight, LightProbe, LinearToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, AgXToneMapping, NeutralToneMapping, Group, Loader, FileLoader, MaterialLoader, ObjectLoader } from './three.core.js';
|
|
7
7
|
export { AdditiveAnimationBlendMode, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BasicDepthPacking, BatchedMesh, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxHelper, BufferGeometryLoader, Cache, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CircleGeometry, Clock, ColorKeyframeTrack, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, ConstantAlphaFactor, ConstantColorFactor, Controls, CubeTextureLoader, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceFrontBack, Curve, CurvePath, CustomToneMapping, Cylindrical, CylindricalMapping, Data3DTexture, DataTextureLoader, DataUtils, DefaultLoadingManager, DetachedBindMode, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DynamicCopyUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, ExtrudeGeometry, Fog, FogExp2, GLBufferAttribute, GLSL1, GLSL3, GridHelper, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, InstancedBufferGeometry, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, KeyframeTrack, LOD, LatheGeometry, Layers, Light, Line, Line3, LineCurve, LineCurve3, LineLoop, LineSegments, LinearInterpolant, LinearMipMapNearestFilter, LinearTransfer, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, MeshDepthMaterial, MeshDistanceMaterial, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NormalAnimationBlendMode, NumberKeyframeTrack, OctahedronGeometry, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, PCFSoftShadowMap, Path, PlaneHelper, PointLightHelper, Points, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RGBADepthPacking, RGBDepthPacking, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGDepthPacking, RawShaderMaterial, Ray, Raycaster, RenderTarget3D, RenderTargetArray, RingGeometry, ShaderMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, Skeleton, SkeletonHelper, SkinnedMesh, Source, Spherical, SphericalHarmonics3, SplineCurve, SpotLightHelper, Sprite, StaticCopyUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, TOUCH, TetrahedronGeometry, TextureLoader, TextureUtils, TimestampQuery, TorusGeometry, TorusKnotGeometry, TriPlanarMapping, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLRenderTarget, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroSlopeEnding } from './three.core.js';
|
|
8
8
|
|
|
9
9
|
const refreshUniforms = [
|
|
@@ -602,7 +602,7 @@ function getCacheKey$1( object, force = false ) {
|
|
|
602
602
|
|
|
603
603
|
for ( const { property, childNode } of getNodeChildren( object ) ) {
|
|
604
604
|
|
|
605
|
-
values.push( cyrb53( property.slice( 0, -
|
|
605
|
+
values.push( cyrb53( property.slice( 0, -4 ) ), childNode.getCacheKey( force ) );
|
|
606
606
|
|
|
607
607
|
}
|
|
608
608
|
|
|
@@ -825,7 +825,7 @@ function getValueType( value ) {
|
|
|
825
825
|
*/
|
|
826
826
|
function getValueFromType( type, ...params ) {
|
|
827
827
|
|
|
828
|
-
const last4 = type ? type.slice( -
|
|
828
|
+
const last4 = type ? type.slice( -4 ) : undefined;
|
|
829
829
|
|
|
830
830
|
if ( params.length === 1 ) { // ensure same behaviour as in NodeBuilder.format()
|
|
831
831
|
|
|
@@ -3365,7 +3365,7 @@ class ShaderNodeInternal extends Node {
|
|
|
3365
3365
|
|
|
3366
3366
|
const bools = [ false, true ];
|
|
3367
3367
|
const uints = [ 0, 1, 2, 3 ];
|
|
3368
|
-
const ints = [ -
|
|
3368
|
+
const ints = [ -1, -2 ];
|
|
3369
3369
|
const floats = [ 0.5, 1.5, 1 / 3, 1e-6, 1e6, Math.PI, Math.PI * 2, 1 / Math.PI, 2 / Math.PI, 1 / ( Math.PI * 2 ), Math.PI / 2 ];
|
|
3370
3370
|
|
|
3371
3371
|
const boolsCacheMap = new Map();
|
|
@@ -15171,7 +15171,7 @@ class LoopNode extends Node {
|
|
|
15171
15171
|
|
|
15172
15172
|
} else {
|
|
15173
15173
|
|
|
15174
|
-
const internalParam = { start, end
|
|
15174
|
+
const internalParam = { start, end};
|
|
15175
15175
|
|
|
15176
15176
|
//
|
|
15177
15177
|
|
|
@@ -18412,7 +18412,7 @@ class Line2NodeMaterial extends NodeMaterial {
|
|
|
18412
18412
|
|
|
18413
18413
|
const a = cameraProjectionMatrix.element( 2 ).element( 2 ); // 3nd entry in 3th column
|
|
18414
18414
|
const b = cameraProjectionMatrix.element( 3 ).element( 2 ); // 3nd entry in 4th column
|
|
18415
|
-
const nearEstimate = b.mul( -
|
|
18415
|
+
const nearEstimate = b.mul( -0.5 ).div( a );
|
|
18416
18416
|
|
|
18417
18417
|
const alpha = nearEstimate.sub( start.z ).div( end.z.sub( start.z ) );
|
|
18418
18418
|
|
|
@@ -18466,7 +18466,7 @@ class Line2NodeMaterial extends NodeMaterial {
|
|
|
18466
18466
|
// but we need to perform ndc-space calculations in the shader, so we must address this issue directly
|
|
18467
18467
|
// perhaps there is a more elegant solution -- WestLangley
|
|
18468
18468
|
|
|
18469
|
-
const perspective = cameraProjectionMatrix.element( 2 ).element( 3 ).equal( -
|
|
18469
|
+
const perspective = cameraProjectionMatrix.element( 2 ).element( 3 ).equal( -1 ); // 4th entry in the 3rd column
|
|
18470
18470
|
|
|
18471
18471
|
If( perspective, () => {
|
|
18472
18472
|
|
|
@@ -18624,7 +18624,7 @@ class Line2NodeMaterial extends NodeMaterial {
|
|
|
18624
18624
|
|
|
18625
18625
|
const vLineDistance = varyingProperty( 'float', 'lineDistance' );
|
|
18626
18626
|
|
|
18627
|
-
vUv.y.lessThan( -
|
|
18627
|
+
vUv.y.lessThan( -1 ).or( vUv.y.greaterThan( 1.0 ) ).discard(); // discard endcaps
|
|
18628
18628
|
vLineDistance.mod( dashSize.add( gapSize ) ).greaterThan( dashSize ).discard(); // todo - FIX
|
|
18629
18629
|
|
|
18630
18630
|
}
|
|
@@ -18927,7 +18927,7 @@ class EquirectUVNode extends TempNode {
|
|
|
18927
18927
|
const dir = this.dirNode;
|
|
18928
18928
|
|
|
18929
18929
|
const u = dir.z.atan( dir.x ).mul( 1 / ( Math.PI * 2 ) ).add( 0.5 );
|
|
18930
|
-
const v = dir.y.clamp( -
|
|
18930
|
+
const v = dir.y.clamp( -1, 1.0 ).asin().mul( 1 / Math.PI ).add( 0.5 );
|
|
18931
18931
|
|
|
18932
18932
|
return vec2( u, v );
|
|
18933
18933
|
|
|
@@ -19649,7 +19649,7 @@ const F_Schlick = /*@__PURE__*/ Fn( ( { f0, f90, dotVH } ) => {
|
|
|
19649
19649
|
|
|
19650
19650
|
// Optimized variant (presented by Epic at SIGGRAPH '13)
|
|
19651
19651
|
// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf
|
|
19652
|
-
const fresnel = dotVH.mul( -
|
|
19652
|
+
const fresnel = dotVH.mul( -5.55473 ).sub( 6.98316 ).mul( dotVH ).exp2();
|
|
19653
19653
|
|
|
19654
19654
|
return f0.mul( fresnel.oneMinus() ).add( f90.mul( fresnel ) );
|
|
19655
19655
|
|
|
@@ -20130,15 +20130,15 @@ const BRDF_GGX = /*@__PURE__*/ Fn( ( inputs ) => {
|
|
|
20130
20130
|
// https://www.unrealengine.com/blog/physically-based-shading-on-mobile
|
|
20131
20131
|
const DFGApprox = /*@__PURE__*/ Fn( ( { roughness, dotNV } ) => {
|
|
20132
20132
|
|
|
20133
|
-
const c0 = vec4( -
|
|
20133
|
+
const c0 = vec4( -1, -0.0275, -0.572, 0.022 );
|
|
20134
20134
|
|
|
20135
|
-
const c1 = vec4( 1, 0.0425, 1.04, -
|
|
20135
|
+
const c1 = vec4( 1, 0.0425, 1.04, -0.04 );
|
|
20136
20136
|
|
|
20137
20137
|
const r = roughness.mul( c0 ).add( c1 );
|
|
20138
20138
|
|
|
20139
|
-
const a004 = r.x.mul( r.x ).min( dotNV.mul( -
|
|
20139
|
+
const a004 = r.x.mul( r.x ).min( dotNV.mul( -9.28 ).exp2() ).mul( r.x ).add( r.y );
|
|
20140
20140
|
|
|
20141
|
-
const fab = vec2( -
|
|
20141
|
+
const fab = vec2( -1.04, 1.04 ).mul( a004 ).add( r.zw );
|
|
20142
20142
|
|
|
20143
20143
|
return fab;
|
|
20144
20144
|
|
|
@@ -20409,7 +20409,7 @@ const w0 = ( a ) => mul( bC, mul( a, mul( a, a.negate().add( 3.0 ) ).sub( 3.0 )
|
|
|
20409
20409
|
|
|
20410
20410
|
const w1 = ( a ) => mul( bC, mul( a, mul( a, mul( 3.0, a ).sub( 6.0 ) ) ).add( 4.0 ) );
|
|
20411
20411
|
|
|
20412
|
-
const w2 = ( a ) => mul( bC, mul( a, mul( a, mul( -
|
|
20412
|
+
const w2 = ( a ) => mul( bC, mul( a, mul( a, mul( -3, a ).add( 3.0 ) ).add( 3.0 ) ).add( 1.0 ) );
|
|
20413
20413
|
|
|
20414
20414
|
const w3 = ( a ) => mul( bC, pow( a, 3 ) );
|
|
20415
20415
|
|
|
@@ -20418,7 +20418,7 @@ const g0 = ( a ) => w0( a ).add( w1( a ) );
|
|
|
20418
20418
|
const g1 = ( a ) => w2( a ).add( w3( a ) );
|
|
20419
20419
|
|
|
20420
20420
|
// h0 and h1 are the two offset functions
|
|
20421
|
-
const h0 = ( a ) => add( -
|
|
20421
|
+
const h0 = ( a ) => add( -1, w1( a ).div( w0( a ).add( w1( a ) ) ) );
|
|
20422
20422
|
|
|
20423
20423
|
const h1 = ( a ) => add( 1.0, w3( a ).div( w2( a ).add( w3( a ) ) ) );
|
|
20424
20424
|
|
|
@@ -20639,9 +20639,9 @@ const getIBLVolumeRefraction = /*@__PURE__*/ Fn( ( [ n, v, roughness, diffuseCol
|
|
|
20639
20639
|
|
|
20640
20640
|
// XYZ to linear-sRGB color space
|
|
20641
20641
|
const XYZ_TO_REC709 = /*@__PURE__*/ mat3(
|
|
20642
|
-
3.2404542, -
|
|
20643
|
-
-
|
|
20644
|
-
-
|
|
20642
|
+
3.2404542, -0.969266, 0.0556434,
|
|
20643
|
+
-1.5371385, 1.8760108, -0.2040259,
|
|
20644
|
+
-0.4985314, 0.0415560, 1.0572252
|
|
20645
20645
|
);
|
|
20646
20646
|
|
|
20647
20647
|
// Assume air interface for top
|
|
@@ -20670,7 +20670,7 @@ const evalSensitivity = ( OPD, shift ) => {
|
|
|
20670
20670
|
const pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
|
|
20671
20671
|
const VAR = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
|
|
20672
20672
|
|
|
20673
|
-
const x = float( 9.7470e-14 * Math.sqrt( 2.0 * Math.PI * 4.5282e+09 ) ).mul( phase.mul( 2.2399e+06 ).add( shift.x ).cos() ).mul( phase.pow2().mul( -
|
|
20673
|
+
const x = float( 9.7470e-14 * Math.sqrt( 2.0 * Math.PI * 4.5282e+09 ) ).mul( phase.mul( 2.2399e+06 ).add( shift.x ).cos() ).mul( phase.pow2().mul( -45282e5 ).exp() );
|
|
20674
20674
|
|
|
20675
20675
|
let xyz = val.mul( VAR.mul( 2.0 * Math.PI ).sqrt() ).mul( pos.mul( phase ).add( shift ).cos() ).mul( phase.pow2().negate().mul( VAR ).exp() );
|
|
20676
20676
|
xyz = vec3( xyz.x.add( x ), xyz.y, xyz.z ).div( 1.0685e-7 );
|
|
@@ -20771,8 +20771,8 @@ const IBLSheenBRDF = /*@__PURE__*/ Fn( ( { normal, viewDir, roughness } ) => {
|
|
|
20771
20771
|
|
|
20772
20772
|
const a = select(
|
|
20773
20773
|
roughness.lessThan( 0.25 ),
|
|
20774
|
-
float( -
|
|
20775
|
-
float( -
|
|
20774
|
+
float( -339.2 ).mul( r2 ).add( float( 161.4 ).mul( roughness ) ).sub( 25.9 ),
|
|
20775
|
+
float( -8.48 ).mul( r2 ).add( float( 14.3 ).mul( roughness ) ).sub( 9.95 )
|
|
20776
20776
|
);
|
|
20777
20777
|
|
|
20778
20778
|
const b = select(
|
|
@@ -21183,7 +21183,7 @@ class PhysicalLightingModel extends LightingModel {
|
|
|
21183
21183
|
const dotNV = transformedNormalView.dot( positionViewDirection ).clamp(); // @ TODO: Move to core dotNV
|
|
21184
21184
|
|
|
21185
21185
|
const aoNV = dotNV.add( ambientOcclusion );
|
|
21186
|
-
const aoExp = roughness.mul( -
|
|
21186
|
+
const aoExp = roughness.mul( -16 ).oneMinus().negate().exp2();
|
|
21187
21187
|
|
|
21188
21188
|
const aoNode = ambientOcclusion.sub( aoNV.pow( aoExp ).oneMinus() ).clamp();
|
|
21189
21189
|
|
|
@@ -21245,9 +21245,9 @@ class PhysicalLightingModel extends LightingModel {
|
|
|
21245
21245
|
// These defines must match with PMREMGenerator
|
|
21246
21246
|
|
|
21247
21247
|
const cubeUV_r0 = /*@__PURE__*/ float( 1.0 );
|
|
21248
|
-
const cubeUV_m0 = /*@__PURE__*/ float( -
|
|
21248
|
+
const cubeUV_m0 = /*@__PURE__*/ float( -2 );
|
|
21249
21249
|
const cubeUV_r1 = /*@__PURE__*/ float( 0.8 );
|
|
21250
|
-
const cubeUV_m1 = /*@__PURE__*/ float( -
|
|
21250
|
+
const cubeUV_m1 = /*@__PURE__*/ float( -1 );
|
|
21251
21251
|
const cubeUV_r4 = /*@__PURE__*/ float( 0.4 );
|
|
21252
21252
|
const cubeUV_m4 = /*@__PURE__*/ float( 2.0 );
|
|
21253
21253
|
const cubeUV_r5 = /*@__PURE__*/ float( 0.305 );
|
|
@@ -21265,7 +21265,7 @@ const cubeUV_minTileSize = /*@__PURE__*/ float( 16.0 );
|
|
|
21265
21265
|
const getFace = /*@__PURE__*/ Fn( ( [ direction ] ) => {
|
|
21266
21266
|
|
|
21267
21267
|
const absDirection = vec3( abs( direction ) ).toVar();
|
|
21268
|
-
const face = float( -
|
|
21268
|
+
const face = float( -1 ).toVar();
|
|
21269
21269
|
|
|
21270
21270
|
If( absDirection.x.greaterThan( absDirection.z ), () => {
|
|
21271
21271
|
|
|
@@ -21367,7 +21367,7 @@ const roughnessToMip = /*@__PURE__*/ Fn( ( [ roughness ] ) => {
|
|
|
21367
21367
|
|
|
21368
21368
|
} ).Else( () => {
|
|
21369
21369
|
|
|
21370
|
-
mip.assign( float( -
|
|
21370
|
+
mip.assign( float( -2 ).mul( log2( mul( 1.16, roughness ) ) ) ); // 1.16 = 1.79^0.25
|
|
21371
21371
|
|
|
21372
21372
|
} );
|
|
21373
21373
|
|
|
@@ -21395,25 +21395,25 @@ const getDirection = /*@__PURE__*/ Fn( ( [ uv_immutable, face ] ) => {
|
|
|
21395
21395
|
} ).ElseIf( face.equal( 1.0 ), () => {
|
|
21396
21396
|
|
|
21397
21397
|
direction.assign( direction.xzy );
|
|
21398
|
-
direction.xz.mulAssign( -
|
|
21398
|
+
direction.xz.mulAssign( -1 ); // ( -u, 1, -v ) pos y
|
|
21399
21399
|
|
|
21400
21400
|
} ).ElseIf( face.equal( 2.0 ), () => {
|
|
21401
21401
|
|
|
21402
|
-
direction.x.mulAssign( -
|
|
21402
|
+
direction.x.mulAssign( -1 ); // ( -u, v, 1 ) pos z
|
|
21403
21403
|
|
|
21404
21404
|
} ).ElseIf( face.equal( 3.0 ), () => {
|
|
21405
21405
|
|
|
21406
21406
|
direction.assign( direction.zyx );
|
|
21407
|
-
direction.xz.mulAssign( -
|
|
21407
|
+
direction.xz.mulAssign( -1 ); // ( -1, v, -u ) neg x
|
|
21408
21408
|
|
|
21409
21409
|
} ).ElseIf( face.equal( 4.0 ), () => {
|
|
21410
21410
|
|
|
21411
21411
|
direction.assign( direction.xzy );
|
|
21412
|
-
direction.xy.mulAssign( -
|
|
21412
|
+
direction.xy.mulAssign( -1 ); // ( -u, -1, v ) neg y
|
|
21413
21413
|
|
|
21414
21414
|
} ).ElseIf( face.equal( 5.0 ), () => {
|
|
21415
21415
|
|
|
21416
|
-
direction.z.mulAssign( -
|
|
21416
|
+
direction.z.mulAssign( -1 ); // ( u, v, -1 ) neg zS
|
|
21417
21417
|
|
|
21418
21418
|
} );
|
|
21419
21419
|
|
|
@@ -21516,7 +21516,7 @@ const blur = /*@__PURE__*/ Fn( ( { n, latitudinal, poleAxis, outputDirection, we
|
|
|
21516
21516
|
} );
|
|
21517
21517
|
|
|
21518
21518
|
const theta = float( dTheta.mul( float( i ) ) ).toVar();
|
|
21519
|
-
gl_FragColor.addAssign( weights.element( i ).mul( getSample( { theta: theta.mul( -
|
|
21519
|
+
gl_FragColor.addAssign( weights.element( i ).mul( getSample( { theta: theta.mul( -1 ), axis, outputDirection, mipInt, envMap, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP } ) ) );
|
|
21520
21520
|
gl_FragColor.addAssign( weights.element( i ).mul( getSample( { theta, axis, outputDirection, mipInt, envMap, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP } ) ) );
|
|
21521
21521
|
|
|
21522
21522
|
} );
|
|
@@ -21537,7 +21537,7 @@ const EXTRA_LOD_SIGMA = [ 0.125, 0.215, 0.35, 0.446, 0.526, 0.582 ];
|
|
|
21537
21537
|
// samples and exit early, but not recompile the shader.
|
|
21538
21538
|
const MAX_SAMPLES = 20;
|
|
21539
21539
|
|
|
21540
|
-
const _flatCamera = /*@__PURE__*/ new OrthographicCamera( -
|
|
21540
|
+
const _flatCamera = /*@__PURE__*/ new OrthographicCamera( -1, 1, 1, -1, 0, 1 );
|
|
21541
21541
|
const _cubeCamera = /*@__PURE__*/ new PerspectiveCamera( 90, 1 );
|
|
21542
21542
|
const _clearColor$2 = /*@__PURE__*/ new Color();
|
|
21543
21543
|
let _oldTarget = null;
|
|
@@ -21557,9 +21557,9 @@ const _axisDirections = [
|
|
|
21557
21557
|
/*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ),
|
|
21558
21558
|
/*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ),
|
|
21559
21559
|
/*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ),
|
|
21560
|
-
/*@__PURE__*/ new Vector3( -
|
|
21561
|
-
/*@__PURE__*/ new Vector3( 1, 1, -
|
|
21562
|
-
/*@__PURE__*/ new Vector3( -
|
|
21560
|
+
/*@__PURE__*/ new Vector3( -1, 1, -1 ),
|
|
21561
|
+
/*@__PURE__*/ new Vector3( 1, 1, -1 ),
|
|
21562
|
+
/*@__PURE__*/ new Vector3( -1, 1, 1 ),
|
|
21563
21563
|
/*@__PURE__*/ new Vector3( 1, 1, 1 )
|
|
21564
21564
|
];
|
|
21565
21565
|
|
|
@@ -21978,8 +21978,8 @@ class PMREMGenerator {
|
|
|
21978
21978
|
cubeCamera.far = far;
|
|
21979
21979
|
|
|
21980
21980
|
// px, py, pz, nx, ny, nz
|
|
21981
|
-
const upSign = [ 1, 1, 1, 1, -
|
|
21982
|
-
const forwardSign = [ 1, -
|
|
21981
|
+
const upSign = [ 1, 1, 1, 1, -1, 1 ];
|
|
21982
|
+
const forwardSign = [ 1, -1, 1, -1, 1, -1 ];
|
|
21983
21983
|
|
|
21984
21984
|
const renderer = this._renderer;
|
|
21985
21985
|
|
|
@@ -22306,7 +22306,7 @@ function _createPlanes( lodMax ) {
|
|
|
22306
22306
|
for ( let face = 0; face < cubeFaces; face ++ ) {
|
|
22307
22307
|
|
|
22308
22308
|
const x = ( face % 3 ) * 2 / 3 - 1;
|
|
22309
|
-
const y = face > 2 ? 0 : -
|
|
22309
|
+
const y = face > 2 ? 0 : -1;
|
|
22310
22310
|
const coordinates = [
|
|
22311
22311
|
x, y, 0,
|
|
22312
22312
|
x + 2 / 3, y, 0,
|
|
@@ -22465,7 +22465,7 @@ function _getPMREMFromTexture( texture, renderer, generator ) {
|
|
|
22465
22465
|
|
|
22466
22466
|
let cacheTexture = cache.get( texture );
|
|
22467
22467
|
|
|
22468
|
-
const pmremVersion = cacheTexture !== undefined ? cacheTexture.pmremVersion : -
|
|
22468
|
+
const pmremVersion = cacheTexture !== undefined ? cacheTexture.pmremVersion : -1;
|
|
22469
22469
|
|
|
22470
22470
|
if ( pmremVersion !== texture.pmremVersion ) {
|
|
22471
22471
|
|
|
@@ -22685,7 +22685,7 @@ class PMREMNode extends TempNode {
|
|
|
22685
22685
|
|
|
22686
22686
|
let pmrem = this._pmrem;
|
|
22687
22687
|
|
|
22688
|
-
const pmremVersion = pmrem ? pmrem.pmremVersion : -
|
|
22688
|
+
const pmremVersion = pmrem ? pmrem.pmremVersion : -1;
|
|
22689
22689
|
const texture = this._value;
|
|
22690
22690
|
|
|
22691
22691
|
if ( pmremVersion !== texture.pmremVersion ) {
|
|
@@ -29748,7 +29748,7 @@ function getTextureIndex( textures, name ) {
|
|
|
29748
29748
|
|
|
29749
29749
|
}
|
|
29750
29750
|
|
|
29751
|
-
return -
|
|
29751
|
+
return -1;
|
|
29752
29752
|
|
|
29753
29753
|
}
|
|
29754
29754
|
|
|
@@ -30096,7 +30096,7 @@ class FunctionOverloadingNode extends Node {
|
|
|
30096
30096
|
if ( candidateFnCall === null ) {
|
|
30097
30097
|
|
|
30098
30098
|
let candidateFn = null;
|
|
30099
|
-
let candidateScore = -
|
|
30099
|
+
let candidateScore = -1;
|
|
30100
30100
|
|
|
30101
30101
|
for ( const functionNode of this.functionNodes ) {
|
|
30102
30102
|
|
|
@@ -30624,7 +30624,7 @@ const _normal = new Vector3();
|
|
|
30624
30624
|
const _reflectorWorldPosition = new Vector3();
|
|
30625
30625
|
const _cameraWorldPosition = new Vector3();
|
|
30626
30626
|
const _rotationMatrix = new Matrix4();
|
|
30627
|
-
const _lookAtPosition = new Vector3( 0, 0, -
|
|
30627
|
+
const _lookAtPosition = new Vector3( 0, 0, -1 );
|
|
30628
30628
|
const clipPlane = new Vector4();
|
|
30629
30629
|
|
|
30630
30630
|
const _view = new Vector3();
|
|
@@ -31010,7 +31010,7 @@ class ReflectorBaseNode extends Node {
|
|
|
31010
31010
|
|
|
31011
31011
|
_rotationMatrix.extractRotation( camera.matrixWorld );
|
|
31012
31012
|
|
|
31013
|
-
_lookAtPosition.set( 0, 0, -
|
|
31013
|
+
_lookAtPosition.set( 0, 0, -1 );
|
|
31014
31014
|
_lookAtPosition.applyMatrix4( _rotationMatrix );
|
|
31015
31015
|
_lookAtPosition.add( _cameraWorldPosition );
|
|
31016
31016
|
|
|
@@ -31044,7 +31044,7 @@ class ReflectorBaseNode extends Node {
|
|
|
31044
31044
|
|
|
31045
31045
|
_q.x = ( Math.sign( clipPlane.x ) + projectionMatrix.elements[ 8 ] ) / projectionMatrix.elements[ 0 ];
|
|
31046
31046
|
_q.y = ( Math.sign( clipPlane.y ) + projectionMatrix.elements[ 9 ] ) / projectionMatrix.elements[ 5 ];
|
|
31047
|
-
_q.z = -
|
|
31047
|
+
_q.z = -1;
|
|
31048
31048
|
_q.w = ( 1.0 + projectionMatrix.elements[ 10 ] ) / projectionMatrix.elements[ 14 ];
|
|
31049
31049
|
|
|
31050
31050
|
// Calculate the scaled plane vector
|
|
@@ -31111,7 +31111,7 @@ class ReflectorBaseNode extends Node {
|
|
|
31111
31111
|
*/
|
|
31112
31112
|
const reflector = ( parameters ) => nodeObject( new ReflectorNode( parameters ) );
|
|
31113
31113
|
|
|
31114
|
-
const _camera = /*@__PURE__*/ new OrthographicCamera( -
|
|
31114
|
+
const _camera = /*@__PURE__*/ new OrthographicCamera( -1, 1, 1, -1, 0, 1 );
|
|
31115
31115
|
|
|
31116
31116
|
/**
|
|
31117
31117
|
* The purpose of this special geometry is to fill the entire viewport with a single triangle.
|
|
@@ -31132,9 +31132,9 @@ class QuadGeometry extends BufferGeometry {
|
|
|
31132
31132
|
|
|
31133
31133
|
super();
|
|
31134
31134
|
|
|
31135
|
-
const uv = flipY === false ? [ 0, -
|
|
31135
|
+
const uv = flipY === false ? [ 0, -1, 0, 1, 2, 1 ] : [ 0, 2, 0, 0, 2, 0 ];
|
|
31136
31136
|
|
|
31137
|
-
this.setAttribute( 'position', new Float32BufferAttribute( [ -
|
|
31137
|
+
this.setAttribute( 'position', new Float32BufferAttribute( [ -1, 3, 0, -1, -1, 0, 3, -1, 0 ], 3 ) );
|
|
31138
31138
|
this.setAttribute( 'uv', new Float32BufferAttribute( uv, 2 ) );
|
|
31139
31139
|
|
|
31140
31140
|
}
|
|
@@ -31939,7 +31939,7 @@ class SceneNode extends Node {
|
|
|
31939
31939
|
_e1.copy( scene.backgroundRotation );
|
|
31940
31940
|
|
|
31941
31941
|
// accommodate left-handed frame
|
|
31942
|
-
_e1.x *= -
|
|
31942
|
+
_e1.x *= -1; _e1.y *= -1; _e1.z *= -1;
|
|
31943
31943
|
|
|
31944
31944
|
_m1.makeRotationFromEuler( _e1 );
|
|
31945
31945
|
|
|
@@ -32239,23 +32239,23 @@ const normal = Fn( ( { texture, uv } ) => {
|
|
|
32239
32239
|
|
|
32240
32240
|
} ).ElseIf( uv.x.greaterThan( 1 - epsilon ), () => {
|
|
32241
32241
|
|
|
32242
|
-
ret.assign( vec3( -
|
|
32242
|
+
ret.assign( vec3( -1, 0, 0 ) );
|
|
32243
32243
|
|
|
32244
32244
|
} ).ElseIf( uv.y.greaterThan( 1 - epsilon ), () => {
|
|
32245
32245
|
|
|
32246
|
-
ret.assign( vec3( 0, -
|
|
32246
|
+
ret.assign( vec3( 0, -1, 0 ) );
|
|
32247
32247
|
|
|
32248
32248
|
} ).ElseIf( uv.z.greaterThan( 1 - epsilon ), () => {
|
|
32249
32249
|
|
|
32250
|
-
ret.assign( vec3( 0, 0, -
|
|
32250
|
+
ret.assign( vec3( 0, 0, -1 ) );
|
|
32251
32251
|
|
|
32252
32252
|
} ).Else( () => {
|
|
32253
32253
|
|
|
32254
32254
|
const step = 0.01;
|
|
32255
32255
|
|
|
32256
|
-
const x = texture.sample( uv.add( vec3( -
|
|
32257
|
-
const y = texture.sample( uv.add( vec3( 0.0, -
|
|
32258
|
-
const z = texture.sample( uv.add( vec3( 0.0, 0.0, -
|
|
32256
|
+
const x = texture.sample( uv.add( vec3( -0.01, 0.0, 0.0 ) ) ).r.sub( texture.sample( uv.add( vec3( step, 0.0, 0.0 ) ) ).r );
|
|
32257
|
+
const y = texture.sample( uv.add( vec3( 0.0, -0.01, 0.0 ) ) ).r.sub( texture.sample( uv.add( vec3( 0.0, step, 0.0 ) ) ).r );
|
|
32258
|
+
const z = texture.sample( uv.add( vec3( 0.0, 0.0, -0.01 ) ) ).r.sub( texture.sample( uv.add( vec3( 0.0, 0.0, step ) ) ).r );
|
|
32259
32259
|
|
|
32260
32260
|
ret.assign( vec3( x, y, z ) );
|
|
32261
32261
|
|
|
@@ -32920,7 +32920,7 @@ const vibrance = /*@__PURE__*/ Fn( ( [ color, adjustment = float( 1 ) ] ) => {
|
|
|
32920
32920
|
const average = add( color.r, color.g, color.b ).div( 3.0 );
|
|
32921
32921
|
|
|
32922
32922
|
const mx = color.r.max( color.g.max( color.b ) );
|
|
32923
|
-
const amt = mx.sub( average ).mul( adjustment ).mul( -
|
|
32923
|
+
const amt = mx.sub( average ).mul( adjustment ).mul( -3 );
|
|
32924
32924
|
|
|
32925
32925
|
return mix( color.rgb, mx, amt );
|
|
32926
32926
|
|
|
@@ -34102,9 +34102,9 @@ const acesFilmicToneMapping = /*@__PURE__*/ Fn( ( [ color, exposure ] ) => {
|
|
|
34102
34102
|
|
|
34103
34103
|
// ODT_SAT => XYZ => D60_2_D65 => sRGB
|
|
34104
34104
|
const ACESOutputMat = mat3(
|
|
34105
|
-
1.60475, -
|
|
34106
|
-
-
|
|
34107
|
-
-
|
|
34105
|
+
1.60475, -0.53108, -0.07367,
|
|
34106
|
+
-0.10208, 1.10813, -605e-5,
|
|
34107
|
+
-327e-5, -0.07276, 1.07602
|
|
34108
34108
|
);
|
|
34109
34109
|
|
|
34110
34110
|
color = color.mul( exposure ).div( 0.6 );
|
|
@@ -34128,7 +34128,7 @@ const acesFilmicToneMapping = /*@__PURE__*/ Fn( ( [ color, exposure ] ) => {
|
|
|
34128
34128
|
]
|
|
34129
34129
|
} );
|
|
34130
34130
|
|
|
34131
|
-
const LINEAR_REC2020_TO_LINEAR_SRGB = /*@__PURE__*/ mat3( vec3( 1.6605, -
|
|
34131
|
+
const LINEAR_REC2020_TO_LINEAR_SRGB = /*@__PURE__*/ mat3( vec3( 1.6605, -0.1246, -0.0182 ), vec3( -0.5876, 1.1329, -0.1006 ), vec3( -0.0728, -83e-4, 1.1187 ) );
|
|
34132
34132
|
const LINEAR_SRGB_TO_LINEAR_REC2020 = /*@__PURE__*/ mat3( vec3( 0.6274, 0.0691, 0.0164 ), vec3( 0.3293, 0.9195, 0.0880 ), vec3( 0.0433, 0.0113, 0.8956 ) );
|
|
34133
34133
|
|
|
34134
34134
|
const agxDefaultContrastApprox = /*@__PURE__*/ Fn( ( [ x_immutable ] ) => {
|
|
@@ -34154,8 +34154,8 @@ const agxToneMapping = /*@__PURE__*/ Fn( ( [ color, exposure ] ) => {
|
|
|
34154
34154
|
|
|
34155
34155
|
const colortone = vec3( color ).toVar();
|
|
34156
34156
|
const AgXInsetMatrix = mat3( vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) );
|
|
34157
|
-
const AgXOutsetMatrix = mat3( vec3( 1.1271005818144368, -
|
|
34158
|
-
const AgxMinEv = float( -
|
|
34157
|
+
const AgXOutsetMatrix = mat3( vec3( 1.1271005818144368, -0.1413297634984383, -0.14132976349843826 ), vec3( -0.11060664309660323, 1.157823702216272, -0.11060664309660294 ), vec3( -0.016493938717834573, -0.016493938717834257, 1.2519364065950405 ) );
|
|
34158
|
+
const AgxMinEv = float( -12.47393 );
|
|
34159
34159
|
const AgxMaxEv = float( 4.026069 );
|
|
34160
34160
|
colortone.mulAssign( exposure );
|
|
34161
34161
|
colortone.assign( LINEAR_SRGB_TO_LINEAR_REC2020.mul( colortone ) );
|
|
@@ -37629,7 +37629,7 @@ const VSMPassVertical = /*@__PURE__*/ Fn( ( { samples, radius, size, shadowPass
|
|
|
37629
37629
|
const squaredMean = float( 0 ).toVar();
|
|
37630
37630
|
|
|
37631
37631
|
const uvStride = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( 2 ).div( samples.sub( 1 ) ) );
|
|
37632
|
-
const uvStart = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( -
|
|
37632
|
+
const uvStart = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( -1 ) );
|
|
37633
37633
|
|
|
37634
37634
|
Loop( { start: int( 0 ), end: int( samples ), type: 'int', condition: '<' }, ( { i } ) => {
|
|
37635
37635
|
|
|
@@ -37666,7 +37666,7 @@ const VSMPassHorizontal = /*@__PURE__*/ Fn( ( { samples, radius, size, shadowPas
|
|
|
37666
37666
|
const squaredMean = float( 0 ).toVar();
|
|
37667
37667
|
|
|
37668
37668
|
const uvStride = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( 2 ).div( samples.sub( 1 ) ) );
|
|
37669
|
-
const uvStart = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( -
|
|
37669
|
+
const uvStart = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( -1 ) );
|
|
37670
37670
|
|
|
37671
37671
|
Loop( { start: int( 0 ), end: int( samples ), type: 'int', condition: '<' }, ( { i } ) => {
|
|
37672
37672
|
|
|
@@ -38287,7 +38287,7 @@ const BasicPointShadowFilter = /*@__PURE__*/ Fn( ( { depthTexture, bd3D, dp, tex
|
|
|
38287
38287
|
const PointShadowFilter = /*@__PURE__*/ Fn( ( { depthTexture, bd3D, dp, texelSize, shadow } ) => {
|
|
38288
38288
|
|
|
38289
38289
|
const radius = reference( 'radius', 'float', shadow ).setGroup( renderGroup );
|
|
38290
|
-
const offset = vec2( -
|
|
38290
|
+
const offset = vec2( -1, 1.0 ).mul( radius ).mul( texelSize.y );
|
|
38291
38291
|
|
|
38292
38292
|
return texture( depthTexture, cubeToUV( bd3D.add( offset.xyy ), texelSize.y ) ).compare( dp )
|
|
38293
38293
|
.add( texture( depthTexture, cubeToUV( bd3D.add( offset.yyy ), texelSize.y ) ).compare( dp ) )
|
|
@@ -39936,9 +39936,9 @@ const mx_worley_noise_float_0 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immuta
|
|
|
39936
39936
|
const localpos = vec2( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ) ).toVar();
|
|
39937
39937
|
const sqdist = float( 1e6 ).toVar();
|
|
39938
39938
|
|
|
39939
|
-
Loop( { start: -
|
|
39939
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
39940
39940
|
|
|
39941
|
-
Loop( { start: -
|
|
39941
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
39942
39942
|
|
|
39943
39943
|
const dist = float( mx_worley_distance( localpos, x, y, X, Y, jitter, metric ) ).toVar();
|
|
39944
39944
|
sqdist.assign( min$1( sqdist, dist ) );
|
|
@@ -39974,9 +39974,9 @@ const mx_worley_noise_vec2_0 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutab
|
|
|
39974
39974
|
const localpos = vec2( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ) ).toVar();
|
|
39975
39975
|
const sqdist = vec2( 1e6, 1e6 ).toVar();
|
|
39976
39976
|
|
|
39977
|
-
Loop( { start: -
|
|
39977
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
39978
39978
|
|
|
39979
|
-
Loop( { start: -
|
|
39979
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
39980
39980
|
|
|
39981
39981
|
const dist = float( mx_worley_distance( localpos, x, y, X, Y, jitter, metric ) ).toVar();
|
|
39982
39982
|
|
|
@@ -40022,9 +40022,9 @@ const mx_worley_noise_vec3_0 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutab
|
|
|
40022
40022
|
const localpos = vec2( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ) ).toVar();
|
|
40023
40023
|
const sqdist = vec3( 1e6, 1e6, 1e6 ).toVar();
|
|
40024
40024
|
|
|
40025
|
-
Loop( { start: -
|
|
40025
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
40026
40026
|
|
|
40027
|
-
Loop( { start: -
|
|
40027
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
40028
40028
|
|
|
40029
40029
|
const dist = float( mx_worley_distance( localpos, x, y, X, Y, jitter, metric ) ).toVar();
|
|
40030
40030
|
|
|
@@ -40076,11 +40076,11 @@ const mx_worley_noise_float_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immuta
|
|
|
40076
40076
|
const localpos = vec3( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ), mx_floorfrac( p.z, Z ) ).toVar();
|
|
40077
40077
|
const sqdist = float( 1e6 ).toVar();
|
|
40078
40078
|
|
|
40079
|
-
Loop( { start: -
|
|
40079
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
40080
40080
|
|
|
40081
|
-
Loop( { start: -
|
|
40081
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
40082
40082
|
|
|
40083
|
-
Loop( { start: -
|
|
40083
|
+
Loop( { start: -1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
|
|
40084
40084
|
|
|
40085
40085
|
const dist = float( mx_worley_distance( localpos, x, y, z, X, Y, Z, jitter, metric ) ).toVar();
|
|
40086
40086
|
sqdist.assign( min$1( sqdist, dist ) );
|
|
@@ -40120,11 +40120,11 @@ const mx_worley_noise_vec2_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutab
|
|
|
40120
40120
|
const localpos = vec3( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ), mx_floorfrac( p.z, Z ) ).toVar();
|
|
40121
40121
|
const sqdist = vec2( 1e6, 1e6 ).toVar();
|
|
40122
40122
|
|
|
40123
|
-
Loop( { start: -
|
|
40123
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
40124
40124
|
|
|
40125
|
-
Loop( { start: -
|
|
40125
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
40126
40126
|
|
|
40127
|
-
Loop( { start: -
|
|
40127
|
+
Loop( { start: -1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
|
|
40128
40128
|
|
|
40129
40129
|
const dist = float( mx_worley_distance( localpos, x, y, z, X, Y, Z, jitter, metric ) ).toVar();
|
|
40130
40130
|
|
|
@@ -40174,11 +40174,11 @@ const mx_worley_noise_vec3_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutab
|
|
|
40174
40174
|
const localpos = vec3( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ), mx_floorfrac( p.z, Z ) ).toVar();
|
|
40175
40175
|
const sqdist = vec3( 1e6, 1e6, 1e6 ).toVar();
|
|
40176
40176
|
|
|
40177
|
-
Loop( { start: -
|
|
40177
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
40178
40178
|
|
|
40179
|
-
Loop( { start: -
|
|
40179
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
40180
40180
|
|
|
40181
|
-
Loop( { start: -
|
|
40181
|
+
Loop( { start: -1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
|
|
40182
40182
|
|
|
40183
40183
|
const dist = float( mx_worley_distance( localpos, x, y, z, X, Y, Z, jitter, metric ) ).toVar();
|
|
40184
40184
|
|
|
@@ -40447,7 +40447,7 @@ const getParallaxCorrectNormal = /*@__PURE__*/ Fn( ( [ normal, cubeSize, cubePos
|
|
|
40447
40447
|
|
|
40448
40448
|
const nDir = normalize( normal ).toVar();
|
|
40449
40449
|
const rbmax = sub( float( 0.5 ).mul( cubeSize.sub( cubePos ) ), positionWorld ).div( nDir ).toVar();
|
|
40450
|
-
const rbmin = sub( float( -
|
|
40450
|
+
const rbmin = sub( float( -0.5 ).mul( cubeSize.sub( cubePos ) ), positionWorld ).div( nDir ).toVar();
|
|
40451
40451
|
const rbminmax = vec3().toVar();
|
|
40452
40452
|
rbminmax.x = nDir.x.greaterThan( float( 0 ) ).select( rbmax.x, rbmin.x );
|
|
40453
40453
|
rbminmax.y = nDir.y.greaterThan( float( 0 ) ).select( rbmax.y, rbmin.y );
|
|
@@ -44591,7 +44591,7 @@ class NodeBuilder {
|
|
|
44591
44591
|
*/
|
|
44592
44592
|
removeFlowTab() {
|
|
44593
44593
|
|
|
44594
|
-
this.tab = this.tab.slice( 0, -
|
|
44594
|
+
this.tab = this.tab.slice( 0, -1 );
|
|
44595
44595
|
|
|
44596
44596
|
return this;
|
|
44597
44597
|
|
|
@@ -46205,7 +46205,7 @@ const parse$1 = ( source ) => {
|
|
|
46205
46205
|
|
|
46206
46206
|
const pragmaMainIndex = source.indexOf( pragmaMain );
|
|
46207
46207
|
|
|
46208
|
-
const mainCode = pragmaMainIndex !== -
|
|
46208
|
+
const mainCode = pragmaMainIndex !== -1 ? source.slice( pragmaMainIndex + pragmaMain.length ) : source;
|
|
46209
46209
|
|
|
46210
46210
|
const declaration = mainCode.match( declarationRegexp$1 );
|
|
46211
46211
|
|
|
@@ -46274,7 +46274,7 @@ const parse$1 = ( source ) => {
|
|
|
46274
46274
|
|
|
46275
46275
|
const precision = declaration[ 1 ] !== undefined ? declaration[ 1 ] : '';
|
|
46276
46276
|
|
|
46277
|
-
const headerCode = pragmaMainIndex !== -
|
|
46277
|
+
const headerCode = pragmaMainIndex !== -1 ? source.slice( 0, pragmaMainIndex ) : '';
|
|
46278
46278
|
|
|
46279
46279
|
return {
|
|
46280
46280
|
type,
|
|
@@ -48430,7 +48430,7 @@ class XRManager extends EventDispatcher {
|
|
|
48430
48430
|
const material = new MeshBasicMaterial( { color: 0xffffff, side: FrontSide } );
|
|
48431
48431
|
material.map = renderTarget.texture;
|
|
48432
48432
|
material.map.offset.y = 1;
|
|
48433
|
-
material.map.repeat.y = -
|
|
48433
|
+
material.map.repeat.y = -1;
|
|
48434
48434
|
const plane = new Mesh( geometry, material );
|
|
48435
48435
|
plane.position.copy( translation );
|
|
48436
48436
|
plane.quaternion.copy( quaternion );
|
|
@@ -48503,7 +48503,7 @@ class XRManager extends EventDispatcher {
|
|
|
48503
48503
|
const material = new MeshBasicMaterial( { color: 0xffffff, side: BackSide } );
|
|
48504
48504
|
material.map = renderTarget.texture;
|
|
48505
48505
|
material.map.offset.y = 1;
|
|
48506
|
-
material.map.repeat.y = -
|
|
48506
|
+
material.map.repeat.y = -1;
|
|
48507
48507
|
const plane = new Mesh( geometry, material );
|
|
48508
48508
|
plane.position.copy( translation );
|
|
48509
48509
|
plane.quaternion.copy( quaternion );
|
|
@@ -48908,7 +48908,7 @@ function setProjectionFromUnion( camera, cameraL, cameraR ) {
|
|
|
48908
48908
|
camera.matrixWorldInverse.copy( camera.matrixWorld ).invert();
|
|
48909
48909
|
|
|
48910
48910
|
// Check if the projection uses an infinite far plane.
|
|
48911
|
-
if ( projL[ 10 ] === -
|
|
48911
|
+
if ( projL[ 10 ] === -1 ) {
|
|
48912
48912
|
|
|
48913
48913
|
// Use the projection matrix from the left eye.
|
|
48914
48914
|
// The camera offset is sufficient to include the view volumes
|
|
@@ -48999,7 +48999,7 @@ function onSessionEvent( event ) {
|
|
|
48999
48999
|
|
|
49000
49000
|
const controllerIndex = this._controllerInputSources.indexOf( event.inputSource );
|
|
49001
49001
|
|
|
49002
|
-
if ( controllerIndex === -
|
|
49002
|
+
if ( controllerIndex === -1 ) {
|
|
49003
49003
|
|
|
49004
49004
|
return;
|
|
49005
49005
|
|
|
@@ -49141,7 +49141,7 @@ function onInputSourcesChange( event ) {
|
|
|
49141
49141
|
|
|
49142
49142
|
let controllerIndex = controllerInputSources.indexOf( inputSource );
|
|
49143
49143
|
|
|
49144
|
-
if ( controllerIndex === -
|
|
49144
|
+
if ( controllerIndex === -1 ) {
|
|
49145
49145
|
|
|
49146
49146
|
// Assign input source a controller that currently has no input source
|
|
49147
49147
|
|
|
@@ -49165,7 +49165,7 @@ function onInputSourcesChange( event ) {
|
|
|
49165
49165
|
|
|
49166
49166
|
// If all controllers do currently receive input we ignore new ones
|
|
49167
49167
|
|
|
49168
|
-
if ( controllerIndex === -
|
|
49168
|
+
if ( controllerIndex === -1 ) break;
|
|
49169
49169
|
|
|
49170
49170
|
}
|
|
49171
49171
|
|
|
@@ -52572,7 +52572,7 @@ class UniformsGroup extends UniformBuffer {
|
|
|
52572
52572
|
|
|
52573
52573
|
const index = this.uniforms.indexOf( uniform );
|
|
52574
52574
|
|
|
52575
|
-
if ( index !== -
|
|
52575
|
+
if ( index !== -1 ) {
|
|
52576
52576
|
|
|
52577
52577
|
this.uniforms.splice( index, 1 );
|
|
52578
52578
|
|
|
@@ -61376,9 +61376,7 @@ const GPUCompareFunction = {
|
|
|
61376
61376
|
};
|
|
61377
61377
|
|
|
61378
61378
|
const GPUStoreOp = {
|
|
61379
|
-
Store: 'store'
|
|
61380
|
-
Discard: 'discard'
|
|
61381
|
-
};
|
|
61379
|
+
Store: 'store'};
|
|
61382
61380
|
|
|
61383
61381
|
const GPULoadOp = {
|
|
61384
61382
|
Load: 'load',
|
|
@@ -61386,9 +61384,7 @@ const GPULoadOp = {
|
|
|
61386
61384
|
};
|
|
61387
61385
|
|
|
61388
61386
|
const GPUFrontFace = {
|
|
61389
|
-
CCW: 'ccw'
|
|
61390
|
-
CW: 'cw'
|
|
61391
|
-
};
|
|
61387
|
+
CCW: 'ccw'};
|
|
61392
61388
|
|
|
61393
61389
|
const GPUCullMode = {
|
|
61394
61390
|
None: 'none',
|
|
@@ -61455,9 +61451,6 @@ const GPUTextureFormat = {
|
|
|
61455
61451
|
RGBA32Sint: 'rgba32sint',
|
|
61456
61452
|
RGBA32Float: 'rgba32float',
|
|
61457
61453
|
|
|
61458
|
-
// Depth and stencil formats
|
|
61459
|
-
|
|
61460
|
-
Stencil8: 'stencil8',
|
|
61461
61454
|
Depth16Unorm: 'depth16unorm',
|
|
61462
61455
|
Depth24Plus: 'depth24plus',
|
|
61463
61456
|
Depth24PlusStencil8: 'depth24plus-stencil8',
|
|
@@ -61570,10 +61563,6 @@ const GPUBlendOperation = {
|
|
|
61570
61563
|
|
|
61571
61564
|
const GPUColorWriteFlags = {
|
|
61572
61565
|
None: 0,
|
|
61573
|
-
Red: 0x1,
|
|
61574
|
-
Green: 0x2,
|
|
61575
|
-
Blue: 0x4,
|
|
61576
|
-
Alpha: 0x8,
|
|
61577
61566
|
All: 0xF
|
|
61578
61567
|
};
|
|
61579
61568
|
|
|
@@ -61589,7 +61578,6 @@ const GPUStencilOperation = {
|
|
|
61589
61578
|
};
|
|
61590
61579
|
|
|
61591
61580
|
const GPUBufferBindingType = {
|
|
61592
|
-
Uniform: 'uniform',
|
|
61593
61581
|
Storage: 'storage',
|
|
61594
61582
|
ReadOnlyStorage: 'read-only-storage'
|
|
61595
61583
|
};
|
|
@@ -61609,25 +61597,19 @@ const GPUTextureSampleType = {
|
|
|
61609
61597
|
};
|
|
61610
61598
|
|
|
61611
61599
|
const GPUTextureDimension = {
|
|
61612
|
-
OneD: '1d',
|
|
61613
61600
|
TwoD: '2d',
|
|
61614
61601
|
ThreeD: '3d'
|
|
61615
61602
|
};
|
|
61616
61603
|
|
|
61617
61604
|
const GPUTextureViewDimension = {
|
|
61618
|
-
OneD: '1d',
|
|
61619
61605
|
TwoD: '2d',
|
|
61620
61606
|
TwoDArray: '2d-array',
|
|
61621
61607
|
Cube: 'cube',
|
|
61622
|
-
CubeArray: 'cube-array',
|
|
61623
61608
|
ThreeD: '3d'
|
|
61624
61609
|
};
|
|
61625
61610
|
|
|
61626
61611
|
const GPUTextureAspect = {
|
|
61627
|
-
All: 'all'
|
|
61628
|
-
StencilOnly: 'stencil-only',
|
|
61629
|
-
DepthOnly: 'depth-only'
|
|
61630
|
-
};
|
|
61612
|
+
All: 'all'};
|
|
61631
61613
|
|
|
61632
61614
|
const GPUInputStepMode = {
|
|
61633
61615
|
Vertex: 'vertex',
|