viral-viewer-2 3.3.8 → 3.4.0
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/LICENSE +57 -57
- package/dist/components/animation/viral-animation.d.ts +1 -0
- package/dist/components/animation/viral-animation.js +26 -2
- package/dist/components/animation/viral-animation.js.map +1 -1
- package/dist/components/camera/viral-camera.d.ts +13 -3
- package/dist/components/camera/viral-camera.js +57 -7
- package/dist/components/camera/viral-camera.js.map +1 -1
- package/dist/components/centralized-event-handler/viral-centralized-event-handler.js +6 -2
- package/dist/components/centralized-event-handler/viral-centralized-event-handler.js.map +1 -1
- package/dist/components/compress/{compress.processor.d.ts → viral-compress.processor.d.ts} +1 -1
- package/dist/components/compress/{compress.processor.js → viral-compress.processor.js} +4 -4
- package/dist/components/compress/viral-compress.processor.js.map +1 -0
- package/dist/components/context-menu/viral-context-menu.js +9 -8
- package/dist/components/context-menu/viral-context-menu.js.map +1 -1
- package/dist/components/keyboard/viral-keyboard.d.ts +11 -1
- package/dist/components/keyboard/viral-keyboard.js +33 -0
- package/dist/components/keyboard/viral-keyboard.js.map +1 -1
- package/dist/components/loader/{viral-viewer-point-cloud.loader.d.ts → viral-point-cloud.loader.d.ts} +1 -1
- package/dist/components/loader/{viral-viewer-point-cloud.loader.js → viral-point-cloud.loader.js} +4 -4
- package/dist/components/loader/viral-point-cloud.loader.js.map +1 -0
- package/dist/components/loader/{viral-viewer-revit.loader.d.ts → viral-revit.loader.d.ts} +1 -3
- package/dist/components/loader/{viral-viewer-revit.loader.js → viral-revit.loader.js} +8 -13
- package/dist/components/loader/viral-revit.loader.js.map +1 -0
- package/dist/components/loader/viral-three.loader.d.ts +11 -0
- package/dist/components/loader/viral-three.loader.js +20 -0
- package/dist/components/loader/viral-three.loader.js.map +1 -0
- package/dist/components/loader/viral.loader.d.ts +11 -0
- package/dist/components/loader/viral.loader.js +16 -0
- package/dist/components/loader/viral.loader.js.map +1 -0
- package/dist/components/mouse/viral-mouse.js +16 -9
- package/dist/components/mouse/viral-mouse.js.map +1 -1
- package/dist/components/scene/viral-scene.d.ts +8 -3
- package/dist/components/scene/viral-scene.js +28 -15
- package/dist/components/scene/viral-scene.js.map +1 -1
- package/dist/components/spinner/viral-spinner.js +159 -159
- package/dist/components/stats/viral-stats.d.ts +7 -0
- package/dist/components/stats/viral-stats.js +16 -0
- package/dist/components/stats/viral-stats.js.map +1 -0
- package/dist/components/worker/viral-viewer-2.worker.d.ts +1 -4
- package/dist/components/worker/viral-viewer-2.worker.js +3 -10
- package/dist/components/worker/viral-viewer-2.worker.js.map +1 -1
- package/dist/components/worker/viral-viewer-3.worker.d.ts +1 -7
- package/dist/components/worker/viral-viewer-3.worker.js +7 -18
- package/dist/components/worker/viral-viewer-3.worker.js.map +1 -1
- package/dist/components/worker-script/threejs.types.js +185 -185
- package/dist/const/colors.d.ts +1 -0
- package/dist/const/colors.js +1 -0
- package/dist/const/colors.js.map +1 -1
- package/dist/models/dictionary.model.d.ts +0 -10
- package/dist/models/dictionary.model.js +0 -41
- package/dist/models/dictionary.model.js.map +1 -1
- package/dist/threejs-addon/gltf-loader.d.ts +17 -0
- package/dist/threejs-addon/gltf-loader.js +2796 -0
- package/dist/threejs-addon/gltf-loader.js.map +1 -0
- package/dist/threejs-addon/transform-control.d.ts +74 -0
- package/dist/threejs-addon/transform-control.js +1033 -0
- package/dist/threejs-addon/transform-control.js.map +1 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.js +48 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/threejs.d.ts +2 -0
- package/dist/utils/threejs.js +10 -1
- package/dist/utils/threejs.js.map +1 -1
- package/dist/viral-viewer-api.d.ts +7 -11
- package/dist/viral-viewer-api.js +10 -14
- package/dist/viral-viewer-api.js.map +1 -1
- package/package.json +30 -29
- package/dist/components/compress/compress.processor.js.map +0 -1
- package/dist/components/loader/viral-viewer-point-cloud.loader.js.map +0 -1
- package/dist/components/loader/viral-viewer-revit.loader.js.map +0 -1
- package/dist/components/worker/test-worker.worker.d.ts +0 -6
- package/dist/components/worker/test-worker.worker.js +0 -21
- package/dist/components/worker/test-worker.worker.js.map +0 -1
- package/dist/components/worker/viral-viewer.worker-pool.d.ts +0 -0
- package/dist/components/worker/viral-viewer.worker-pool.js +0 -61
- package/dist/components/worker/viral-viewer.worker-pool.js.map +0 -1
- package/dist/components/worker/worker-pool.d.ts +0 -21
- package/dist/components/worker/worker-pool.js +0 -47
- package/dist/components/worker/worker-pool.js.map +0 -1
- package/dist/components/worker/worker-thread.d.ts +0 -9
- package/dist/components/worker/worker-thread.js +0 -30
- package/dist/components/worker/worker-thread.js.map +0 -1
- package/dist/components/worker-script/threejs.script.d.ts +0 -1
- package/dist/components/worker-script/threejs.script.js +0 -16
- package/dist/components/worker-script/threejs.script.js.map +0 -1
|
@@ -8485,42 +8485,42 @@ function workerFunction() {
|
|
|
8485
8485
|
uniforms: {
|
|
8486
8486
|
tEquirect: { value: null },
|
|
8487
8487
|
},
|
|
8488
|
-
vertexShader: /* glsl */ `
|
|
8489
|
-
|
|
8490
|
-
varying vec3 vWorldDirection;
|
|
8491
|
-
|
|
8492
|
-
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
|
|
8493
|
-
|
|
8494
|
-
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
|
|
8495
|
-
|
|
8496
|
-
}
|
|
8497
|
-
|
|
8498
|
-
void main() {
|
|
8499
|
-
|
|
8500
|
-
vWorldDirection = transformDirection( position, modelMatrix );
|
|
8501
|
-
|
|
8502
|
-
#include <begin_vertex>
|
|
8503
|
-
#include <project_vertex>
|
|
8504
|
-
|
|
8505
|
-
}
|
|
8488
|
+
vertexShader: /* glsl */ `
|
|
8489
|
+
|
|
8490
|
+
varying vec3 vWorldDirection;
|
|
8491
|
+
|
|
8492
|
+
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
|
|
8493
|
+
|
|
8494
|
+
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
|
|
8495
|
+
|
|
8496
|
+
}
|
|
8497
|
+
|
|
8498
|
+
void main() {
|
|
8499
|
+
|
|
8500
|
+
vWorldDirection = transformDirection( position, modelMatrix );
|
|
8501
|
+
|
|
8502
|
+
#include <begin_vertex>
|
|
8503
|
+
#include <project_vertex>
|
|
8504
|
+
|
|
8505
|
+
}
|
|
8506
8506
|
`,
|
|
8507
|
-
fragmentShader: /* glsl */ `
|
|
8508
|
-
|
|
8509
|
-
uniform sampler2D tEquirect;
|
|
8510
|
-
|
|
8511
|
-
varying vec3 vWorldDirection;
|
|
8512
|
-
|
|
8513
|
-
#include <common>
|
|
8514
|
-
|
|
8515
|
-
void main() {
|
|
8516
|
-
|
|
8517
|
-
vec3 direction = normalize( vWorldDirection );
|
|
8518
|
-
|
|
8519
|
-
vec2 sampleUV = equirectUv( direction );
|
|
8520
|
-
|
|
8521
|
-
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
8522
|
-
|
|
8523
|
-
}
|
|
8507
|
+
fragmentShader: /* glsl */ `
|
|
8508
|
+
|
|
8509
|
+
uniform sampler2D tEquirect;
|
|
8510
|
+
|
|
8511
|
+
varying vec3 vWorldDirection;
|
|
8512
|
+
|
|
8513
|
+
#include <common>
|
|
8514
|
+
|
|
8515
|
+
void main() {
|
|
8516
|
+
|
|
8517
|
+
vec3 direction = normalize( vWorldDirection );
|
|
8518
|
+
|
|
8519
|
+
vec2 sampleUV = equirectUv( direction );
|
|
8520
|
+
|
|
8521
|
+
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
8522
|
+
|
|
8523
|
+
}
|
|
8524
8524
|
`,
|
|
8525
8525
|
};
|
|
8526
8526
|
const geometry = new BoxGeometry(5, 5, 5);
|
|
@@ -11055,66 +11055,66 @@ function workerFunction() {
|
|
|
11055
11055
|
poleAxis: { value: poleAxis },
|
|
11056
11056
|
},
|
|
11057
11057
|
vertexShader: _getCommonVertexShader(),
|
|
11058
|
-
fragmentShader: /* glsl */ `
|
|
11059
|
-
|
|
11060
|
-
precision mediump float;
|
|
11061
|
-
precision mediump int;
|
|
11062
|
-
|
|
11063
|
-
varying vec3 vOutputDirection;
|
|
11064
|
-
|
|
11065
|
-
uniform sampler2D envMap;
|
|
11066
|
-
uniform int samples;
|
|
11067
|
-
uniform float weights[ n ];
|
|
11068
|
-
uniform bool latitudinal;
|
|
11069
|
-
uniform float dTheta;
|
|
11070
|
-
uniform float mipInt;
|
|
11071
|
-
uniform vec3 poleAxis;
|
|
11072
|
-
|
|
11073
|
-
#define ENVMAP_TYPE_CUBE_UV
|
|
11074
|
-
#include <cube_uv_reflection_fragment>
|
|
11075
|
-
|
|
11076
|
-
vec3 getSample( float theta, vec3 axis ) {
|
|
11077
|
-
|
|
11078
|
-
float cosTheta = cos( theta );
|
|
11079
|
-
// Rodrigues' axis-angle rotation
|
|
11080
|
-
vec3 sampleDirection = vOutputDirection * cosTheta
|
|
11081
|
-
+ cross( axis, vOutputDirection ) * sin( theta )
|
|
11082
|
-
+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
|
|
11083
|
-
|
|
11084
|
-
return bilinearCubeUV( envMap, sampleDirection, mipInt );
|
|
11085
|
-
|
|
11086
|
-
}
|
|
11087
|
-
|
|
11088
|
-
void main() {
|
|
11089
|
-
|
|
11090
|
-
vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
|
|
11091
|
-
|
|
11092
|
-
if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
|
|
11093
|
-
|
|
11094
|
-
axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
|
|
11095
|
-
|
|
11096
|
-
}
|
|
11097
|
-
|
|
11098
|
-
axis = normalize( axis );
|
|
11099
|
-
|
|
11100
|
-
gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
|
|
11101
|
-
gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
|
|
11102
|
-
|
|
11103
|
-
for ( int i = 1; i < n; i++ ) {
|
|
11104
|
-
|
|
11105
|
-
if ( i >= samples ) {
|
|
11106
|
-
|
|
11107
|
-
break;
|
|
11108
|
-
|
|
11109
|
-
}
|
|
11110
|
-
|
|
11111
|
-
float theta = dTheta * float( i );
|
|
11112
|
-
gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
|
|
11113
|
-
gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
|
|
11114
|
-
|
|
11115
|
-
}
|
|
11116
|
-
|
|
11117
|
-
}
|
|
11058
|
+
fragmentShader: /* glsl */ `
|
|
11059
|
+
|
|
11060
|
+
precision mediump float;
|
|
11061
|
+
precision mediump int;
|
|
11062
|
+
|
|
11063
|
+
varying vec3 vOutputDirection;
|
|
11064
|
+
|
|
11065
|
+
uniform sampler2D envMap;
|
|
11066
|
+
uniform int samples;
|
|
11067
|
+
uniform float weights[ n ];
|
|
11068
|
+
uniform bool latitudinal;
|
|
11069
|
+
uniform float dTheta;
|
|
11070
|
+
uniform float mipInt;
|
|
11071
|
+
uniform vec3 poleAxis;
|
|
11072
|
+
|
|
11073
|
+
#define ENVMAP_TYPE_CUBE_UV
|
|
11074
|
+
#include <cube_uv_reflection_fragment>
|
|
11075
|
+
|
|
11076
|
+
vec3 getSample( float theta, vec3 axis ) {
|
|
11077
|
+
|
|
11078
|
+
float cosTheta = cos( theta );
|
|
11079
|
+
// Rodrigues' axis-angle rotation
|
|
11080
|
+
vec3 sampleDirection = vOutputDirection * cosTheta
|
|
11081
|
+
+ cross( axis, vOutputDirection ) * sin( theta )
|
|
11082
|
+
+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
|
|
11083
|
+
|
|
11084
|
+
return bilinearCubeUV( envMap, sampleDirection, mipInt );
|
|
11085
|
+
|
|
11086
|
+
}
|
|
11087
|
+
|
|
11088
|
+
void main() {
|
|
11089
|
+
|
|
11090
|
+
vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
|
|
11091
|
+
|
|
11092
|
+
if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
|
|
11093
|
+
|
|
11094
|
+
axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
|
|
11095
|
+
|
|
11096
|
+
}
|
|
11097
|
+
|
|
11098
|
+
axis = normalize( axis );
|
|
11099
|
+
|
|
11100
|
+
gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
|
|
11101
|
+
gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
|
|
11102
|
+
|
|
11103
|
+
for ( int i = 1; i < n; i++ ) {
|
|
11104
|
+
|
|
11105
|
+
if ( i >= samples ) {
|
|
11106
|
+
|
|
11107
|
+
break;
|
|
11108
|
+
|
|
11109
|
+
}
|
|
11110
|
+
|
|
11111
|
+
float theta = dTheta * float( i );
|
|
11112
|
+
gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
|
|
11113
|
+
gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
|
|
11114
|
+
|
|
11115
|
+
}
|
|
11116
|
+
|
|
11117
|
+
}
|
|
11118
11118
|
`,
|
|
11119
11119
|
blending: NoBlending,
|
|
11120
11120
|
depthTest: false,
|
|
@@ -11129,25 +11129,25 @@ function workerFunction() {
|
|
|
11129
11129
|
envMap: { value: null },
|
|
11130
11130
|
},
|
|
11131
11131
|
vertexShader: _getCommonVertexShader(),
|
|
11132
|
-
fragmentShader: /* glsl */ `
|
|
11133
|
-
|
|
11134
|
-
precision mediump float;
|
|
11135
|
-
precision mediump int;
|
|
11136
|
-
|
|
11137
|
-
varying vec3 vOutputDirection;
|
|
11138
|
-
|
|
11139
|
-
uniform sampler2D envMap;
|
|
11140
|
-
|
|
11141
|
-
#include <common>
|
|
11142
|
-
|
|
11143
|
-
void main() {
|
|
11144
|
-
|
|
11145
|
-
vec3 outputDirection = normalize( vOutputDirection );
|
|
11146
|
-
vec2 uv = equirectUv( outputDirection );
|
|
11147
|
-
|
|
11148
|
-
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
|
|
11149
|
-
|
|
11150
|
-
}
|
|
11132
|
+
fragmentShader: /* glsl */ `
|
|
11133
|
+
|
|
11134
|
+
precision mediump float;
|
|
11135
|
+
precision mediump int;
|
|
11136
|
+
|
|
11137
|
+
varying vec3 vOutputDirection;
|
|
11138
|
+
|
|
11139
|
+
uniform sampler2D envMap;
|
|
11140
|
+
|
|
11141
|
+
#include <common>
|
|
11142
|
+
|
|
11143
|
+
void main() {
|
|
11144
|
+
|
|
11145
|
+
vec3 outputDirection = normalize( vOutputDirection );
|
|
11146
|
+
vec2 uv = equirectUv( outputDirection );
|
|
11147
|
+
|
|
11148
|
+
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
|
|
11149
|
+
|
|
11150
|
+
}
|
|
11151
11151
|
`,
|
|
11152
11152
|
blending: NoBlending,
|
|
11153
11153
|
depthTest: false,
|
|
@@ -11162,22 +11162,22 @@ function workerFunction() {
|
|
|
11162
11162
|
flipEnvMap: { value: -1 },
|
|
11163
11163
|
},
|
|
11164
11164
|
vertexShader: _getCommonVertexShader(),
|
|
11165
|
-
fragmentShader: /* glsl */ `
|
|
11166
|
-
|
|
11167
|
-
precision mediump float;
|
|
11168
|
-
precision mediump int;
|
|
11169
|
-
|
|
11170
|
-
uniform float flipEnvMap;
|
|
11171
|
-
|
|
11172
|
-
varying vec3 vOutputDirection;
|
|
11173
|
-
|
|
11174
|
-
uniform samplerCube envMap;
|
|
11175
|
-
|
|
11176
|
-
void main() {
|
|
11177
|
-
|
|
11178
|
-
gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
|
|
11179
|
-
|
|
11180
|
-
}
|
|
11165
|
+
fragmentShader: /* glsl */ `
|
|
11166
|
+
|
|
11167
|
+
precision mediump float;
|
|
11168
|
+
precision mediump int;
|
|
11169
|
+
|
|
11170
|
+
uniform float flipEnvMap;
|
|
11171
|
+
|
|
11172
|
+
varying vec3 vOutputDirection;
|
|
11173
|
+
|
|
11174
|
+
uniform samplerCube envMap;
|
|
11175
|
+
|
|
11176
|
+
void main() {
|
|
11177
|
+
|
|
11178
|
+
gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
|
|
11179
|
+
|
|
11180
|
+
}
|
|
11181
11181
|
`,
|
|
11182
11182
|
blending: NoBlending,
|
|
11183
11183
|
depthTest: false,
|
|
@@ -11185,61 +11185,61 @@ function workerFunction() {
|
|
|
11185
11185
|
});
|
|
11186
11186
|
}
|
|
11187
11187
|
function _getCommonVertexShader() {
|
|
11188
|
-
return /* glsl */ `
|
|
11189
|
-
|
|
11190
|
-
precision mediump float;
|
|
11191
|
-
precision mediump int;
|
|
11192
|
-
|
|
11193
|
-
attribute float faceIndex;
|
|
11194
|
-
|
|
11195
|
-
varying vec3 vOutputDirection;
|
|
11196
|
-
|
|
11197
|
-
// RH coordinate system; PMREM face-indexing convention
|
|
11198
|
-
vec3 getDirection( vec2 uv, float face ) {
|
|
11199
|
-
|
|
11200
|
-
uv = 2.0 * uv - 1.0;
|
|
11201
|
-
|
|
11202
|
-
vec3 direction = vec3( uv, 1.0 );
|
|
11203
|
-
|
|
11204
|
-
if ( face == 0.0 ) {
|
|
11205
|
-
|
|
11206
|
-
direction = direction.zyx; // ( 1, v, u ) pos x
|
|
11207
|
-
|
|
11208
|
-
} else if ( face == 1.0 ) {
|
|
11209
|
-
|
|
11210
|
-
direction = direction.xzy;
|
|
11211
|
-
direction.xz *= -1.0; // ( -u, 1, -v ) pos y
|
|
11212
|
-
|
|
11213
|
-
} else if ( face == 2.0 ) {
|
|
11214
|
-
|
|
11215
|
-
direction.x *= -1.0; // ( -u, v, 1 ) pos z
|
|
11216
|
-
|
|
11217
|
-
} else if ( face == 3.0 ) {
|
|
11218
|
-
|
|
11219
|
-
direction = direction.zyx;
|
|
11220
|
-
direction.xz *= -1.0; // ( -1, v, -u ) neg x
|
|
11221
|
-
|
|
11222
|
-
} else if ( face == 4.0 ) {
|
|
11223
|
-
|
|
11224
|
-
direction = direction.xzy;
|
|
11225
|
-
direction.xy *= -1.0; // ( -u, -1, v ) neg y
|
|
11226
|
-
|
|
11227
|
-
} else if ( face == 5.0 ) {
|
|
11228
|
-
|
|
11229
|
-
direction.z *= -1.0; // ( u, v, -1 ) neg z
|
|
11230
|
-
|
|
11231
|
-
}
|
|
11232
|
-
|
|
11233
|
-
return direction;
|
|
11234
|
-
|
|
11235
|
-
}
|
|
11236
|
-
|
|
11237
|
-
void main() {
|
|
11238
|
-
|
|
11239
|
-
vOutputDirection = getDirection( uv, faceIndex );
|
|
11240
|
-
gl_Position = vec4( position, 1.0 );
|
|
11241
|
-
|
|
11242
|
-
}
|
|
11188
|
+
return /* glsl */ `
|
|
11189
|
+
|
|
11190
|
+
precision mediump float;
|
|
11191
|
+
precision mediump int;
|
|
11192
|
+
|
|
11193
|
+
attribute float faceIndex;
|
|
11194
|
+
|
|
11195
|
+
varying vec3 vOutputDirection;
|
|
11196
|
+
|
|
11197
|
+
// RH coordinate system; PMREM face-indexing convention
|
|
11198
|
+
vec3 getDirection( vec2 uv, float face ) {
|
|
11199
|
+
|
|
11200
|
+
uv = 2.0 * uv - 1.0;
|
|
11201
|
+
|
|
11202
|
+
vec3 direction = vec3( uv, 1.0 );
|
|
11203
|
+
|
|
11204
|
+
if ( face == 0.0 ) {
|
|
11205
|
+
|
|
11206
|
+
direction = direction.zyx; // ( 1, v, u ) pos x
|
|
11207
|
+
|
|
11208
|
+
} else if ( face == 1.0 ) {
|
|
11209
|
+
|
|
11210
|
+
direction = direction.xzy;
|
|
11211
|
+
direction.xz *= -1.0; // ( -u, 1, -v ) pos y
|
|
11212
|
+
|
|
11213
|
+
} else if ( face == 2.0 ) {
|
|
11214
|
+
|
|
11215
|
+
direction.x *= -1.0; // ( -u, v, 1 ) pos z
|
|
11216
|
+
|
|
11217
|
+
} else if ( face == 3.0 ) {
|
|
11218
|
+
|
|
11219
|
+
direction = direction.zyx;
|
|
11220
|
+
direction.xz *= -1.0; // ( -1, v, -u ) neg x
|
|
11221
|
+
|
|
11222
|
+
} else if ( face == 4.0 ) {
|
|
11223
|
+
|
|
11224
|
+
direction = direction.xzy;
|
|
11225
|
+
direction.xy *= -1.0; // ( -u, -1, v ) neg y
|
|
11226
|
+
|
|
11227
|
+
} else if ( face == 5.0 ) {
|
|
11228
|
+
|
|
11229
|
+
direction.z *= -1.0; // ( u, v, -1 ) neg z
|
|
11230
|
+
|
|
11231
|
+
}
|
|
11232
|
+
|
|
11233
|
+
return direction;
|
|
11234
|
+
|
|
11235
|
+
}
|
|
11236
|
+
|
|
11237
|
+
void main() {
|
|
11238
|
+
|
|
11239
|
+
vOutputDirection = getDirection( uv, faceIndex );
|
|
11240
|
+
gl_Position = vec4( position, 1.0 );
|
|
11241
|
+
|
|
11242
|
+
}
|
|
11243
11243
|
`;
|
|
11244
11244
|
}
|
|
11245
11245
|
function WebGLCubeUVMaps(renderer) {
|
package/dist/const/colors.d.ts
CHANGED
package/dist/const/colors.js
CHANGED
package/dist/const/colors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/const/colors.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG;IAClB,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/const/colors.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG;IAClB,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,SAAS;IACvB,OAAO,EAAE,uBAAuB;CACnC,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class Dictionary<TKey, TValue> {
|
|
2
|
-
private items;
|
|
3
|
-
add(key: TKey, value: TValue): void;
|
|
4
|
-
get(key: TKey): TValue | undefined;
|
|
5
|
-
remove(key: TKey): void;
|
|
6
|
-
containsKey(key: TKey): boolean;
|
|
7
|
-
keys(): TKey[];
|
|
8
|
-
values(): TValue[];
|
|
9
|
-
count(): number;
|
|
10
|
-
}
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Dictionary = void 0;
|
|
4
|
-
class Dictionary {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.items = {};
|
|
7
|
-
}
|
|
8
|
-
// Add a key-value pair to the dictionary
|
|
9
|
-
add(key, value) {
|
|
10
|
-
const stringKey = key;
|
|
11
|
-
this.items[stringKey] = value;
|
|
12
|
-
}
|
|
13
|
-
// Retrieve a value from the dictionary by key
|
|
14
|
-
get(key) {
|
|
15
|
-
const stringKey = key;
|
|
16
|
-
return this.items[stringKey];
|
|
17
|
-
}
|
|
18
|
-
// Remove a key-value pair from the dictionary
|
|
19
|
-
remove(key) {
|
|
20
|
-
const stringKey = key;
|
|
21
|
-
delete this.items[stringKey];
|
|
22
|
-
}
|
|
23
|
-
// Check if the dictionary contains a key
|
|
24
|
-
containsKey(key) {
|
|
25
|
-
const stringKey = key;
|
|
26
|
-
return stringKey in this.items;
|
|
27
|
-
}
|
|
28
|
-
// Get all keys in the dictionary
|
|
29
|
-
keys() {
|
|
30
|
-
return Object.keys(this.items).map(key => key);
|
|
31
|
-
}
|
|
32
|
-
// Get all values in the dictionary
|
|
33
|
-
values() {
|
|
34
|
-
return Object.values(this.items);
|
|
35
|
-
}
|
|
36
|
-
// Get the number of key-value pairs in the dictionary
|
|
37
|
-
count() {
|
|
38
|
-
return Object.keys(this.items).length;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.Dictionary = Dictionary;
|
|
42
1
|
//# sourceMappingURL=dictionary.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.model.js","sourceRoot":"","sources":["../../src/models/dictionary.model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dictionary.model.js","sourceRoot":"","sources":["../../src/models/dictionary.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class GLTFLoader extends Loader {
|
|
2
|
+
constructor(manager: any);
|
|
3
|
+
dracoLoader: any;
|
|
4
|
+
ktx2Loader: any;
|
|
5
|
+
meshoptDecoder: any;
|
|
6
|
+
pluginCallbacks: any[];
|
|
7
|
+
load(url: any, onLoad: any, onProgress: any, onError: any): void;
|
|
8
|
+
setDRACOLoader(dracoLoader: any): GLTFLoader;
|
|
9
|
+
setDDSLoader(): void;
|
|
10
|
+
setKTX2Loader(ktx2Loader: any): GLTFLoader;
|
|
11
|
+
setMeshoptDecoder(meshoptDecoder: any): GLTFLoader;
|
|
12
|
+
register(callback: any): GLTFLoader;
|
|
13
|
+
unregister(callback: any): GLTFLoader;
|
|
14
|
+
parse(data: any, path: any, onLoad: any, onError: any): void;
|
|
15
|
+
parseAsync(data: any, path: any): Promise<any>;
|
|
16
|
+
}
|
|
17
|
+
import { Loader } from 'three';
|