@iwsdk/vite-plugin-dev 1.1.0-rc.0 → 1.1.0-rc.1
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/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -50003,6 +50003,11 @@ if ( typeof window !== 'undefined' ) {
|
|
|
50003
50003
|
* Copyright 2010-2026 Three.js Authors
|
|
50004
50004
|
* SPDX-License-Identifier: MIT
|
|
50005
50005
|
*/
|
|
50006
|
+
|
|
50007
|
+
var common = "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\n#define inverseTransformDirection transformDirectionByInverseViewMatrix\nvec3 transformNormalByInverseViewMatrix( in vec3 normal, in mat4 viewMatrix ) {\n\treturn normalize( ( vec4( normal, 0.0 ) * viewMatrix ).xyz );\n}\nvec3 transformDirectionByInverseViewMatrix( in vec3 dir, in mat4 viewMatrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * viewMatrix ).xyz );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated";
|
|
50008
|
+
|
|
50009
|
+
const ShaderChunk = {
|
|
50010
|
+
common: common};
|
|
50006
50011
|
const _m$1 = /*@__PURE__*/ new Matrix3();
|
|
50007
50012
|
|
|
50008
50013
|
_m$1.set( -1, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 );
|
|
@@ -56261,6 +56266,12 @@ Mesh.prototype.raycast = acceleratedRaycast;
|
|
|
56261
56266
|
BatchedMesh.prototype.computeBoundsTree = computeBatchedBoundsTree;
|
|
56262
56267
|
BatchedMesh.prototype.disposeBoundsTree = disposeBatchedBoundsTree;
|
|
56263
56268
|
BatchedMesh.prototype.raycast = acceleratedRaycast;
|
|
56269
|
+
// super-three's multiview mode (Quest in XR) `#define`s viewMatrix as
|
|
56270
|
+
// viewMatrices[VIEW_ID]. r185's transform*ByInverseViewMatrix helpers in the
|
|
56271
|
+
// common chunk take a parameter named viewMatrix, which that define turns into
|
|
56272
|
+
// an array of non-constant size, so every shader fails to compile in XR.
|
|
56273
|
+
// Rename the parameter; callers still pass viewMatrix.
|
|
56274
|
+
ShaderChunk.common = ShaderChunk.common.replace(/(vec3 transform(?:Normal|Direction)ByInverseViewMatrix\(\s*in vec3 \w+,\s*in mat4 )viewMatrix(\s*\)\s*\{[^}]*?)viewMatrix/g, '$1inverseView$2inverseView');
|
|
56264
56275
|
// export * as Addons from 'three/examples/jsm/Addons.js';
|
|
56265
56276
|
|
|
56266
56277
|
/**
|