ocearo-ui 0.1.4 → 0.1.6
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/404.html +1 -1
- package/_next/static/chunks/12.1cb1cb79af19b45c.js +1 -0
- package/_next/static/chunks/138.29fae0d30cbcb865.js +1 -0
- package/_next/static/chunks/145.227304ec9499ce36.js +1 -0
- package/_next/static/chunks/188.479f10852eda524e.js +1 -0
- package/_next/static/chunks/197.132b62dcc182f536.js +1 -0
- package/_next/static/chunks/199.421b63f3aaefc184.js +1 -0
- package/_next/static/chunks/226.7eef725b0fecdaa6.js +151 -0
- package/_next/static/chunks/252.5cd252da0bf0d804.js +1 -0
- package/_next/static/chunks/254.ee9f315db5848794.js +505 -0
- package/_next/static/chunks/268.1fa9ea171c5d8c55.js +1 -0
- package/_next/static/chunks/353.64fb99ba6a6c1163.js +1 -0
- package/_next/static/chunks/412.0ccf21408ebcc7bf.js +1 -0
- package/_next/static/chunks/496.c422606f44c5ff90.js +1 -0
- package/_next/static/chunks/59.47b617df6daa6a8a.js +1 -0
- package/_next/static/chunks/610.2ae9cfb38673bc98.js +1 -0
- package/_next/static/chunks/687.018d8d41c5427710.js +26 -0
- package/_next/static/chunks/728.a5f9c5c5635aab4e.js +1 -0
- package/_next/static/chunks/73.bd15026ac739c79e.js +1 -0
- package/_next/static/chunks/746-5701803ffb58d9ef.js +1 -0
- package/_next/static/chunks/751.a5a27eb6ba09442d.js +1 -0
- package/_next/static/chunks/79.646c5d2a7f1f2df9.js +1 -0
- package/_next/static/chunks/870fdd6f.bae282addcad29d9.js +1 -0
- package/_next/static/chunks/890.b840b9c2709d5ac5.js +1 -0
- package/_next/static/chunks/909.22022bef0ade2b3a.js +1 -0
- package/_next/static/chunks/936.332956628f439341.js +1 -0
- package/_next/static/chunks/app/page-da06733af0871855.js +1 -0
- package/_next/static/chunks/{main-3fc5e29932a06222.js → main-a509d18d035f234f.js} +1 -1
- package/_next/static/chunks/webpack-312c9b9c20b5091b.js +1 -0
- package/_next/static/css/abdd1ffc5585a364.css +3 -0
- package/icons/mediaplayer/amazon.png +0 -0
- package/icons/mediaplayer/deezer.png +0 -0
- package/icons/mediaplayer/disneyplus.png +0 -0
- package/icons/mediaplayer/netflix.png +0 -0
- package/icons/mediaplayer/youtube.png +0 -0
- package/index.html +1 -1
- package/index.txt +2 -2
- package/{ocearo-ui-0.1.4.tgz → ocearo-ui-0.1.6.tgz} +0 -0
- package/package.json +1 -1
- package/_next/static/chunks/870fdd6f-53e4c81d83a336e0.js +0 -1
- package/_next/static/chunks/875-34a16d45b233a109.js +0 -680
- package/_next/static/chunks/app/page-79c9775d94e17ad1.js +0 -1
- package/_next/static/chunks/webpack-6ba3ee57ba412e0f.js +0 -1
- package/_next/static/css/c20c87eb42004889.css +0 -3
- /package/_next/static/chunks/{0f8af13e-59794c1587e7a41d.js → 0f8af13e.19323e6ac5e18a8c.js} +0 -0
- /package/_next/static/chunks/{b536a0f1-7c94f39427c6b177.js → b536a0f1.31846b3e993f8d95.js} +0 -0
- /package/_next/static/{zPPHCJv8uKI8NHlaiuVWV → q6cCRWRSJkrokJfjy41Tl}/_buildManifest.js +0 -0
- /package/_next/static/{zPPHCJv8uKI8NHlaiuVWV → q6cCRWRSJkrokJfjy41Tl}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[254],{8181:function(e,t,i){let n,r;i.d(t,{x:function(){return O}});var o=i(1119),a=i(2265),s=i(2079),l=i(8124);let d=new s.ZzF,u=new s.Pa4;class c extends s.L5s{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry",this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new s.a$l([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new s.a$l([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){let t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return void 0!==t&&(t.applyMatrix4(e),i.applyMatrix4(e),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let i=new s.$TI(t,6,1);return this.setAttribute("instanceStart",new s.kB5(i,3,0)),this.setAttribute("instanceEnd",new s.kB5(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));let n=new s.$TI(i,2*t,1);return this.setAttribute("instanceColorStart",new s.kB5(n,t,0)),this.setAttribute("instanceColorEnd",new s.kB5(n,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new s.Uk6(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new s.ZzF);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;void 0!==e&&void 0!==t&&(this.boundingBox.setFromBufferAttribute(e),d.setFromBufferAttribute(t),this.boundingBox.union(d))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new s.aLr),null===this.boundingBox&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(void 0!==e&&void 0!==t){let i=this.boundingSphere.center;this.boundingBox.getCenter(i);let n=0;for(let r=0,o=e.count;r<o;r++)u.fromBufferAttribute(e,r),n=Math.max(n,i.distanceToSquared(u)),u.fromBufferAttribute(t,r),n=Math.max(n,i.distanceToSquared(u));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}var f=i(1448),m=i(9074);class p extends s.jyz{constructor(e){super({type:"LineMaterial",uniforms:s.rDY.clone(s.rDY.merge([f.UniformsLib.common,f.UniformsLib.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new s.FM8(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
|
|
2
|
+
#include <common>
|
|
3
|
+
#include <fog_pars_vertex>
|
|
4
|
+
#include <logdepthbuf_pars_vertex>
|
|
5
|
+
#include <clipping_planes_pars_vertex>
|
|
6
|
+
|
|
7
|
+
uniform float linewidth;
|
|
8
|
+
uniform vec2 resolution;
|
|
9
|
+
|
|
10
|
+
attribute vec3 instanceStart;
|
|
11
|
+
attribute vec3 instanceEnd;
|
|
12
|
+
|
|
13
|
+
#ifdef USE_COLOR
|
|
14
|
+
#ifdef USE_LINE_COLOR_ALPHA
|
|
15
|
+
varying vec4 vLineColor;
|
|
16
|
+
attribute vec4 instanceColorStart;
|
|
17
|
+
attribute vec4 instanceColorEnd;
|
|
18
|
+
#else
|
|
19
|
+
varying vec3 vLineColor;
|
|
20
|
+
attribute vec3 instanceColorStart;
|
|
21
|
+
attribute vec3 instanceColorEnd;
|
|
22
|
+
#endif
|
|
23
|
+
#endif
|
|
24
|
+
|
|
25
|
+
#ifdef WORLD_UNITS
|
|
26
|
+
|
|
27
|
+
varying vec4 worldPos;
|
|
28
|
+
varying vec3 worldStart;
|
|
29
|
+
varying vec3 worldEnd;
|
|
30
|
+
|
|
31
|
+
#ifdef USE_DASH
|
|
32
|
+
|
|
33
|
+
varying vec2 vUv;
|
|
34
|
+
|
|
35
|
+
#endif
|
|
36
|
+
|
|
37
|
+
#else
|
|
38
|
+
|
|
39
|
+
varying vec2 vUv;
|
|
40
|
+
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
#ifdef USE_DASH
|
|
44
|
+
|
|
45
|
+
uniform float dashScale;
|
|
46
|
+
attribute float instanceDistanceStart;
|
|
47
|
+
attribute float instanceDistanceEnd;
|
|
48
|
+
varying float vLineDistance;
|
|
49
|
+
|
|
50
|
+
#endif
|
|
51
|
+
|
|
52
|
+
void trimSegment( const in vec4 start, inout vec4 end ) {
|
|
53
|
+
|
|
54
|
+
// trim end segment so it terminates between the camera plane and the near plane
|
|
55
|
+
|
|
56
|
+
// conservative estimate of the near plane
|
|
57
|
+
float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
|
|
58
|
+
float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
|
|
59
|
+
float nearEstimate = - 0.5 * b / a;
|
|
60
|
+
|
|
61
|
+
float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );
|
|
62
|
+
|
|
63
|
+
end.xyz = mix( start.xyz, end.xyz, alpha );
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
void main() {
|
|
68
|
+
|
|
69
|
+
#ifdef USE_COLOR
|
|
70
|
+
|
|
71
|
+
vLineColor = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;
|
|
72
|
+
|
|
73
|
+
#endif
|
|
74
|
+
|
|
75
|
+
#ifdef USE_DASH
|
|
76
|
+
|
|
77
|
+
vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
|
|
78
|
+
vUv = uv;
|
|
79
|
+
|
|
80
|
+
#endif
|
|
81
|
+
|
|
82
|
+
float aspect = resolution.x / resolution.y;
|
|
83
|
+
|
|
84
|
+
// camera space
|
|
85
|
+
vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
|
|
86
|
+
vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );
|
|
87
|
+
|
|
88
|
+
#ifdef WORLD_UNITS
|
|
89
|
+
|
|
90
|
+
worldStart = start.xyz;
|
|
91
|
+
worldEnd = end.xyz;
|
|
92
|
+
|
|
93
|
+
#else
|
|
94
|
+
|
|
95
|
+
vUv = uv;
|
|
96
|
+
|
|
97
|
+
#endif
|
|
98
|
+
|
|
99
|
+
// special case for perspective projection, and segments that terminate either in, or behind, the camera plane
|
|
100
|
+
// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space
|
|
101
|
+
// but we need to perform ndc-space calculations in the shader, so we must address this issue directly
|
|
102
|
+
// perhaps there is a more elegant solution -- WestLangley
|
|
103
|
+
|
|
104
|
+
bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column
|
|
105
|
+
|
|
106
|
+
if ( perspective ) {
|
|
107
|
+
|
|
108
|
+
if ( start.z < 0.0 && end.z >= 0.0 ) {
|
|
109
|
+
|
|
110
|
+
trimSegment( start, end );
|
|
111
|
+
|
|
112
|
+
} else if ( end.z < 0.0 && start.z >= 0.0 ) {
|
|
113
|
+
|
|
114
|
+
trimSegment( end, start );
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// clip space
|
|
121
|
+
vec4 clipStart = projectionMatrix * start;
|
|
122
|
+
vec4 clipEnd = projectionMatrix * end;
|
|
123
|
+
|
|
124
|
+
// ndc space
|
|
125
|
+
vec3 ndcStart = clipStart.xyz / clipStart.w;
|
|
126
|
+
vec3 ndcEnd = clipEnd.xyz / clipEnd.w;
|
|
127
|
+
|
|
128
|
+
// direction
|
|
129
|
+
vec2 dir = ndcEnd.xy - ndcStart.xy;
|
|
130
|
+
|
|
131
|
+
// account for clip-space aspect ratio
|
|
132
|
+
dir.x *= aspect;
|
|
133
|
+
dir = normalize( dir );
|
|
134
|
+
|
|
135
|
+
#ifdef WORLD_UNITS
|
|
136
|
+
|
|
137
|
+
// get the offset direction as perpendicular to the view vector
|
|
138
|
+
vec3 worldDir = normalize( end.xyz - start.xyz );
|
|
139
|
+
vec3 offset;
|
|
140
|
+
if ( position.y < 0.5 ) {
|
|
141
|
+
|
|
142
|
+
offset = normalize( cross( start.xyz, worldDir ) );
|
|
143
|
+
|
|
144
|
+
} else {
|
|
145
|
+
|
|
146
|
+
offset = normalize( cross( end.xyz, worldDir ) );
|
|
147
|
+
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// sign flip
|
|
151
|
+
if ( position.x < 0.0 ) offset *= - 1.0;
|
|
152
|
+
|
|
153
|
+
float forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) );
|
|
154
|
+
|
|
155
|
+
// don't extend the line if we're rendering dashes because we
|
|
156
|
+
// won't be rendering the endcaps
|
|
157
|
+
#ifndef USE_DASH
|
|
158
|
+
|
|
159
|
+
// extend the line bounds to encompass endcaps
|
|
160
|
+
start.xyz += - worldDir * linewidth * 0.5;
|
|
161
|
+
end.xyz += worldDir * linewidth * 0.5;
|
|
162
|
+
|
|
163
|
+
// shift the position of the quad so it hugs the forward edge of the line
|
|
164
|
+
offset.xy -= dir * forwardOffset;
|
|
165
|
+
offset.z += 0.5;
|
|
166
|
+
|
|
167
|
+
#endif
|
|
168
|
+
|
|
169
|
+
// endcaps
|
|
170
|
+
if ( position.y > 1.0 || position.y < 0.0 ) {
|
|
171
|
+
|
|
172
|
+
offset.xy += dir * 2.0 * forwardOffset;
|
|
173
|
+
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// adjust for linewidth
|
|
177
|
+
offset *= linewidth * 0.5;
|
|
178
|
+
|
|
179
|
+
// set the world position
|
|
180
|
+
worldPos = ( position.y < 0.5 ) ? start : end;
|
|
181
|
+
worldPos.xyz += offset;
|
|
182
|
+
|
|
183
|
+
// project the worldpos
|
|
184
|
+
vec4 clip = projectionMatrix * worldPos;
|
|
185
|
+
|
|
186
|
+
// shift the depth of the projected points so the line
|
|
187
|
+
// segments overlap neatly
|
|
188
|
+
vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;
|
|
189
|
+
clip.z = clipPose.z * clip.w;
|
|
190
|
+
|
|
191
|
+
#else
|
|
192
|
+
|
|
193
|
+
vec2 offset = vec2( dir.y, - dir.x );
|
|
194
|
+
// undo aspect ratio adjustment
|
|
195
|
+
dir.x /= aspect;
|
|
196
|
+
offset.x /= aspect;
|
|
197
|
+
|
|
198
|
+
// sign flip
|
|
199
|
+
if ( position.x < 0.0 ) offset *= - 1.0;
|
|
200
|
+
|
|
201
|
+
// endcaps
|
|
202
|
+
if ( position.y < 0.0 ) {
|
|
203
|
+
|
|
204
|
+
offset += - dir;
|
|
205
|
+
|
|
206
|
+
} else if ( position.y > 1.0 ) {
|
|
207
|
+
|
|
208
|
+
offset += dir;
|
|
209
|
+
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// adjust for linewidth
|
|
213
|
+
offset *= linewidth;
|
|
214
|
+
|
|
215
|
+
// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
|
|
216
|
+
offset /= resolution.y;
|
|
217
|
+
|
|
218
|
+
// select end
|
|
219
|
+
vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;
|
|
220
|
+
|
|
221
|
+
// back to clip space
|
|
222
|
+
offset *= clip.w;
|
|
223
|
+
|
|
224
|
+
clip.xy += offset;
|
|
225
|
+
|
|
226
|
+
#endif
|
|
227
|
+
|
|
228
|
+
gl_Position = clip;
|
|
229
|
+
|
|
230
|
+
vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
|
|
231
|
+
|
|
232
|
+
#include <logdepthbuf_vertex>
|
|
233
|
+
#include <clipping_planes_vertex>
|
|
234
|
+
#include <fog_vertex>
|
|
235
|
+
|
|
236
|
+
}
|
|
237
|
+
`,fragmentShader:`
|
|
238
|
+
uniform vec3 diffuse;
|
|
239
|
+
uniform float opacity;
|
|
240
|
+
uniform float linewidth;
|
|
241
|
+
|
|
242
|
+
#ifdef USE_DASH
|
|
243
|
+
|
|
244
|
+
uniform float dashOffset;
|
|
245
|
+
uniform float dashSize;
|
|
246
|
+
uniform float gapSize;
|
|
247
|
+
|
|
248
|
+
#endif
|
|
249
|
+
|
|
250
|
+
varying float vLineDistance;
|
|
251
|
+
|
|
252
|
+
#ifdef WORLD_UNITS
|
|
253
|
+
|
|
254
|
+
varying vec4 worldPos;
|
|
255
|
+
varying vec3 worldStart;
|
|
256
|
+
varying vec3 worldEnd;
|
|
257
|
+
|
|
258
|
+
#ifdef USE_DASH
|
|
259
|
+
|
|
260
|
+
varying vec2 vUv;
|
|
261
|
+
|
|
262
|
+
#endif
|
|
263
|
+
|
|
264
|
+
#else
|
|
265
|
+
|
|
266
|
+
varying vec2 vUv;
|
|
267
|
+
|
|
268
|
+
#endif
|
|
269
|
+
|
|
270
|
+
#include <common>
|
|
271
|
+
#include <fog_pars_fragment>
|
|
272
|
+
#include <logdepthbuf_pars_fragment>
|
|
273
|
+
#include <clipping_planes_pars_fragment>
|
|
274
|
+
|
|
275
|
+
#ifdef USE_COLOR
|
|
276
|
+
#ifdef USE_LINE_COLOR_ALPHA
|
|
277
|
+
varying vec4 vLineColor;
|
|
278
|
+
#else
|
|
279
|
+
varying vec3 vLineColor;
|
|
280
|
+
#endif
|
|
281
|
+
#endif
|
|
282
|
+
|
|
283
|
+
vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {
|
|
284
|
+
|
|
285
|
+
float mua;
|
|
286
|
+
float mub;
|
|
287
|
+
|
|
288
|
+
vec3 p13 = p1 - p3;
|
|
289
|
+
vec3 p43 = p4 - p3;
|
|
290
|
+
|
|
291
|
+
vec3 p21 = p2 - p1;
|
|
292
|
+
|
|
293
|
+
float d1343 = dot( p13, p43 );
|
|
294
|
+
float d4321 = dot( p43, p21 );
|
|
295
|
+
float d1321 = dot( p13, p21 );
|
|
296
|
+
float d4343 = dot( p43, p43 );
|
|
297
|
+
float d2121 = dot( p21, p21 );
|
|
298
|
+
|
|
299
|
+
float denom = d2121 * d4343 - d4321 * d4321;
|
|
300
|
+
|
|
301
|
+
float numer = d1343 * d4321 - d1321 * d4343;
|
|
302
|
+
|
|
303
|
+
mua = numer / denom;
|
|
304
|
+
mua = clamp( mua, 0.0, 1.0 );
|
|
305
|
+
mub = ( d1343 + d4321 * ( mua ) ) / d4343;
|
|
306
|
+
mub = clamp( mub, 0.0, 1.0 );
|
|
307
|
+
|
|
308
|
+
return vec2( mua, mub );
|
|
309
|
+
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
void main() {
|
|
313
|
+
|
|
314
|
+
#include <clipping_planes_fragment>
|
|
315
|
+
|
|
316
|
+
#ifdef USE_DASH
|
|
317
|
+
|
|
318
|
+
if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps
|
|
319
|
+
|
|
320
|
+
if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX
|
|
321
|
+
|
|
322
|
+
#endif
|
|
323
|
+
|
|
324
|
+
float alpha = opacity;
|
|
325
|
+
|
|
326
|
+
#ifdef WORLD_UNITS
|
|
327
|
+
|
|
328
|
+
// Find the closest points on the view ray and the line segment
|
|
329
|
+
vec3 rayEnd = normalize( worldPos.xyz ) * 1e5;
|
|
330
|
+
vec3 lineDir = worldEnd - worldStart;
|
|
331
|
+
vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );
|
|
332
|
+
|
|
333
|
+
vec3 p1 = worldStart + lineDir * params.x;
|
|
334
|
+
vec3 p2 = rayEnd * params.y;
|
|
335
|
+
vec3 delta = p1 - p2;
|
|
336
|
+
float len = length( delta );
|
|
337
|
+
float norm = len / linewidth;
|
|
338
|
+
|
|
339
|
+
#ifndef USE_DASH
|
|
340
|
+
|
|
341
|
+
#ifdef USE_ALPHA_TO_COVERAGE
|
|
342
|
+
|
|
343
|
+
float dnorm = fwidth( norm );
|
|
344
|
+
alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );
|
|
345
|
+
|
|
346
|
+
#else
|
|
347
|
+
|
|
348
|
+
if ( norm > 0.5 ) {
|
|
349
|
+
|
|
350
|
+
discard;
|
|
351
|
+
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
#endif
|
|
355
|
+
|
|
356
|
+
#endif
|
|
357
|
+
|
|
358
|
+
#else
|
|
359
|
+
|
|
360
|
+
#ifdef USE_ALPHA_TO_COVERAGE
|
|
361
|
+
|
|
362
|
+
// artifacts appear on some hardware if a derivative is taken within a conditional
|
|
363
|
+
float a = vUv.x;
|
|
364
|
+
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
|
|
365
|
+
float len2 = a * a + b * b;
|
|
366
|
+
float dlen = fwidth( len2 );
|
|
367
|
+
|
|
368
|
+
if ( abs( vUv.y ) > 1.0 ) {
|
|
369
|
+
|
|
370
|
+
alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );
|
|
371
|
+
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
#else
|
|
375
|
+
|
|
376
|
+
if ( abs( vUv.y ) > 1.0 ) {
|
|
377
|
+
|
|
378
|
+
float a = vUv.x;
|
|
379
|
+
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
|
|
380
|
+
float len2 = a * a + b * b;
|
|
381
|
+
|
|
382
|
+
if ( len2 > 1.0 ) discard;
|
|
383
|
+
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
#endif
|
|
387
|
+
|
|
388
|
+
#endif
|
|
389
|
+
|
|
390
|
+
vec4 diffuseColor = vec4( diffuse, alpha );
|
|
391
|
+
#ifdef USE_COLOR
|
|
392
|
+
#ifdef USE_LINE_COLOR_ALPHA
|
|
393
|
+
diffuseColor *= vLineColor;
|
|
394
|
+
#else
|
|
395
|
+
diffuseColor.rgb *= vLineColor;
|
|
396
|
+
#endif
|
|
397
|
+
#endif
|
|
398
|
+
|
|
399
|
+
#include <logdepthbuf_fragment>
|
|
400
|
+
|
|
401
|
+
gl_FragColor = diffuseColor;
|
|
402
|
+
|
|
403
|
+
#include <tonemapping_fragment>
|
|
404
|
+
#include <${m.i>=154?"colorspace_fragment":"encodings_fragment"}>
|
|
405
|
+
#include <fog_fragment>
|
|
406
|
+
#include <premultiplied_alpha_fragment>
|
|
407
|
+
|
|
408
|
+
}
|
|
409
|
+
`,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){!0===e?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(e){!!e!="USE_DASH"in this.defines&&(this.needsUpdate=!0),!0===e?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(e){!!e!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),!0===e?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}let v=m.i>=125?"uv1":"uv2",h=new s.Ltg,g=new s.Pa4,y=new s.Pa4,w=new s.Ltg,x=new s.Ltg,S=new s.Ltg,b=new s.Pa4,_=new s.yGw,E=new s.Zzh,L=new s.Pa4,z=new s.ZzF,M=new s.aLr,C=new s.Ltg;function A(e,t,i){return C.set(0,0,-t,1).applyMatrix4(e.projectionMatrix),C.multiplyScalar(1/C.w),C.x=r/i.width,C.y=r/i.height,C.applyMatrix4(e.projectionMatrixInverse),C.multiplyScalar(1/C.w),Math.abs(Math.max(C.x,C.y))}class U extends s.Kj0{constructor(e=new c,t=new p({color:16777215*Math.random()})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){let e=this.geometry,t=e.attributes.instanceStart,i=e.attributes.instanceEnd,n=new Float32Array(2*t.count);for(let e=0,r=0,o=t.count;e<o;e++,r+=2)g.fromBufferAttribute(t,e),y.fromBufferAttribute(i,e),n[r]=0===r?0:n[r-1],n[r+1]=n[r]+g.distanceTo(y);let r=new s.$TI(n,2,1);return e.setAttribute("instanceDistanceStart",new s.kB5(r,1,0)),e.setAttribute("instanceDistanceEnd",new s.kB5(r,1,1)),this}raycast(e,t){let i,o;let a=this.material.worldUnits,l=e.camera;null!==l||a||console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');let d=void 0!==e.params.Line2&&e.params.Line2.threshold||0;n=e.ray;let u=this.matrixWorld,c=this.geometry,f=this.material;if(r=f.linewidth+d,null===c.boundingSphere&&c.computeBoundingSphere(),M.copy(c.boundingSphere).applyMatrix4(u),a)i=.5*r;else{let e=Math.max(l.near,M.distanceToPoint(n.origin));i=A(l,e,f.resolution)}if(M.radius+=i,!1!==n.intersectsSphere(M)){if(null===c.boundingBox&&c.computeBoundingBox(),z.copy(c.boundingBox).applyMatrix4(u),a)o=.5*r;else{let e=Math.max(l.near,z.distanceToPoint(n.origin));o=A(l,e,f.resolution)}z.expandByScalar(o),!1!==n.intersectsBox(z)&&(a?function(e,t){let i=e.matrixWorld,o=e.geometry,a=o.attributes.instanceStart,l=o.attributes.instanceEnd,d=Math.min(o.instanceCount,a.count);for(let o=0;o<d;o++){E.start.fromBufferAttribute(a,o),E.end.fromBufferAttribute(l,o),E.applyMatrix4(i);let d=new s.Pa4,u=new s.Pa4;n.distanceSqToSegment(E.start,E.end,u,d),u.distanceTo(d)<.5*r&&t.push({point:u,pointOnLine:d,distance:n.origin.distanceTo(u),object:e,face:null,faceIndex:o,uv:null,[v]:null})}}(this,t):function(e,t,i){let o=t.projectionMatrix,a=e.material.resolution,l=e.matrixWorld,d=e.geometry,u=d.attributes.instanceStart,c=d.attributes.instanceEnd,f=Math.min(d.instanceCount,u.count),m=-t.near;n.at(1,S),S.w=1,S.applyMatrix4(t.matrixWorldInverse),S.applyMatrix4(o),S.multiplyScalar(1/S.w),S.x*=a.x/2,S.y*=a.y/2,S.z=0,b.copy(S),_.multiplyMatrices(t.matrixWorldInverse,l);for(let t=0;t<f;t++){if(w.fromBufferAttribute(u,t),x.fromBufferAttribute(c,t),w.w=1,x.w=1,w.applyMatrix4(_),x.applyMatrix4(_),w.z>m&&x.z>m)continue;if(w.z>m){let e=w.z-x.z,t=(w.z-m)/e;w.lerp(x,t)}else if(x.z>m){let e=x.z-w.z,t=(x.z-m)/e;x.lerp(w,t)}w.applyMatrix4(o),x.applyMatrix4(o),w.multiplyScalar(1/w.w),x.multiplyScalar(1/x.w),w.x*=a.x/2,w.y*=a.y/2,x.x*=a.x/2,x.y*=a.y/2,E.start.copy(w),E.start.z=0,E.end.copy(x),E.end.z=0;let d=E.closestPointToPointParameter(b,!0);E.at(d,L);let f=s.M8C.lerp(w.z,x.z,d),p=f>=-1&&f<=1,h=b.distanceTo(L)<.5*r;if(p&&h){E.start.fromBufferAttribute(u,t),E.end.fromBufferAttribute(c,t),E.start.applyMatrix4(l),E.end.applyMatrix4(l);let r=new s.Pa4,o=new s.Pa4;n.distanceSqToSegment(E.start,E.end,o,r),i.push({point:o,pointOnLine:r,distance:n.origin.distanceTo(o),object:e,face:null,faceIndex:t,uv:null,[v]:null})}}}(this,l,t))}}onBeforeRender(e){let t=this.material.uniforms;t&&t.resolution&&(e.getViewport(h),this.material.uniforms.resolution.value.set(h.z,h.w))}}class D extends c{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){let t=e.length-3,i=new Float32Array(2*t);for(let n=0;n<t;n+=3)i[2*n]=e[n],i[2*n+1]=e[n+1],i[2*n+2]=e[n+2],i[2*n+3]=e[n+3],i[2*n+4]=e[n+4],i[2*n+5]=e[n+5];return super.setPositions(i),this}setColors(e,t=3){let i=e.length-t,n=new Float32Array(2*i);if(3===t)for(let r=0;r<i;r+=t)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];else for(let r=0;r<i;r+=t)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5],n[2*r+6]=e[r+6],n[2*r+7]=e[r+7];return super.setColors(n,t),this}fromLine(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class P extends U{constructor(e=new D,t=new p({color:16777215*Math.random()})){super(e,t),this.isLine2=!0,this.type="Line2"}}let O=a.forwardRef(function({points:e,color:t=16777215,vertexColors:i,linewidth:n,lineWidth:r,segments:d,dashed:u,...f},m){var v,h;let g=(0,l.D)(e=>e.size),y=a.useMemo(()=>d?new U:new P,[d]),[w]=a.useState(()=>new p),x=(null==i||null==(v=i[0])?void 0:v.length)===4?4:3,S=a.useMemo(()=>{let n=d?new c:new D,r=e.map(e=>{let t=Array.isArray(e);return e instanceof s.Pa4||e instanceof s.Ltg?[e.x,e.y,e.z]:e instanceof s.FM8?[e.x,e.y,0]:t&&3===e.length?[e[0],e[1],e[2]]:t&&2===e.length?[e[0],e[1],0]:e});if(n.setPositions(r.flat()),i){t=16777215;let e=i.map(e=>e instanceof s.Ilk?e.toArray():e);n.setColors(e.flat(),x)}return n},[e,d,i,x]);return a.useLayoutEffect(()=>{y.computeLineDistances()},[e,y]),a.useLayoutEffect(()=>{u?w.defines.USE_DASH="":delete w.defines.USE_DASH,w.needsUpdate=!0},[u,w]),a.useEffect(()=>()=>{S.dispose(),w.dispose()},[S]),a.createElement("primitive",(0,o.Z)({object:y,ref:m},f),a.createElement("primitive",{object:S,attach:"geometry"}),a.createElement("primitive",(0,o.Z)({object:w,attach:"material",color:t,vertexColors:!!i,resolution:[g.width,g.height],linewidth:null!==(h=null!=n?n:r)&&void 0!==h?h:1,dashed:u,transparent:4===x},f)))})},8345:function(e,t,i){i.d(t,{g:function(){return r}});var n=i(2079);function r(e,t,i,r){let o=class extends n.jyz{constructor(o={}){let a=Object.entries(e);super({uniforms:a.reduce((e,[t,i])=>{let r=n.rDY.clone({[t]:{value:i}});return{...e,...r}},{}),vertexShader:t,fragmentShader:i}),this.key="",a.forEach(([e])=>Object.defineProperty(this,e,{get:()=>this.uniforms[e].value,set:t=>this.uniforms[e].value=t})),Object.assign(this,o),r&&r(this)}};return o.key=n.M8C.generateUUID(),o}},1:function(e,t,i){i.d(t,{FM:function(){return s},aL:function(){return a}});var n=i(1119),r=i(2265);function o(e,t){let i=e+"Geometry";return r.forwardRef(({args:e,children:o,...a},s)=>{let l=r.useRef(null);return r.useImperativeHandle(s,()=>l.current),r.useLayoutEffect(()=>void(null==t||t(l.current))),r.createElement("mesh",(0,n.Z)({ref:l},a),r.createElement(i,{attach:"geometry",args:e}),o)})}let a=o("sphere"),s=o("ring")},4752:function(e,t,i){i.d(t,{B:function(){return o}});var n=i(2079),r=i(1448);class o extends n.Kj0{constructor(e,t={}){super(e),this.isWater=!0;let i=this,o=void 0!==t.textureWidth?t.textureWidth:512,a=void 0!==t.textureHeight?t.textureHeight:512,s=void 0!==t.clipBias?t.clipBias:0,l=void 0!==t.alpha?t.alpha:1,d=void 0!==t.time?t.time:0,u=void 0!==t.waterNormals?t.waterNormals:null,c=void 0!==t.sunDirection?t.sunDirection:new n.Pa4(.70707,.70707,0),f=new n.Ilk(void 0!==t.sunColor?t.sunColor:16777215),m=new n.Ilk(void 0!==t.waterColor?t.waterColor:8355711),p=void 0!==t.eye?t.eye:new n.Pa4(0,0,0),v=void 0!==t.distortionScale?t.distortionScale:20,h=void 0!==t.side?t.side:n.Wl3,g=void 0!==t.fog&&t.fog,y=new n.JOQ,w=new n.Pa4,x=new n.Pa4,S=new n.Pa4,b=new n.yGw,_=new n.Pa4(0,0,-1),E=new n.Ltg,L=new n.Pa4,z=new n.Pa4,M=new n.Ltg,C=new n.yGw,A=new n.cPb,U=new n.dd2(o,a),D={name:"MirrorShader",uniforms:n.rDY.merge([r.UniformsLib.fog,r.UniformsLib.lights,{normalSampler:{value:null},mirrorSampler:{value:null},alpha:{value:1},time:{value:0},size:{value:1},distortionScale:{value:20},textureMatrix:{value:new n.yGw},sunColor:{value:new n.Ilk(8355711)},sunDirection:{value:new n.Pa4(.70707,.70707,0)},eye:{value:new n.Pa4},waterColor:{value:new n.Ilk(5592405)}}]),vertexShader:`
|
|
410
|
+
uniform mat4 textureMatrix;
|
|
411
|
+
uniform float time;
|
|
412
|
+
|
|
413
|
+
varying vec4 mirrorCoord;
|
|
414
|
+
varying vec4 worldPosition;
|
|
415
|
+
|
|
416
|
+
#include <common>
|
|
417
|
+
#include <fog_pars_vertex>
|
|
418
|
+
#include <shadowmap_pars_vertex>
|
|
419
|
+
#include <logdepthbuf_pars_vertex>
|
|
420
|
+
|
|
421
|
+
void main() {
|
|
422
|
+
mirrorCoord = modelMatrix * vec4( position, 1.0 );
|
|
423
|
+
worldPosition = mirrorCoord.xyzw;
|
|
424
|
+
mirrorCoord = textureMatrix * mirrorCoord;
|
|
425
|
+
vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
|
|
426
|
+
gl_Position = projectionMatrix * mvPosition;
|
|
427
|
+
|
|
428
|
+
#include <beginnormal_vertex>
|
|
429
|
+
#include <defaultnormal_vertex>
|
|
430
|
+
#include <logdepthbuf_vertex>
|
|
431
|
+
#include <fog_vertex>
|
|
432
|
+
#include <shadowmap_vertex>
|
|
433
|
+
}`,fragmentShader:`
|
|
434
|
+
uniform sampler2D mirrorSampler;
|
|
435
|
+
uniform float alpha;
|
|
436
|
+
uniform float time;
|
|
437
|
+
uniform float size;
|
|
438
|
+
uniform float distortionScale;
|
|
439
|
+
uniform sampler2D normalSampler;
|
|
440
|
+
uniform vec3 sunColor;
|
|
441
|
+
uniform vec3 sunDirection;
|
|
442
|
+
uniform vec3 eye;
|
|
443
|
+
uniform vec3 waterColor;
|
|
444
|
+
|
|
445
|
+
varying vec4 mirrorCoord;
|
|
446
|
+
varying vec4 worldPosition;
|
|
447
|
+
|
|
448
|
+
vec4 getNoise( vec2 uv ) {
|
|
449
|
+
vec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0);
|
|
450
|
+
vec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 );
|
|
451
|
+
vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 );
|
|
452
|
+
vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 );
|
|
453
|
+
vec4 noise = texture2D( normalSampler, uv0 ) +
|
|
454
|
+
texture2D( normalSampler, uv1 ) +
|
|
455
|
+
texture2D( normalSampler, uv2 ) +
|
|
456
|
+
texture2D( normalSampler, uv3 );
|
|
457
|
+
return noise * 0.5 - 1.0;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
void sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) {
|
|
461
|
+
vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) );
|
|
462
|
+
float direction = max( 0.0, dot( eyeDirection, reflection ) );
|
|
463
|
+
specularColor += pow( direction, shiny ) * sunColor * spec;
|
|
464
|
+
diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
#include <common>
|
|
468
|
+
#include <packing>
|
|
469
|
+
#include <bsdfs>
|
|
470
|
+
#include <fog_pars_fragment>
|
|
471
|
+
#include <logdepthbuf_pars_fragment>
|
|
472
|
+
#include <lights_pars_begin>
|
|
473
|
+
#include <shadowmap_pars_fragment>
|
|
474
|
+
#include <shadowmask_pars_fragment>
|
|
475
|
+
|
|
476
|
+
void main() {
|
|
477
|
+
|
|
478
|
+
#include <logdepthbuf_fragment>
|
|
479
|
+
vec4 noise = getNoise( worldPosition.xz * size );
|
|
480
|
+
vec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) );
|
|
481
|
+
|
|
482
|
+
vec3 diffuseLight = vec3(0.0);
|
|
483
|
+
vec3 specularLight = vec3(0.0);
|
|
484
|
+
|
|
485
|
+
vec3 worldToEye = eye-worldPosition.xyz;
|
|
486
|
+
vec3 eyeDirection = normalize( worldToEye );
|
|
487
|
+
sunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );
|
|
488
|
+
|
|
489
|
+
float distance = length(worldToEye);
|
|
490
|
+
|
|
491
|
+
vec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale;
|
|
492
|
+
vec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) );
|
|
493
|
+
|
|
494
|
+
float theta = max( dot( eyeDirection, surfaceNormal ), 0.0 );
|
|
495
|
+
float rf0 = 0.3;
|
|
496
|
+
float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 );
|
|
497
|
+
vec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor;
|
|
498
|
+
vec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance);
|
|
499
|
+
vec3 outgoingLight = albedo;
|
|
500
|
+
gl_FragColor = vec4( outgoingLight, alpha );
|
|
501
|
+
|
|
502
|
+
#include <tonemapping_fragment>
|
|
503
|
+
#include <colorspace_fragment>
|
|
504
|
+
#include <fog_fragment>
|
|
505
|
+
}`},P=new n.jyz({name:D.name,uniforms:n.rDY.clone(D.uniforms),vertexShader:D.vertexShader,fragmentShader:D.fragmentShader,lights:!0,side:h,fog:g});P.uniforms.mirrorSampler.value=U.texture,P.uniforms.textureMatrix.value=C,P.uniforms.alpha.value=l,P.uniforms.time.value=d,P.uniforms.normalSampler.value=u,P.uniforms.sunColor.value=f,P.uniforms.waterColor.value=m,P.uniforms.sunDirection.value=c,P.uniforms.distortionScale.value=v,P.uniforms.eye.value=p,i.material=P,i.onBeforeRender=function(e,t,n){if(x.setFromMatrixPosition(i.matrixWorld),S.setFromMatrixPosition(n.matrixWorld),b.extractRotation(i.matrixWorld),w.set(0,0,1),w.applyMatrix4(b),L.subVectors(x,S),L.dot(w)>0)return;L.reflect(w).negate(),L.add(x),b.extractRotation(n.matrixWorld),_.set(0,0,-1),_.applyMatrix4(b),_.add(S),z.subVectors(x,_),z.reflect(w).negate(),z.add(x),A.position.copy(L),A.up.set(0,1,0),A.up.applyMatrix4(b),A.up.reflect(w),A.lookAt(z),A.far=n.far,A.updateMatrixWorld(),A.projectionMatrix.copy(n.projectionMatrix),C.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),C.multiply(A.projectionMatrix),C.multiply(A.matrixWorldInverse),y.setFromNormalAndCoplanarPoint(w,x),y.applyMatrix4(A.matrixWorldInverse),E.set(y.normal.x,y.normal.y,y.normal.z,y.constant);let r=A.projectionMatrix;M.x=(Math.sign(E.x)+r.elements[8])/r.elements[0],M.y=(Math.sign(E.y)+r.elements[9])/r.elements[5],M.z=-1,M.w=(1+r.elements[10])/r.elements[14],E.multiplyScalar(2/E.dot(M)),r.elements[2]=E.x,r.elements[6]=E.y,r.elements[10]=E.z+1-s,r.elements[14]=E.w,p.setFromMatrixPosition(n.matrixWorld);let o=e.getRenderTarget(),a=e.xr.enabled,l=e.shadowMap.autoUpdate;i.visible=!1,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,e.setRenderTarget(U),e.state.buffers.depth.setMask(!0),!1===e.autoClear&&e.clear(),e.render(t,A),i.visible=!0,e.xr.enabled=a,e.shadowMap.autoUpdate=l,e.setRenderTarget(o);let d=n.viewport;void 0!==d&&e.state.viewport(d)}}}}}]);
|