vim-web 0.3.35-dev.0 → 0.3.39-dev.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/README.md +1 -1
- package/dist/types/react-viewers/index.d.ts +3 -2
- package/dist/types/react-viewers/webgl/index.d.ts +0 -2
- package/dist/vim-web.iife.js +285 -440
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +285 -440
- package/dist/vim-web.js.map +1 -1
- package/package.json +3 -3
package/dist/vim-web.iife.js
CHANGED
|
@@ -2831,11 +2831,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2831
2831
|
this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;
|
|
2832
2832
|
return this;
|
|
2833
2833
|
}
|
|
2834
|
-
project(
|
|
2835
|
-
return this.applyMatrix4(
|
|
2834
|
+
project(camera) {
|
|
2835
|
+
return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix);
|
|
2836
2836
|
}
|
|
2837
|
-
unproject(
|
|
2838
|
-
return this.applyMatrix4(
|
|
2837
|
+
unproject(camera) {
|
|
2838
|
+
return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld);
|
|
2839
2839
|
}
|
|
2840
2840
|
transformDirection(m) {
|
|
2841
2841
|
const x = this.x, y = this.y, z = this.z;
|
|
@@ -7352,8 +7352,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
7352
7352
|
const mesh = new Mesh(geometry, material);
|
|
7353
7353
|
const currentMinFilter = texture.minFilter;
|
|
7354
7354
|
if (texture.minFilter === LinearMipmapLinearFilter) texture.minFilter = LinearFilter;
|
|
7355
|
-
const
|
|
7356
|
-
|
|
7355
|
+
const camera = new CubeCamera(1, 10, this);
|
|
7356
|
+
camera.update(renderer, mesh);
|
|
7357
7357
|
texture.minFilter = currentMinFilter;
|
|
7358
7358
|
mesh.geometry.dispose();
|
|
7359
7359
|
mesh.material.dispose();
|
|
@@ -8462,8 +8462,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
8462
8462
|
);
|
|
8463
8463
|
boxMesh.geometry.deleteAttribute("normal");
|
|
8464
8464
|
boxMesh.geometry.deleteAttribute("uv");
|
|
8465
|
-
boxMesh.onBeforeRender = function(renderer2, scene2,
|
|
8466
|
-
this.matrixWorld.copyPosition(
|
|
8465
|
+
boxMesh.onBeforeRender = function(renderer2, scene2, camera) {
|
|
8466
|
+
this.matrixWorld.copyPosition(camera.matrixWorld);
|
|
8467
8467
|
};
|
|
8468
8468
|
Object.defineProperty(boxMesh.material, "envMap", {
|
|
8469
8469
|
get: function() {
|
|
@@ -8992,12 +8992,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
8992
8992
|
this.uniform = uniform;
|
|
8993
8993
|
this.numPlanes = 0;
|
|
8994
8994
|
this.numIntersection = 0;
|
|
8995
|
-
this.init = function(planes, enableLocalClipping,
|
|
8995
|
+
this.init = function(planes, enableLocalClipping, camera) {
|
|
8996
8996
|
const enabled = planes.length !== 0 || enableLocalClipping || // enable state of previous frame - the clipping code has to
|
|
8997
8997
|
// run another frame in order to reset the state:
|
|
8998
8998
|
numGlobalPlanes !== 0 || localClippingEnabled;
|
|
8999
8999
|
localClippingEnabled = enableLocalClipping;
|
|
9000
|
-
globalState = projectPlanes(planes,
|
|
9000
|
+
globalState = projectPlanes(planes, camera, 0);
|
|
9001
9001
|
numGlobalPlanes = planes.length;
|
|
9002
9002
|
return enabled;
|
|
9003
9003
|
};
|
|
@@ -9009,7 +9009,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
9009
9009
|
renderingShadows = false;
|
|
9010
9010
|
resetGlobalState();
|
|
9011
9011
|
};
|
|
9012
|
-
this.setState = function(material,
|
|
9012
|
+
this.setState = function(material, camera, useCache) {
|
|
9013
9013
|
const planes = material.clippingPlanes, clipIntersection = material.clipIntersection, clipShadows = material.clipShadows;
|
|
9014
9014
|
const materialProperties = properties.get(material);
|
|
9015
9015
|
if (!localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && !clipShadows) {
|
|
@@ -9022,7 +9022,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
9022
9022
|
const nGlobal = renderingShadows ? 0 : numGlobalPlanes, lGlobal = nGlobal * 4;
|
|
9023
9023
|
let dstArray = materialProperties.clippingState || null;
|
|
9024
9024
|
uniform.value = dstArray;
|
|
9025
|
-
dstArray = projectPlanes(planes,
|
|
9025
|
+
dstArray = projectPlanes(planes, camera, lGlobal, useCache);
|
|
9026
9026
|
for (let i2 = 0; i2 !== lGlobal; ++i2) {
|
|
9027
9027
|
dstArray[i2] = globalState[i2];
|
|
9028
9028
|
}
|
|
@@ -9039,13 +9039,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
9039
9039
|
scope.numPlanes = numGlobalPlanes;
|
|
9040
9040
|
scope.numIntersection = 0;
|
|
9041
9041
|
}
|
|
9042
|
-
function projectPlanes(planes,
|
|
9042
|
+
function projectPlanes(planes, camera, dstOffset, skipTransform) {
|
|
9043
9043
|
const nPlanes = planes !== null ? planes.length : 0;
|
|
9044
9044
|
let dstArray = null;
|
|
9045
9045
|
if (nPlanes !== 0) {
|
|
9046
9046
|
dstArray = uniform.value;
|
|
9047
9047
|
if (skipTransform !== true || dstArray === null) {
|
|
9048
|
-
const flatSize = dstOffset + nPlanes * 4, viewMatrix =
|
|
9048
|
+
const flatSize = dstOffset + nPlanes * 4, viewMatrix = camera.matrixWorldInverse;
|
|
9049
9049
|
viewNormalMatrix.getNormalMatrix(viewMatrix);
|
|
9050
9050
|
if (dstArray === null || dstArray.length < flatSize) {
|
|
9051
9051
|
dstArray = new Float32Array(flatSize);
|
|
@@ -12340,13 +12340,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
12340
12340
|
state.version = nextVersion++;
|
|
12341
12341
|
}
|
|
12342
12342
|
}
|
|
12343
|
-
function setupView(lights,
|
|
12343
|
+
function setupView(lights, camera) {
|
|
12344
12344
|
let directionalLength = 0;
|
|
12345
12345
|
let pointLength = 0;
|
|
12346
12346
|
let spotLength = 0;
|
|
12347
12347
|
let rectAreaLength = 0;
|
|
12348
12348
|
let hemiLength = 0;
|
|
12349
|
-
const viewMatrix =
|
|
12349
|
+
const viewMatrix = camera.matrixWorldInverse;
|
|
12350
12350
|
for (let i2 = 0, l = lights.length; i2 < l; i2++) {
|
|
12351
12351
|
const light = lights[i2];
|
|
12352
12352
|
if (light.isDirectionalLight) {
|
|
@@ -12414,8 +12414,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
12414
12414
|
function setupLights(physicallyCorrectLights) {
|
|
12415
12415
|
lights.setup(lightsArray, physicallyCorrectLights);
|
|
12416
12416
|
}
|
|
12417
|
-
function setupLightsView(
|
|
12418
|
-
lights.setupView(lightsArray,
|
|
12417
|
+
function setupLightsView(camera) {
|
|
12418
|
+
lights.setupView(lightsArray, camera);
|
|
12419
12419
|
}
|
|
12420
12420
|
const state = {
|
|
12421
12421
|
lightsArray,
|
|
@@ -12546,7 +12546,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
12546
12546
|
this.autoUpdate = true;
|
|
12547
12547
|
this.needsUpdate = false;
|
|
12548
12548
|
this.type = PCFShadowMap;
|
|
12549
|
-
this.render = function(lights, scene,
|
|
12549
|
+
this.render = function(lights, scene, camera) {
|
|
12550
12550
|
if (scope.enabled === false) return;
|
|
12551
12551
|
if (scope.autoUpdate === false && scope.needsUpdate === false) return;
|
|
12552
12552
|
if (lights.length === 0) return;
|
|
@@ -12602,17 +12602,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
12602
12602
|
_state.viewport(_viewport);
|
|
12603
12603
|
shadow.updateMatrices(light, vp);
|
|
12604
12604
|
_frustum = shadow.getFrustum();
|
|
12605
|
-
renderObject(scene,
|
|
12605
|
+
renderObject(scene, camera, shadow.camera, light, this.type);
|
|
12606
12606
|
}
|
|
12607
12607
|
if (shadow.isPointLightShadow !== true && this.type === VSMShadowMap) {
|
|
12608
|
-
VSMPass(shadow,
|
|
12608
|
+
VSMPass(shadow, camera);
|
|
12609
12609
|
}
|
|
12610
12610
|
shadow.needsUpdate = false;
|
|
12611
12611
|
}
|
|
12612
12612
|
scope.needsUpdate = false;
|
|
12613
12613
|
_renderer.setRenderTarget(currentRenderTarget, activeCubeFace, activeMipmapLevel);
|
|
12614
12614
|
};
|
|
12615
|
-
function VSMPass(shadow,
|
|
12615
|
+
function VSMPass(shadow, camera) {
|
|
12616
12616
|
const geometry = _objects.update(fullScreenMesh);
|
|
12617
12617
|
if (shadowMaterialVertical.defines.VSM_SAMPLES !== shadow.blurSamples) {
|
|
12618
12618
|
shadowMaterialVertical.defines.VSM_SAMPLES = shadow.blurSamples;
|
|
@@ -12628,13 +12628,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
12628
12628
|
shadowMaterialVertical.uniforms.radius.value = shadow.radius;
|
|
12629
12629
|
_renderer.setRenderTarget(shadow.mapPass);
|
|
12630
12630
|
_renderer.clear();
|
|
12631
|
-
_renderer.renderBufferDirect(
|
|
12631
|
+
_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null);
|
|
12632
12632
|
shadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture;
|
|
12633
12633
|
shadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize;
|
|
12634
12634
|
shadowMaterialHorizontal.uniforms.radius.value = shadow.radius;
|
|
12635
12635
|
_renderer.setRenderTarget(shadow.map);
|
|
12636
12636
|
_renderer.clear();
|
|
12637
|
-
_renderer.renderBufferDirect(
|
|
12637
|
+
_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);
|
|
12638
12638
|
}
|
|
12639
12639
|
function getDepthMaterial(object, material, light, shadowCameraNear, shadowCameraFar, type) {
|
|
12640
12640
|
let result = null;
|
|
@@ -12682,10 +12682,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
12682
12682
|
}
|
|
12683
12683
|
return result;
|
|
12684
12684
|
}
|
|
12685
|
-
function renderObject(object,
|
|
12685
|
+
function renderObject(object, camera, shadowCamera, light, type) {
|
|
12686
12686
|
if (object.visible === false) return;
|
|
12687
|
-
const
|
|
12688
|
-
if (
|
|
12687
|
+
const visible = object.layers.test(camera.layers);
|
|
12688
|
+
if (visible && (object.isMesh || object.isLine || object.isPoints)) {
|
|
12689
12689
|
if ((object.castShadow || object.receiveShadow && type === VSMShadowMap) && (!object.frustumCulled || _frustum.intersectsObject(object))) {
|
|
12690
12690
|
object.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse, object.matrixWorld);
|
|
12691
12691
|
const geometry = _objects.update(object);
|
|
@@ -12708,7 +12708,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
12708
12708
|
}
|
|
12709
12709
|
const children = object.children;
|
|
12710
12710
|
for (let i2 = 0, l = children.length; i2 < l; i2++) {
|
|
12711
|
-
renderObject(children[i2],
|
|
12711
|
+
renderObject(children[i2], camera, shadowCamera, light, type);
|
|
12712
12712
|
}
|
|
12713
12713
|
}
|
|
12714
12714
|
}
|
|
@@ -14978,7 +14978,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
14978
14978
|
}
|
|
14979
14979
|
const cameraLPos = new Vector3$1();
|
|
14980
14980
|
const cameraRPos = new Vector3$1();
|
|
14981
|
-
function setProjectionFromUnion(
|
|
14981
|
+
function setProjectionFromUnion(camera, cameraL2, cameraR2) {
|
|
14982
14982
|
cameraLPos.setFromMatrixPosition(cameraL2.matrixWorld);
|
|
14983
14983
|
cameraRPos.setFromMatrixPosition(cameraR2.matrixWorld);
|
|
14984
14984
|
const ipd = cameraLPos.distanceTo(cameraRPos);
|
|
@@ -14994,31 +14994,31 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
14994
14994
|
const right = near * rightFov;
|
|
14995
14995
|
const zOffset = ipd / (-leftFov + rightFov);
|
|
14996
14996
|
const xOffset = zOffset * -leftFov;
|
|
14997
|
-
cameraL2.matrixWorld.decompose(
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
|
|
14997
|
+
cameraL2.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale);
|
|
14998
|
+
camera.translateX(xOffset);
|
|
14999
|
+
camera.translateZ(zOffset);
|
|
15000
|
+
camera.matrixWorld.compose(camera.position, camera.quaternion, camera.scale);
|
|
15001
|
+
camera.matrixWorldInverse.copy(camera.matrixWorld).invert();
|
|
15002
15002
|
const near2 = near + zOffset;
|
|
15003
15003
|
const far2 = far + zOffset;
|
|
15004
15004
|
const left2 = left - xOffset;
|
|
15005
15005
|
const right2 = right + (ipd - xOffset);
|
|
15006
15006
|
const top2 = topFov * far / far2 * near2;
|
|
15007
15007
|
const bottom2 = bottomFov * far / far2 * near2;
|
|
15008
|
-
|
|
15008
|
+
camera.projectionMatrix.makePerspective(left2, right2, top2, bottom2, near2, far2);
|
|
15009
15009
|
}
|
|
15010
|
-
function updateCamera(
|
|
15010
|
+
function updateCamera(camera, parent) {
|
|
15011
15011
|
if (parent === null) {
|
|
15012
|
-
|
|
15012
|
+
camera.matrixWorld.copy(camera.matrix);
|
|
15013
15013
|
} else {
|
|
15014
|
-
|
|
15014
|
+
camera.matrixWorld.multiplyMatrices(parent.matrixWorld, camera.matrix);
|
|
15015
15015
|
}
|
|
15016
|
-
|
|
15016
|
+
camera.matrixWorldInverse.copy(camera.matrixWorld).invert();
|
|
15017
15017
|
}
|
|
15018
|
-
this.updateCamera = function(
|
|
15018
|
+
this.updateCamera = function(camera) {
|
|
15019
15019
|
if (session === null) return;
|
|
15020
|
-
cameraVR.near = cameraR.near = cameraL.near =
|
|
15021
|
-
cameraVR.far = cameraR.far = cameraL.far =
|
|
15020
|
+
cameraVR.near = cameraR.near = cameraL.near = camera.near;
|
|
15021
|
+
cameraVR.far = cameraR.far = cameraL.far = camera.far;
|
|
15022
15022
|
if (_currentDepthNear !== cameraVR.near || _currentDepthFar !== cameraVR.far) {
|
|
15023
15023
|
session.updateRenderState({
|
|
15024
15024
|
depthNear: cameraVR.near,
|
|
@@ -15027,19 +15027,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
15027
15027
|
_currentDepthNear = cameraVR.near;
|
|
15028
15028
|
_currentDepthFar = cameraVR.far;
|
|
15029
15029
|
}
|
|
15030
|
-
const parent =
|
|
15030
|
+
const parent = camera.parent;
|
|
15031
15031
|
const cameras2 = cameraVR.cameras;
|
|
15032
15032
|
updateCamera(cameraVR, parent);
|
|
15033
15033
|
for (let i2 = 0; i2 < cameras2.length; i2++) {
|
|
15034
15034
|
updateCamera(cameras2[i2], parent);
|
|
15035
15035
|
}
|
|
15036
15036
|
cameraVR.matrixWorld.decompose(cameraVR.position, cameraVR.quaternion, cameraVR.scale);
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
|
|
15042
|
-
const children =
|
|
15037
|
+
camera.position.copy(cameraVR.position);
|
|
15038
|
+
camera.quaternion.copy(cameraVR.quaternion);
|
|
15039
|
+
camera.scale.copy(cameraVR.scale);
|
|
15040
|
+
camera.matrix.copy(cameraVR.matrix);
|
|
15041
|
+
camera.matrixWorld.copy(cameraVR.matrixWorld);
|
|
15042
|
+
const children = camera.children;
|
|
15043
15043
|
for (let i2 = 0, l = children.length; i2 < l; i2++) {
|
|
15044
15044
|
children[i2].updateMatrixWorld(true);
|
|
15045
15045
|
}
|
|
@@ -15101,21 +15101,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
15101
15101
|
renderer.setRenderTarget(newRenderTarget);
|
|
15102
15102
|
}
|
|
15103
15103
|
}
|
|
15104
|
-
let
|
|
15105
|
-
if (
|
|
15106
|
-
|
|
15107
|
-
|
|
15108
|
-
|
|
15109
|
-
cameras[i2] =
|
|
15104
|
+
let camera = cameras[i2];
|
|
15105
|
+
if (camera === void 0) {
|
|
15106
|
+
camera = new PerspectiveCamera();
|
|
15107
|
+
camera.layers.enable(i2);
|
|
15108
|
+
camera.viewport = new Vector4();
|
|
15109
|
+
cameras[i2] = camera;
|
|
15110
15110
|
}
|
|
15111
|
-
|
|
15112
|
-
|
|
15113
|
-
|
|
15111
|
+
camera.matrix.fromArray(view.transform.matrix);
|
|
15112
|
+
camera.projectionMatrix.fromArray(view.projectionMatrix);
|
|
15113
|
+
camera.viewport.set(viewport.x, viewport.y, viewport.width, viewport.height);
|
|
15114
15114
|
if (i2 === 0) {
|
|
15115
|
-
cameraVR.matrix.copy(
|
|
15115
|
+
cameraVR.matrix.copy(camera.matrix);
|
|
15116
15116
|
}
|
|
15117
15117
|
if (cameraVRNeedsUpdate === true) {
|
|
15118
|
-
cameraVR.cameras.push(
|
|
15118
|
+
cameraVR.cameras.push(camera);
|
|
15119
15119
|
}
|
|
15120
15120
|
}
|
|
15121
15121
|
}
|
|
@@ -16016,10 +16016,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16016
16016
|
}
|
|
16017
16017
|
}
|
|
16018
16018
|
}
|
|
16019
|
-
this.renderBufferDirect = function(
|
|
16019
|
+
this.renderBufferDirect = function(camera, scene, geometry, material, object, group) {
|
|
16020
16020
|
if (scene === null) scene = _emptyScene;
|
|
16021
16021
|
const frontFaceCW = object.isMesh && object.matrixWorld.determinant() < 0;
|
|
16022
|
-
const program = setProgram(
|
|
16022
|
+
const program = setProgram(camera, scene, geometry, material, object);
|
|
16023
16023
|
state.setMaterial(material, frontFaceCW);
|
|
16024
16024
|
let index2 = geometry.index;
|
|
16025
16025
|
const position = geometry.attributes.position;
|
|
@@ -16082,12 +16082,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16082
16082
|
renderer.render(drawStart, drawCount);
|
|
16083
16083
|
}
|
|
16084
16084
|
};
|
|
16085
|
-
this.compile = function(scene,
|
|
16085
|
+
this.compile = function(scene, camera) {
|
|
16086
16086
|
currentRenderState = renderStates.get(scene);
|
|
16087
16087
|
currentRenderState.init();
|
|
16088
16088
|
renderStateStack.push(currentRenderState);
|
|
16089
16089
|
scene.traverseVisible(function(object) {
|
|
16090
|
-
if (object.isLight && object.layers.test(
|
|
16090
|
+
if (object.isLight && object.layers.test(camera.layers)) {
|
|
16091
16091
|
currentRenderState.pushLight(object);
|
|
16092
16092
|
if (object.castShadow) {
|
|
16093
16093
|
currentRenderState.pushShadow(object);
|
|
@@ -16131,55 +16131,55 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16131
16131
|
};
|
|
16132
16132
|
xr.addEventListener("sessionstart", onXRSessionStart);
|
|
16133
16133
|
xr.addEventListener("sessionend", onXRSessionEnd);
|
|
16134
|
-
this.render = function(scene,
|
|
16135
|
-
if (
|
|
16134
|
+
this.render = function(scene, camera) {
|
|
16135
|
+
if (camera !== void 0 && camera.isCamera !== true) {
|
|
16136
16136
|
console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");
|
|
16137
16137
|
return;
|
|
16138
16138
|
}
|
|
16139
16139
|
if (_isContextLost === true) return;
|
|
16140
16140
|
if (scene.autoUpdate === true) scene.updateMatrixWorld();
|
|
16141
|
-
if (
|
|
16141
|
+
if (camera.parent === null) camera.updateMatrixWorld();
|
|
16142
16142
|
if (xr.enabled === true && xr.isPresenting === true) {
|
|
16143
|
-
if (xr.cameraAutoUpdate === true) xr.updateCamera(
|
|
16144
|
-
|
|
16143
|
+
if (xr.cameraAutoUpdate === true) xr.updateCamera(camera);
|
|
16144
|
+
camera = xr.getCamera();
|
|
16145
16145
|
}
|
|
16146
|
-
if (scene.isScene === true) scene.onBeforeRender(_this, scene,
|
|
16146
|
+
if (scene.isScene === true) scene.onBeforeRender(_this, scene, camera, _currentRenderTarget);
|
|
16147
16147
|
currentRenderState = renderStates.get(scene, renderStateStack.length);
|
|
16148
16148
|
currentRenderState.init();
|
|
16149
16149
|
renderStateStack.push(currentRenderState);
|
|
16150
|
-
_projScreenMatrix2.multiplyMatrices(
|
|
16150
|
+
_projScreenMatrix2.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);
|
|
16151
16151
|
_frustum.setFromProjectionMatrix(_projScreenMatrix2);
|
|
16152
16152
|
_localClippingEnabled = this.localClippingEnabled;
|
|
16153
|
-
_clippingEnabled = clipping.init(this.clippingPlanes, _localClippingEnabled,
|
|
16153
|
+
_clippingEnabled = clipping.init(this.clippingPlanes, _localClippingEnabled, camera);
|
|
16154
16154
|
currentRenderList = renderLists.get(scene, renderListStack.length);
|
|
16155
16155
|
currentRenderList.init();
|
|
16156
16156
|
renderListStack.push(currentRenderList);
|
|
16157
|
-
projectObject(scene,
|
|
16157
|
+
projectObject(scene, camera, 0, _this.sortObjects);
|
|
16158
16158
|
currentRenderList.finish();
|
|
16159
16159
|
if (_this.sortObjects === true) {
|
|
16160
16160
|
currentRenderList.sort(_opaqueSort, _transparentSort);
|
|
16161
16161
|
}
|
|
16162
16162
|
if (_clippingEnabled === true) clipping.beginShadows();
|
|
16163
16163
|
const shadowsArray = currentRenderState.state.shadowsArray;
|
|
16164
|
-
shadowMap.render(shadowsArray, scene,
|
|
16164
|
+
shadowMap.render(shadowsArray, scene, camera);
|
|
16165
16165
|
if (_clippingEnabled === true) clipping.endShadows();
|
|
16166
16166
|
if (this.info.autoReset === true) this.info.reset();
|
|
16167
16167
|
background.render(currentRenderList, scene);
|
|
16168
16168
|
currentRenderState.setupLights(_this.physicallyCorrectLights);
|
|
16169
|
-
if (
|
|
16170
|
-
const cameras =
|
|
16169
|
+
if (camera.isArrayCamera) {
|
|
16170
|
+
const cameras = camera.cameras;
|
|
16171
16171
|
for (let i2 = 0, l = cameras.length; i2 < l; i2++) {
|
|
16172
|
-
const
|
|
16173
|
-
renderScene(currentRenderList, scene,
|
|
16172
|
+
const camera2 = cameras[i2];
|
|
16173
|
+
renderScene(currentRenderList, scene, camera2, camera2.viewport);
|
|
16174
16174
|
}
|
|
16175
16175
|
} else {
|
|
16176
|
-
renderScene(currentRenderList, scene,
|
|
16176
|
+
renderScene(currentRenderList, scene, camera);
|
|
16177
16177
|
}
|
|
16178
16178
|
if (_currentRenderTarget !== null) {
|
|
16179
16179
|
textures.updateMultisampleRenderTarget(_currentRenderTarget);
|
|
16180
16180
|
textures.updateRenderTargetMipmap(_currentRenderTarget);
|
|
16181
16181
|
}
|
|
16182
|
-
if (scene.isScene === true) scene.onAfterRender(_this, scene,
|
|
16182
|
+
if (scene.isScene === true) scene.onAfterRender(_this, scene, camera);
|
|
16183
16183
|
bindingStates.resetDefaultState();
|
|
16184
16184
|
_currentMaterialId = -1;
|
|
16185
16185
|
_currentCamera = null;
|
|
@@ -16196,14 +16196,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16196
16196
|
currentRenderList = null;
|
|
16197
16197
|
}
|
|
16198
16198
|
};
|
|
16199
|
-
function projectObject(object,
|
|
16199
|
+
function projectObject(object, camera, groupOrder, sortObjects) {
|
|
16200
16200
|
if (object.visible === false) return;
|
|
16201
|
-
const
|
|
16202
|
-
if (
|
|
16201
|
+
const visible = object.layers.test(camera.layers);
|
|
16202
|
+
if (visible) {
|
|
16203
16203
|
if (object.isGroup) {
|
|
16204
16204
|
groupOrder = object.renderOrder;
|
|
16205
16205
|
} else if (object.isLOD) {
|
|
16206
|
-
if (object.autoUpdate === true) object.update(
|
|
16206
|
+
if (object.autoUpdate === true) object.update(camera);
|
|
16207
16207
|
} else if (object.isLight) {
|
|
16208
16208
|
currentRenderState.pushLight(object);
|
|
16209
16209
|
if (object.castShadow) {
|
|
@@ -16250,25 +16250,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16250
16250
|
}
|
|
16251
16251
|
const children = object.children;
|
|
16252
16252
|
for (let i2 = 0, l = children.length; i2 < l; i2++) {
|
|
16253
|
-
projectObject(children[i2],
|
|
16253
|
+
projectObject(children[i2], camera, groupOrder, sortObjects);
|
|
16254
16254
|
}
|
|
16255
16255
|
}
|
|
16256
|
-
function renderScene(currentRenderList2, scene,
|
|
16256
|
+
function renderScene(currentRenderList2, scene, camera, viewport) {
|
|
16257
16257
|
const opaqueObjects = currentRenderList2.opaque;
|
|
16258
16258
|
const transmissiveObjects = currentRenderList2.transmissive;
|
|
16259
16259
|
const transparentObjects = currentRenderList2.transparent;
|
|
16260
|
-
currentRenderState.setupLightsView(
|
|
16261
|
-
if (transmissiveObjects.length > 0) renderTransmissionPass(opaqueObjects, scene,
|
|
16260
|
+
currentRenderState.setupLightsView(camera);
|
|
16261
|
+
if (transmissiveObjects.length > 0) renderTransmissionPass(opaqueObjects, scene, camera);
|
|
16262
16262
|
if (viewport) state.viewport(_currentViewport.copy(viewport));
|
|
16263
|
-
if (opaqueObjects.length > 0) renderObjects(opaqueObjects, scene,
|
|
16264
|
-
if (transmissiveObjects.length > 0) renderObjects(transmissiveObjects, scene,
|
|
16265
|
-
if (transparentObjects.length > 0) renderObjects(transparentObjects, scene,
|
|
16263
|
+
if (opaqueObjects.length > 0) renderObjects(opaqueObjects, scene, camera);
|
|
16264
|
+
if (transmissiveObjects.length > 0) renderObjects(transmissiveObjects, scene, camera);
|
|
16265
|
+
if (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera);
|
|
16266
16266
|
state.buffers.depth.setTest(true);
|
|
16267
16267
|
state.buffers.depth.setMask(true);
|
|
16268
16268
|
state.buffers.color.setMask(true);
|
|
16269
16269
|
state.setPolygonOffset(false);
|
|
16270
16270
|
}
|
|
16271
|
-
function renderTransmissionPass(opaqueObjects, scene,
|
|
16271
|
+
function renderTransmissionPass(opaqueObjects, scene, camera) {
|
|
16272
16272
|
const isWebGL2 = capabilities.isWebGL2;
|
|
16273
16273
|
if (_transmissionRenderTarget === null) {
|
|
16274
16274
|
_transmissionRenderTarget = new WebGLRenderTarget(1, 1, {
|
|
@@ -16289,13 +16289,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16289
16289
|
_this.clear();
|
|
16290
16290
|
const currentToneMapping = _this.toneMapping;
|
|
16291
16291
|
_this.toneMapping = NoToneMapping;
|
|
16292
|
-
renderObjects(opaqueObjects, scene,
|
|
16292
|
+
renderObjects(opaqueObjects, scene, camera);
|
|
16293
16293
|
_this.toneMapping = currentToneMapping;
|
|
16294
16294
|
textures.updateMultisampleRenderTarget(_transmissionRenderTarget);
|
|
16295
16295
|
textures.updateRenderTargetMipmap(_transmissionRenderTarget);
|
|
16296
16296
|
_this.setRenderTarget(currentRenderTarget);
|
|
16297
16297
|
}
|
|
16298
|
-
function renderObjects(renderList, scene,
|
|
16298
|
+
function renderObjects(renderList, scene, camera) {
|
|
16299
16299
|
const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;
|
|
16300
16300
|
for (let i2 = 0, l = renderList.length; i2 < l; i2++) {
|
|
16301
16301
|
const renderItem = renderList[i2];
|
|
@@ -16303,28 +16303,28 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16303
16303
|
const geometry = renderItem.geometry;
|
|
16304
16304
|
const material = overrideMaterial === null ? renderItem.material : overrideMaterial;
|
|
16305
16305
|
const group = renderItem.group;
|
|
16306
|
-
if (object.layers.test(
|
|
16307
|
-
renderObject(object, scene,
|
|
16306
|
+
if (object.layers.test(camera.layers)) {
|
|
16307
|
+
renderObject(object, scene, camera, geometry, material, group);
|
|
16308
16308
|
}
|
|
16309
16309
|
}
|
|
16310
16310
|
}
|
|
16311
|
-
function renderObject(object, scene,
|
|
16312
|
-
object.onBeforeRender(_this, scene,
|
|
16313
|
-
object.modelViewMatrix.multiplyMatrices(
|
|
16311
|
+
function renderObject(object, scene, camera, geometry, material, group) {
|
|
16312
|
+
object.onBeforeRender(_this, scene, camera, geometry, material, group);
|
|
16313
|
+
object.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse, object.matrixWorld);
|
|
16314
16314
|
object.normalMatrix.getNormalMatrix(object.modelViewMatrix);
|
|
16315
|
-
material.onBeforeRender(_this, scene,
|
|
16315
|
+
material.onBeforeRender(_this, scene, camera, geometry, object, group);
|
|
16316
16316
|
if (material.transparent === true && material.side === DoubleSide) {
|
|
16317
16317
|
material.side = BackSide;
|
|
16318
16318
|
material.needsUpdate = true;
|
|
16319
|
-
_this.renderBufferDirect(
|
|
16319
|
+
_this.renderBufferDirect(camera, scene, geometry, material, object, group);
|
|
16320
16320
|
material.side = FrontSide;
|
|
16321
16321
|
material.needsUpdate = true;
|
|
16322
|
-
_this.renderBufferDirect(
|
|
16322
|
+
_this.renderBufferDirect(camera, scene, geometry, material, object, group);
|
|
16323
16323
|
material.side = DoubleSide;
|
|
16324
16324
|
} else {
|
|
16325
|
-
_this.renderBufferDirect(
|
|
16325
|
+
_this.renderBufferDirect(camera, scene, geometry, material, object, group);
|
|
16326
16326
|
}
|
|
16327
|
-
object.onAfterRender(_this, scene,
|
|
16327
|
+
object.onAfterRender(_this, scene, camera, geometry, material, group);
|
|
16328
16328
|
}
|
|
16329
16329
|
function getProgram(material, scene, object) {
|
|
16330
16330
|
if (scene.isScene !== true) scene = _emptyScene;
|
|
@@ -16405,7 +16405,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16405
16405
|
materialProperties.vertexTangents = parameters2.vertexTangents;
|
|
16406
16406
|
materialProperties.toneMapping = parameters2.toneMapping;
|
|
16407
16407
|
}
|
|
16408
|
-
function setProgram(
|
|
16408
|
+
function setProgram(camera, scene, geometry, material, object) {
|
|
16409
16409
|
if (scene.isScene !== true) scene = _emptyScene;
|
|
16410
16410
|
textures.resetTextureUnits();
|
|
16411
16411
|
const fog = scene.fog;
|
|
@@ -16423,9 +16423,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16423
16423
|
const materialProperties = properties.get(material);
|
|
16424
16424
|
const lights = currentRenderState.state.lights;
|
|
16425
16425
|
if (_clippingEnabled === true) {
|
|
16426
|
-
if (_localClippingEnabled === true ||
|
|
16427
|
-
const useCache =
|
|
16428
|
-
clipping.setState(material,
|
|
16426
|
+
if (_localClippingEnabled === true || camera !== _currentCamera) {
|
|
16427
|
+
const useCache = camera === _currentCamera && material.id === _currentMaterialId;
|
|
16428
|
+
clipping.setState(material, camera, useCache);
|
|
16429
16429
|
}
|
|
16430
16430
|
}
|
|
16431
16431
|
let needsProgramChange = false;
|
|
@@ -16484,17 +16484,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16484
16484
|
_currentMaterialId = material.id;
|
|
16485
16485
|
refreshMaterial = true;
|
|
16486
16486
|
}
|
|
16487
|
-
if (refreshProgram || _currentCamera !==
|
|
16488
|
-
p_uniforms.setValue(_gl, "projectionMatrix",
|
|
16487
|
+
if (refreshProgram || _currentCamera !== camera) {
|
|
16488
|
+
p_uniforms.setValue(_gl, "projectionMatrix", camera.projectionMatrix);
|
|
16489
16489
|
if (capabilities.logarithmicDepthBuffer) {
|
|
16490
16490
|
p_uniforms.setValue(
|
|
16491
16491
|
_gl,
|
|
16492
16492
|
"logDepthBufFC",
|
|
16493
|
-
2 / (Math.log(
|
|
16493
|
+
2 / (Math.log(camera.far + 1) / Math.LN2)
|
|
16494
16494
|
);
|
|
16495
16495
|
}
|
|
16496
|
-
if (_currentCamera !==
|
|
16497
|
-
_currentCamera =
|
|
16496
|
+
if (_currentCamera !== camera) {
|
|
16497
|
+
_currentCamera = camera;
|
|
16498
16498
|
refreshMaterial = true;
|
|
16499
16499
|
refreshLights = true;
|
|
16500
16500
|
}
|
|
@@ -16503,15 +16503,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16503
16503
|
if (uCamPos !== void 0) {
|
|
16504
16504
|
uCamPos.setValue(
|
|
16505
16505
|
_gl,
|
|
16506
|
-
_vector3.setFromMatrixPosition(
|
|
16506
|
+
_vector3.setFromMatrixPosition(camera.matrixWorld)
|
|
16507
16507
|
);
|
|
16508
16508
|
}
|
|
16509
16509
|
}
|
|
16510
16510
|
if (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial) {
|
|
16511
|
-
p_uniforms.setValue(_gl, "isOrthographic",
|
|
16511
|
+
p_uniforms.setValue(_gl, "isOrthographic", camera.isOrthographicCamera === true);
|
|
16512
16512
|
}
|
|
16513
16513
|
if (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial || material.isShadowMaterial || object.isSkinnedMesh) {
|
|
16514
|
-
p_uniforms.setValue(_gl, "viewMatrix",
|
|
16514
|
+
p_uniforms.setValue(_gl, "viewMatrix", camera.matrixWorldInverse);
|
|
16515
16515
|
}
|
|
16516
16516
|
}
|
|
16517
16517
|
if (object.isSkinnedMesh) {
|
|
@@ -17310,12 +17310,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
17310
17310
|
this.getObjectForDistance(distance).raycast(raycaster, intersects2);
|
|
17311
17311
|
}
|
|
17312
17312
|
}
|
|
17313
|
-
update(
|
|
17313
|
+
update(camera) {
|
|
17314
17314
|
const levels = this.levels;
|
|
17315
17315
|
if (levels.length > 1) {
|
|
17316
|
-
_v1$2.setFromMatrixPosition(
|
|
17316
|
+
_v1$2.setFromMatrixPosition(camera.matrixWorld);
|
|
17317
17317
|
_v2$1.setFromMatrixPosition(this.matrixWorld);
|
|
17318
|
-
const distance = _v1$2.distanceTo(_v2$1) /
|
|
17318
|
+
const distance = _v1$2.distanceTo(_v2$1) / camera.zoom;
|
|
17319
17319
|
levels[0].object.visible = true;
|
|
17320
17320
|
let i2, l;
|
|
17321
17321
|
for (i2 = 1, l = levels.length; i2 < l; i2++) {
|
|
@@ -23330,8 +23330,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23330
23330
|
const _lightPositionWorld$1 = /* @__PURE__ */ new Vector3$1();
|
|
23331
23331
|
const _lookTarget$1 = /* @__PURE__ */ new Vector3$1();
|
|
23332
23332
|
class LightShadow {
|
|
23333
|
-
constructor(
|
|
23334
|
-
this.camera =
|
|
23333
|
+
constructor(camera) {
|
|
23334
|
+
this.camera = camera;
|
|
23335
23335
|
this.bias = 0;
|
|
23336
23336
|
this.normalBias = 0;
|
|
23337
23337
|
this.radius = 1;
|
|
@@ -23428,15 +23428,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23428
23428
|
this.focus = 1;
|
|
23429
23429
|
}
|
|
23430
23430
|
updateMatrices(light) {
|
|
23431
|
-
const
|
|
23431
|
+
const camera = this.camera;
|
|
23432
23432
|
const fov2 = RAD2DEG * 2 * light.angle * this.focus;
|
|
23433
23433
|
const aspect2 = this.mapSize.width / this.mapSize.height;
|
|
23434
|
-
const far = light.distance ||
|
|
23435
|
-
if (fov2 !==
|
|
23436
|
-
|
|
23437
|
-
|
|
23438
|
-
|
|
23439
|
-
|
|
23434
|
+
const far = light.distance || camera.far;
|
|
23435
|
+
if (fov2 !== camera.fov || aspect2 !== camera.aspect || far !== camera.far) {
|
|
23436
|
+
camera.fov = fov2;
|
|
23437
|
+
camera.aspect = aspect2;
|
|
23438
|
+
camera.far = far;
|
|
23439
|
+
camera.updateProjectionMatrix();
|
|
23440
23440
|
}
|
|
23441
23441
|
super.updateMatrices(light);
|
|
23442
23442
|
}
|
|
@@ -23533,22 +23533,22 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23533
23533
|
];
|
|
23534
23534
|
}
|
|
23535
23535
|
updateMatrices(light, viewportIndex = 0) {
|
|
23536
|
-
const
|
|
23536
|
+
const camera = this.camera;
|
|
23537
23537
|
const shadowMatrix = this.matrix;
|
|
23538
|
-
const far = light.distance ||
|
|
23539
|
-
if (far !==
|
|
23540
|
-
|
|
23541
|
-
|
|
23538
|
+
const far = light.distance || camera.far;
|
|
23539
|
+
if (far !== camera.far) {
|
|
23540
|
+
camera.far = far;
|
|
23541
|
+
camera.updateProjectionMatrix();
|
|
23542
23542
|
}
|
|
23543
23543
|
_lightPositionWorld.setFromMatrixPosition(light.matrixWorld);
|
|
23544
|
-
|
|
23545
|
-
_lookTarget.copy(
|
|
23544
|
+
camera.position.copy(_lightPositionWorld);
|
|
23545
|
+
_lookTarget.copy(camera.position);
|
|
23546
23546
|
_lookTarget.add(this._cubeDirections[viewportIndex]);
|
|
23547
|
-
|
|
23548
|
-
|
|
23549
|
-
|
|
23547
|
+
camera.up.copy(this._cubeUps[viewportIndex]);
|
|
23548
|
+
camera.lookAt(_lookTarget);
|
|
23549
|
+
camera.updateMatrixWorld();
|
|
23550
23550
|
shadowMatrix.makeTranslation(-_lightPositionWorld.x, -_lightPositionWorld.y, -_lightPositionWorld.z);
|
|
23551
|
-
_projScreenMatrix.multiplyMatrices(
|
|
23551
|
+
_projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);
|
|
23552
23552
|
this._frustum.setFromProjectionMatrix(_projScreenMatrix);
|
|
23553
23553
|
}
|
|
23554
23554
|
}
|
|
@@ -24865,18 +24865,18 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24865
24865
|
eyeSep: null
|
|
24866
24866
|
};
|
|
24867
24867
|
}
|
|
24868
|
-
update(
|
|
24868
|
+
update(camera) {
|
|
24869
24869
|
const cache = this._cache;
|
|
24870
|
-
const needsUpdate = cache.focus !==
|
|
24870
|
+
const needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov || cache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near || cache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep;
|
|
24871
24871
|
if (needsUpdate) {
|
|
24872
|
-
cache.focus =
|
|
24873
|
-
cache.fov =
|
|
24874
|
-
cache.aspect =
|
|
24875
|
-
cache.near =
|
|
24876
|
-
cache.far =
|
|
24877
|
-
cache.zoom =
|
|
24872
|
+
cache.focus = camera.focus;
|
|
24873
|
+
cache.fov = camera.fov;
|
|
24874
|
+
cache.aspect = camera.aspect * this.aspect;
|
|
24875
|
+
cache.near = camera.near;
|
|
24876
|
+
cache.far = camera.far;
|
|
24877
|
+
cache.zoom = camera.zoom;
|
|
24878
24878
|
cache.eyeSep = this.eyeSep;
|
|
24879
|
-
_projectionMatrix.copy(
|
|
24879
|
+
_projectionMatrix.copy(camera.projectionMatrix);
|
|
24880
24880
|
const eyeSepHalf = cache.eyeSep / 2;
|
|
24881
24881
|
const eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus;
|
|
24882
24882
|
const ymax = cache.near * Math.tan(DEG2RAD * cache.fov * 0.5) / cache.zoom;
|
|
@@ -24894,8 +24894,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24894
24894
|
_projectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin);
|
|
24895
24895
|
this.cameraR.projectionMatrix.copy(_projectionMatrix);
|
|
24896
24896
|
}
|
|
24897
|
-
this.cameraL.matrixWorld.copy(
|
|
24898
|
-
this.cameraR.matrixWorld.copy(
|
|
24897
|
+
this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft);
|
|
24898
|
+
this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight);
|
|
24899
24899
|
}
|
|
24900
24900
|
}
|
|
24901
24901
|
class Clock {
|
|
@@ -26835,17 +26835,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26835
26835
|
set(origin, direction) {
|
|
26836
26836
|
this.ray.set(origin, direction);
|
|
26837
26837
|
}
|
|
26838
|
-
setFromCamera(coords,
|
|
26839
|
-
if (
|
|
26840
|
-
this.ray.origin.setFromMatrixPosition(
|
|
26841
|
-
this.ray.direction.set(coords.x, coords.y, 0.5).unproject(
|
|
26842
|
-
this.camera =
|
|
26843
|
-
} else if (
|
|
26844
|
-
this.ray.origin.set(coords.x, coords.y, (
|
|
26845
|
-
this.ray.direction.set(0, 0, -1).transformDirection(
|
|
26846
|
-
this.camera =
|
|
26838
|
+
setFromCamera(coords, camera) {
|
|
26839
|
+
if (camera.isPerspectiveCamera) {
|
|
26840
|
+
this.ray.origin.setFromMatrixPosition(camera.matrixWorld);
|
|
26841
|
+
this.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize();
|
|
26842
|
+
this.camera = camera;
|
|
26843
|
+
} else if (camera.isOrthographicCamera) {
|
|
26844
|
+
this.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera);
|
|
26845
|
+
this.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld);
|
|
26846
|
+
this.camera = camera;
|
|
26847
26847
|
} else {
|
|
26848
|
-
console.error("THREE.Raycaster: Unsupported camera type: " +
|
|
26848
|
+
console.error("THREE.Raycaster: Unsupported camera type: " + camera.type);
|
|
26849
26849
|
}
|
|
26850
26850
|
}
|
|
26851
26851
|
intersectObject(object, recursive = true, intersects2 = []) {
|
|
@@ -27452,7 +27452,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27452
27452
|
const _vector$d = /* @__PURE__ */ new Vector3$1();
|
|
27453
27453
|
const _camera$1 = /* @__PURE__ */ new Camera$2();
|
|
27454
27454
|
class CameraHelper extends LineSegments {
|
|
27455
|
-
constructor(
|
|
27455
|
+
constructor(camera) {
|
|
27456
27456
|
const geometry = new BufferGeometry();
|
|
27457
27457
|
const material = new LineBasicMaterial({ color: 16777215, vertexColors: true, toneMapped: false });
|
|
27458
27458
|
const vertices = [];
|
|
@@ -27499,9 +27499,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27499
27499
|
geometry.setAttribute("color", new Float32BufferAttribute(colors, 3));
|
|
27500
27500
|
super(geometry, material);
|
|
27501
27501
|
this.type = "CameraHelper";
|
|
27502
|
-
this.camera =
|
|
27502
|
+
this.camera = camera;
|
|
27503
27503
|
if (this.camera.updateProjectionMatrix) this.camera.updateProjectionMatrix();
|
|
27504
|
-
this.matrix =
|
|
27504
|
+
this.matrix = camera.matrixWorld;
|
|
27505
27505
|
this.matrixAutoUpdate = false;
|
|
27506
27506
|
this.pointMap = pointMap;
|
|
27507
27507
|
this.update();
|
|
@@ -27600,8 +27600,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27600
27600
|
this.material.dispose();
|
|
27601
27601
|
}
|
|
27602
27602
|
}
|
|
27603
|
-
function setPoint(point, pointMap, geometry,
|
|
27604
|
-
_vector$d.set(x, y, z).unproject(
|
|
27603
|
+
function setPoint(point, pointMap, geometry, camera, x, y, z) {
|
|
27604
|
+
_vector$d.set(x, y, z).unproject(camera);
|
|
27605
27605
|
const points = pointMap[point];
|
|
27606
27606
|
if (points !== void 0) {
|
|
27607
27607
|
const position = geometry.getAttribute("position");
|
|
@@ -29820,11 +29820,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29820
29820
|
};
|
|
29821
29821
|
const fill_window = (s) => {
|
|
29822
29822
|
const _w_size = s.w_size;
|
|
29823
|
-
let n,
|
|
29823
|
+
let n, more, str;
|
|
29824
29824
|
do {
|
|
29825
|
-
|
|
29825
|
+
more = s.window_size - s.lookahead - s.strstart;
|
|
29826
29826
|
if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
|
|
29827
|
-
s.window.set(s.window.subarray(_w_size, _w_size + _w_size -
|
|
29827
|
+
s.window.set(s.window.subarray(_w_size, _w_size + _w_size - more), 0);
|
|
29828
29828
|
s.match_start -= _w_size;
|
|
29829
29829
|
s.strstart -= _w_size;
|
|
29830
29830
|
s.block_start -= _w_size;
|
|
@@ -29832,12 +29832,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29832
29832
|
s.insert = s.strstart;
|
|
29833
29833
|
}
|
|
29834
29834
|
slide_hash(s);
|
|
29835
|
-
|
|
29835
|
+
more += _w_size;
|
|
29836
29836
|
}
|
|
29837
29837
|
if (s.strm.avail_in === 0) {
|
|
29838
29838
|
break;
|
|
29839
29839
|
}
|
|
29840
|
-
n = read_buf(s.strm, s.window, s.strstart + s.lookahead,
|
|
29840
|
+
n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
|
|
29841
29841
|
s.lookahead += n;
|
|
29842
29842
|
if (s.lookahead + s.insert >= MIN_MATCH) {
|
|
29843
29843
|
str = s.strstart - s.insert;
|
|
@@ -38692,10 +38692,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
38692
38692
|
upOffset = await localTable.getNumberArray("double:UpOffset");
|
|
38693
38693
|
})()
|
|
38694
38694
|
]);
|
|
38695
|
-
let
|
|
38695
|
+
let camera = [];
|
|
38696
38696
|
const rowCount = await this.getCount();
|
|
38697
38697
|
for (let i2 = 0; i2 < rowCount; i2++) {
|
|
38698
|
-
|
|
38698
|
+
camera.push({
|
|
38699
38699
|
index: i2,
|
|
38700
38700
|
id: id2 ? id2[i2] : void 0,
|
|
38701
38701
|
isPerspective: isPerspective ? isPerspective[i2] : void 0,
|
|
@@ -38708,7 +38708,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
38708
38708
|
upOffset: upOffset ? upOffset[i2] : void 0
|
|
38709
38709
|
});
|
|
38710
38710
|
}
|
|
38711
|
-
return
|
|
38711
|
+
return camera;
|
|
38712
38712
|
}
|
|
38713
38713
|
async getId(cameraIndex) {
|
|
38714
38714
|
return await this.entityTable.getNumber(cameraIndex, "int:Id");
|
|
@@ -47156,9 +47156,9 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
47156
47156
|
return Math.max(min2, Math.min(max2, value));
|
|
47157
47157
|
}
|
|
47158
47158
|
class PerspectiveWrapper {
|
|
47159
|
-
constructor(
|
|
47159
|
+
constructor(camera) {
|
|
47160
47160
|
__publicField(this, "camera");
|
|
47161
|
-
this.camera =
|
|
47161
|
+
this.camera = camera;
|
|
47162
47162
|
}
|
|
47163
47163
|
applySettings(settings2) {
|
|
47164
47164
|
this.camera.fov = settings2.camera.fov;
|
|
@@ -47178,9 +47178,9 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
47178
47178
|
}
|
|
47179
47179
|
}
|
|
47180
47180
|
class OrthographicWrapper {
|
|
47181
|
-
constructor(
|
|
47181
|
+
constructor(camera) {
|
|
47182
47182
|
__publicField(this, "camera");
|
|
47183
|
-
this.camera =
|
|
47183
|
+
this.camera = camera;
|
|
47184
47184
|
}
|
|
47185
47185
|
frustrumSizeAt(point) {
|
|
47186
47186
|
return new Vector2$1(
|
|
@@ -47353,9 +47353,9 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
47353
47353
|
}
|
|
47354
47354
|
}
|
|
47355
47355
|
class CameraMovement {
|
|
47356
|
-
constructor(
|
|
47356
|
+
constructor(camera) {
|
|
47357
47357
|
__publicField(this, "_camera");
|
|
47358
|
-
this._camera =
|
|
47358
|
+
this._camera = camera;
|
|
47359
47359
|
}
|
|
47360
47360
|
/**
|
|
47361
47361
|
* Moves the camera in a specified 2D direction within a plane defined by the given axes.
|
|
@@ -47444,8 +47444,8 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
47444
47444
|
}
|
|
47445
47445
|
}
|
|
47446
47446
|
class CameraLerp extends CameraMovement {
|
|
47447
|
-
constructor(
|
|
47448
|
-
super(
|
|
47447
|
+
constructor(camera, movement) {
|
|
47448
|
+
super(camera);
|
|
47449
47449
|
__publicField(this, "_movement");
|
|
47450
47450
|
__publicField(this, "_clock", new Clock());
|
|
47451
47451
|
// position
|
|
@@ -48337,14 +48337,14 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
48337
48337
|
}
|
|
48338
48338
|
}
|
|
48339
48339
|
class Raycaster {
|
|
48340
|
-
constructor(viewport,
|
|
48340
|
+
constructor(viewport, camera, scene, renderer) {
|
|
48341
48341
|
__publicField(this, "_viewport");
|
|
48342
48342
|
__publicField(this, "_camera");
|
|
48343
48343
|
__publicField(this, "_scene");
|
|
48344
48344
|
__publicField(this, "_renderer");
|
|
48345
48345
|
__publicField(this, "_raycaster", new Raycaster$1());
|
|
48346
48346
|
this._viewport = viewport;
|
|
48347
|
-
this._camera =
|
|
48347
|
+
this._camera = camera;
|
|
48348
48348
|
this._scene = scene;
|
|
48349
48349
|
this._renderer = renderer;
|
|
48350
48350
|
}
|
|
@@ -49014,12 +49014,12 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49014
49014
|
this._viewer = viewer;
|
|
49015
49015
|
}
|
|
49016
49016
|
onMainAction(action) {
|
|
49017
|
-
const
|
|
49017
|
+
const camera = this._viewer.camera;
|
|
49018
49018
|
const selection = this._viewer.selection;
|
|
49019
49019
|
if (!(action == null ? void 0 : action.object)) {
|
|
49020
49020
|
selection.select(void 0);
|
|
49021
49021
|
if (action.type === "double") {
|
|
49022
|
-
|
|
49022
|
+
camera.lerp(1).frame("all");
|
|
49023
49023
|
}
|
|
49024
49024
|
return;
|
|
49025
49025
|
}
|
|
@@ -49029,7 +49029,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49029
49029
|
selection.select(action.object);
|
|
49030
49030
|
}
|
|
49031
49031
|
if (action.type === "double") {
|
|
49032
|
-
|
|
49032
|
+
camera.lerp(1).frame(action.object);
|
|
49033
49033
|
}
|
|
49034
49034
|
}
|
|
49035
49035
|
onIdleAction(hit) {
|
|
@@ -49038,26 +49038,26 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49038
49038
|
}
|
|
49039
49039
|
}
|
|
49040
49040
|
onKeyAction(key) {
|
|
49041
|
-
const
|
|
49041
|
+
const camera = this._viewer.camera;
|
|
49042
49042
|
const selection = this._viewer.selection;
|
|
49043
49043
|
switch (key) {
|
|
49044
49044
|
case KEYS.KEY_P:
|
|
49045
|
-
|
|
49045
|
+
camera.orthographic = !camera.orthographic;
|
|
49046
49046
|
return true;
|
|
49047
49047
|
case KEYS.KEY_ADD:
|
|
49048
49048
|
case KEYS.KEY_OEM_PLUS:
|
|
49049
|
-
|
|
49049
|
+
camera.speed += 1;
|
|
49050
49050
|
return true;
|
|
49051
49051
|
case KEYS.KEY_SUBTRACT:
|
|
49052
49052
|
case KEYS.KEY_OEM_MINUS:
|
|
49053
|
-
|
|
49053
|
+
camera.speed -= 1;
|
|
49054
49054
|
return true;
|
|
49055
49055
|
case KEYS.KEY_F8:
|
|
49056
49056
|
case KEYS.KEY_SPACE:
|
|
49057
49057
|
this._viewer.inputs.pointerActive = this._viewer.inputs.pointerFallback;
|
|
49058
49058
|
return true;
|
|
49059
49059
|
case KEYS.KEY_HOME:
|
|
49060
|
-
|
|
49060
|
+
camera.lerp(1).reset();
|
|
49061
49061
|
return true;
|
|
49062
49062
|
// Selection
|
|
49063
49063
|
case KEYS.KEY_ESCAPE:
|
|
@@ -49066,9 +49066,9 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49066
49066
|
case KEYS.KEY_Z:
|
|
49067
49067
|
case KEYS.KEY_F:
|
|
49068
49068
|
if (selection.count > 0) {
|
|
49069
|
-
|
|
49069
|
+
camera.lerp(1).frame(selection.getBoundingBox());
|
|
49070
49070
|
} else {
|
|
49071
|
-
|
|
49071
|
+
camera.lerp(1).frame("all");
|
|
49072
49072
|
}
|
|
49073
49073
|
return true;
|
|
49074
49074
|
default:
|
|
@@ -49503,7 +49503,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49503
49503
|
}
|
|
49504
49504
|
}
|
|
49505
49505
|
class Skybox {
|
|
49506
|
-
constructor(
|
|
49506
|
+
constructor(camera, renderer, materials, settings2) {
|
|
49507
49507
|
__publicField(this, "mesh");
|
|
49508
49508
|
__publicField(this, "_plane");
|
|
49509
49509
|
__publicField(this, "_material");
|
|
@@ -49516,10 +49516,10 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49516
49516
|
this.skyColor = settings2.skybox.skyColor;
|
|
49517
49517
|
this.groundColor = settings2.skybox.groundColor;
|
|
49518
49518
|
this.sharpness = settings2.skybox.sharpness;
|
|
49519
|
-
|
|
49520
|
-
this.mesh.position.copy(
|
|
49521
|
-
this.mesh.quaternion.copy(
|
|
49522
|
-
const size =
|
|
49519
|
+
camera.onMoved.subscribe(() => {
|
|
49520
|
+
this.mesh.position.copy(camera.position).add(camera.forward);
|
|
49521
|
+
this.mesh.quaternion.copy(camera.quaternion);
|
|
49522
|
+
const size = camera.frustrumSizeAt(this.mesh.position);
|
|
49523
49523
|
this.mesh.scale.set(size.x, size.y, 1);
|
|
49524
49524
|
});
|
|
49525
49525
|
}
|
|
@@ -49571,7 +49571,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49571
49571
|
}
|
|
49572
49572
|
}
|
|
49573
49573
|
class CameraLight {
|
|
49574
|
-
constructor(
|
|
49574
|
+
constructor(camera, options) {
|
|
49575
49575
|
__publicField(this, "light");
|
|
49576
49576
|
__publicField(this, "_camera");
|
|
49577
49577
|
__publicField(this, "_unsubscribe");
|
|
@@ -49579,7 +49579,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49579
49579
|
* The position of the light.
|
|
49580
49580
|
*/
|
|
49581
49581
|
__publicField(this, "position");
|
|
49582
|
-
this._camera =
|
|
49582
|
+
this._camera = camera;
|
|
49583
49583
|
this.position = options.position.clone();
|
|
49584
49584
|
this.light = new DirectionalLight(options.color, options.intensity);
|
|
49585
49585
|
this.followCamera = options.followCamera;
|
|
@@ -49635,7 +49635,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49635
49635
|
}
|
|
49636
49636
|
}
|
|
49637
49637
|
class Environment {
|
|
49638
|
-
constructor(
|
|
49638
|
+
constructor(camera, renderer, viewerMaterials, settings2) {
|
|
49639
49639
|
__publicField(this, "_renderer");
|
|
49640
49640
|
__publicField(this, "_camera");
|
|
49641
49641
|
/**
|
|
@@ -49654,11 +49654,11 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49654
49654
|
* The skybox in the scene.
|
|
49655
49655
|
*/
|
|
49656
49656
|
__publicField(this, "skybox");
|
|
49657
|
-
this._camera =
|
|
49657
|
+
this._camera = camera;
|
|
49658
49658
|
this._renderer = renderer;
|
|
49659
49659
|
this.groundPlane = new GroundPlane(settings2);
|
|
49660
49660
|
this.skyLight = this.createSkyLight(settings2);
|
|
49661
|
-
this.skybox = new Skybox(
|
|
49661
|
+
this.skybox = new Skybox(camera, renderer, viewerMaterials, settings2);
|
|
49662
49662
|
this.sunLights = this.createSunLights(settings2);
|
|
49663
49663
|
this.setupRendererListeners();
|
|
49664
49664
|
this.addObjectsToRenderer();
|
|
@@ -49742,12 +49742,12 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49742
49742
|
height: _height
|
|
49743
49743
|
};
|
|
49744
49744
|
};
|
|
49745
|
-
this.render = function(scene,
|
|
49745
|
+
this.render = function(scene, camera) {
|
|
49746
49746
|
if (scene.autoUpdate === true) scene.updateMatrixWorld();
|
|
49747
|
-
if (
|
|
49748
|
-
_viewMatrix.copy(
|
|
49749
|
-
_viewProjectionMatrix.multiplyMatrices(
|
|
49750
|
-
renderObject(scene, scene,
|
|
49747
|
+
if (camera.parent === null) camera.updateMatrixWorld();
|
|
49748
|
+
_viewMatrix.copy(camera.matrixWorldInverse);
|
|
49749
|
+
_viewProjectionMatrix.multiplyMatrices(camera.projectionMatrix, _viewMatrix);
|
|
49750
|
+
renderObject(scene, scene, camera);
|
|
49751
49751
|
zOrder2(scene);
|
|
49752
49752
|
};
|
|
49753
49753
|
this.setSize = function(width, height) {
|
|
@@ -49758,28 +49758,28 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
49758
49758
|
domElement.style.width = width + "px";
|
|
49759
49759
|
domElement.style.height = height + "px";
|
|
49760
49760
|
};
|
|
49761
|
-
function renderObject(object, scene,
|
|
49761
|
+
function renderObject(object, scene, camera) {
|
|
49762
49762
|
if (object.isCSS2DObject) {
|
|
49763
49763
|
_vector.setFromMatrixPosition(object.matrixWorld);
|
|
49764
49764
|
_vector.applyMatrix4(_viewProjectionMatrix);
|
|
49765
|
-
const
|
|
49766
|
-
object.element.style.display =
|
|
49767
|
-
if (
|
|
49768
|
-
object.onBeforeRender(_this, scene,
|
|
49765
|
+
const visible = object.visible === true && (_vector.z >= -1 && _vector.z <= 1) && object.layers.test(camera.layers) === true;
|
|
49766
|
+
object.element.style.display = visible === true ? "" : "none";
|
|
49767
|
+
if (visible === true) {
|
|
49768
|
+
object.onBeforeRender(_this, scene, camera);
|
|
49769
49769
|
const element = object.element;
|
|
49770
49770
|
element.style.transform = "translate(-50%,-50%) translate(" + (_vector.x * _widthHalf + _widthHalf) + "px," + (-_vector.y * _heightHalf + _heightHalf) + "px)";
|
|
49771
49771
|
if (element.parentNode !== domElement) {
|
|
49772
49772
|
domElement.appendChild(element);
|
|
49773
49773
|
}
|
|
49774
|
-
object.onAfterRender(_this, scene,
|
|
49774
|
+
object.onAfterRender(_this, scene, camera);
|
|
49775
49775
|
}
|
|
49776
49776
|
const objectData = {
|
|
49777
|
-
distanceToCameraSquared: getDistanceToSquared(
|
|
49777
|
+
distanceToCameraSquared: getDistanceToSquared(camera, object)
|
|
49778
49778
|
};
|
|
49779
49779
|
cache.objects.set(object, objectData);
|
|
49780
49780
|
}
|
|
49781
49781
|
for (let i2 = 0, l = object.children.length; i2 < l; i2++) {
|
|
49782
|
-
renderObject(object.children[i2], scene,
|
|
49782
|
+
renderObject(object.children[i2], scene, camera);
|
|
49783
49783
|
}
|
|
49784
49784
|
}
|
|
49785
49785
|
function getDistanceToSquared(object1, object2) {
|
|
@@ -50169,7 +50169,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
50169
50169
|
];
|
|
50170
50170
|
}
|
|
50171
50171
|
class GizmoAxes {
|
|
50172
|
-
constructor(
|
|
50172
|
+
constructor(camera, viewport, options) {
|
|
50173
50173
|
// settings
|
|
50174
50174
|
__publicField(this, "_initialOptions");
|
|
50175
50175
|
__publicField(this, "_options");
|
|
@@ -50256,7 +50256,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
50256
50256
|
});
|
|
50257
50257
|
this._initialOptions = new AxesSettings(options);
|
|
50258
50258
|
this._options = new AxesSettings(options);
|
|
50259
|
-
this._camera =
|
|
50259
|
+
this._camera = camera;
|
|
50260
50260
|
this._reparentConnection = viewport.onReparent.subscribe(() => this.reparent(viewport.parent));
|
|
50261
50261
|
this._canvas = this.createCanvas();
|
|
50262
50262
|
this._context = this._canvas.getContext("2d");
|
|
@@ -50443,7 +50443,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
50443
50443
|
}
|
|
50444
50444
|
}
|
|
50445
50445
|
class GizmoOrbit {
|
|
50446
|
-
constructor(renderer,
|
|
50446
|
+
constructor(renderer, camera, input, settings2) {
|
|
50447
50447
|
// Dependencies
|
|
50448
50448
|
__publicField(this, "_renderer");
|
|
50449
50449
|
__publicField(this, "_camera");
|
|
@@ -50466,7 +50466,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
50466
50466
|
__publicField(this, "_active", true);
|
|
50467
50467
|
__publicField(this, "_animation", 0);
|
|
50468
50468
|
this._renderer = renderer;
|
|
50469
|
-
this._camera =
|
|
50469
|
+
this._camera = camera;
|
|
50470
50470
|
this._inputs = input;
|
|
50471
50471
|
this.applySettings(settings2);
|
|
50472
50472
|
this.connect();
|
|
@@ -51545,7 +51545,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
51545
51545
|
}
|
|
51546
51546
|
}
|
|
51547
51547
|
class MeasureMarker {
|
|
51548
|
-
constructor(color,
|
|
51548
|
+
constructor(color, camera) {
|
|
51549
51549
|
__publicField(this, "MARKER_SIZE", 0.01);
|
|
51550
51550
|
__publicField(this, "mesh");
|
|
51551
51551
|
__publicField(this, "_material");
|
|
@@ -51566,8 +51566,8 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
51566
51566
|
g.addGroup(0, Infinity, 1);
|
|
51567
51567
|
this.mesh = new Mesh(g, [this._material, this._materialAlways]);
|
|
51568
51568
|
this.mesh.visible = false;
|
|
51569
|
-
this.disconnect =
|
|
51570
|
-
this._camera =
|
|
51569
|
+
this.disconnect = camera.onMoved.subscribe(() => this.updateScale());
|
|
51570
|
+
this._camera = camera;
|
|
51571
51571
|
this.updateScale();
|
|
51572
51572
|
}
|
|
51573
51573
|
updateScale() {
|
|
@@ -52400,7 +52400,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
52400
52400
|
}
|
|
52401
52401
|
}
|
|
52402
52402
|
class Gizmos {
|
|
52403
|
-
constructor(viewer,
|
|
52403
|
+
constructor(viewer, camera) {
|
|
52404
52404
|
__publicField(this, "viewer");
|
|
52405
52405
|
__publicField(this, "_measure");
|
|
52406
52406
|
/**
|
|
@@ -52434,12 +52434,12 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
52434
52434
|
this.loading = new GizmoLoading(viewer);
|
|
52435
52435
|
this.orbit = new GizmoOrbit(
|
|
52436
52436
|
viewer.renderer,
|
|
52437
|
-
|
|
52437
|
+
camera,
|
|
52438
52438
|
viewer.inputs,
|
|
52439
52439
|
viewer.settings
|
|
52440
52440
|
);
|
|
52441
52441
|
this.rectangle = new GizmoRectangle(viewer);
|
|
52442
|
-
this.axes = new GizmoAxes(
|
|
52442
|
+
this.axes = new GizmoAxes(camera, viewer.viewport, viewer.settings.axes);
|
|
52443
52443
|
this.markers = new GizmoMarkers(viewer);
|
|
52444
52444
|
(_a2 = viewer.viewport.canvas.parentElement) == null ? void 0 : _a2.prepend(this.axes.canvas);
|
|
52445
52445
|
}
|
|
@@ -52628,10 +52628,10 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
52628
52628
|
}
|
|
52629
52629
|
}
|
|
52630
52630
|
class MaskPass extends Pass {
|
|
52631
|
-
constructor(scene,
|
|
52631
|
+
constructor(scene, camera) {
|
|
52632
52632
|
super();
|
|
52633
52633
|
this.scene = scene;
|
|
52634
|
-
this.camera =
|
|
52634
|
+
this.camera = camera;
|
|
52635
52635
|
this.clear = true;
|
|
52636
52636
|
this.needsSwap = false;
|
|
52637
52637
|
this.inverse = false;
|
|
@@ -52806,10 +52806,10 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
52806
52806
|
_geometry.setAttribute("position", new Float32BufferAttribute([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3));
|
|
52807
52807
|
_geometry.setAttribute("uv", new Float32BufferAttribute([0, 2, 0, 0, 2, 0], 2));
|
|
52808
52808
|
class RenderPass extends Pass {
|
|
52809
|
-
constructor(scene,
|
|
52809
|
+
constructor(scene, camera, overrideMaterial, clearColor, clearAlpha) {
|
|
52810
52810
|
super();
|
|
52811
52811
|
this.scene = scene;
|
|
52812
|
-
this.camera =
|
|
52812
|
+
this.camera = camera;
|
|
52813
52813
|
this.overrideMaterial = overrideMaterial;
|
|
52814
52814
|
this.clearColor = clearColor;
|
|
52815
52815
|
this.clearAlpha = clearAlpha !== void 0 ? clearAlpha : 0;
|
|
@@ -52847,10 +52847,10 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
52847
52847
|
}
|
|
52848
52848
|
}
|
|
52849
52849
|
class SSAARenderPass extends Pass {
|
|
52850
|
-
constructor(scene,
|
|
52850
|
+
constructor(scene, camera, clearColor, clearAlpha) {
|
|
52851
52851
|
super();
|
|
52852
52852
|
this.scene = scene;
|
|
52853
|
-
this.camera =
|
|
52853
|
+
this.camera = camera;
|
|
52854
52854
|
this.sampleLevel = 4;
|
|
52855
52855
|
this.unbiased = true;
|
|
52856
52856
|
this.clearColor = clearColor !== void 0 ? clearColor : 0;
|
|
@@ -53295,13 +53295,13 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
53295
53295
|
`
|
|
53296
53296
|
};
|
|
53297
53297
|
class OutlinePass extends Pass {
|
|
53298
|
-
constructor(sceneBuffer,
|
|
53298
|
+
constructor(sceneBuffer, camera, material) {
|
|
53299
53299
|
super();
|
|
53300
53300
|
__publicField(this, "_fsQuad");
|
|
53301
53301
|
__publicField(this, "material");
|
|
53302
53302
|
this.material = material ?? new OutlineMaterial();
|
|
53303
53303
|
this.material.sceneBuffer = sceneBuffer;
|
|
53304
|
-
this.material.camera =
|
|
53304
|
+
this.material.camera = camera;
|
|
53305
53305
|
this._fsQuad = new FullScreenQuad(this.material.material);
|
|
53306
53306
|
}
|
|
53307
53307
|
setSize(width, height) {
|
|
@@ -53402,7 +53402,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
53402
53402
|
}
|
|
53403
53403
|
}
|
|
53404
53404
|
class RenderingComposer {
|
|
53405
|
-
constructor(renderer, scene, viewport, materials,
|
|
53405
|
+
constructor(renderer, scene, viewport, materials, camera) {
|
|
53406
53406
|
__publicField(this, "_renderer");
|
|
53407
53407
|
__publicField(this, "_scene");
|
|
53408
53408
|
__publicField(this, "_materials");
|
|
@@ -53429,7 +53429,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
53429
53429
|
this._scene = scene;
|
|
53430
53430
|
this._materials = materials;
|
|
53431
53431
|
this._size = viewport.getSize();
|
|
53432
|
-
this._camera =
|
|
53432
|
+
this._camera = camera.three;
|
|
53433
53433
|
this.setup();
|
|
53434
53434
|
this._clock = new Clock();
|
|
53435
53435
|
}
|
|
@@ -53565,7 +53565,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
53565
53565
|
}
|
|
53566
53566
|
}
|
|
53567
53567
|
let Renderer$1 = class Renderer {
|
|
53568
|
-
constructor(scene, viewport, materials,
|
|
53568
|
+
constructor(scene, viewport, materials, camera, settings2) {
|
|
53569
53569
|
/**
|
|
53570
53570
|
* The THREE WebGL renderer.
|
|
53571
53571
|
*/
|
|
@@ -53606,7 +53606,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
53606
53606
|
this._viewport = viewport;
|
|
53607
53607
|
this._scene = scene;
|
|
53608
53608
|
this._materials = materials;
|
|
53609
|
-
this._camera =
|
|
53609
|
+
this._camera = camera;
|
|
53610
53610
|
this.renderer = new WebGLRenderer$1({
|
|
53611
53611
|
canvas: viewport.canvas,
|
|
53612
53612
|
antialias: true,
|
|
@@ -53624,7 +53624,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
53624
53624
|
scene,
|
|
53625
53625
|
viewport,
|
|
53626
53626
|
materials,
|
|
53627
|
-
|
|
53627
|
+
camera
|
|
53628
53628
|
);
|
|
53629
53629
|
this._composer.onDemand = settings2.rendering.onDemand;
|
|
53630
53630
|
this.section = new RenderingSection(this, this._materials);
|
|
@@ -58698,15 +58698,6 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
58698
58698
|
}
|
|
58699
58699
|
) });
|
|
58700
58700
|
}
|
|
58701
|
-
function undo({ height, width, fill, className }) {
|
|
58702
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className, height, width, viewBox: "0 0 256 256", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58703
|
-
"path",
|
|
58704
|
-
{
|
|
58705
|
-
fill,
|
|
58706
|
-
d: "M167.055,76.799H56.971l27.112-27.112c4.687-4.687,4.687-12.285,0-16.971h0c-4.686-4.687-12.284-4.687-16.97,0L19.515,80.313c-4.686,4.687-4.686,12.285,0,16.971h0s0,0,0,0l47.598,47.598c4.686,4.686,12.284,4.686,16.97,0s4.687-12.284,0-16.971l-27.112-27.113h111.029c12.742,0,24.774,5.015,33.879,14.121,9.106,9.105,14.121,21.138,14.121,33.879s-5.015,24.774-14.121,33.879c-9.105,9.106-21.138,14.121-33.879,14.121h-60c-6.627,0-12,5.373-12,12h0c0,6.627,5.373,12,12,12h60c39.925,0,72.531-32.933,71.994-72.975-.531-39.538-33.397-71.025-72.938-71.025Z"
|
|
58707
|
-
}
|
|
58708
|
-
) });
|
|
58709
|
-
}
|
|
58710
58701
|
function close({ height, width, fill, className }) {
|
|
58711
58702
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className, height, width, viewBox: "0 0 256 256", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58712
58703
|
"path",
|
|
@@ -58767,31 +58758,6 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
58767
58758
|
}
|
|
58768
58759
|
) });
|
|
58769
58760
|
}
|
|
58770
|
-
function more({ height, width, fill, className }) {
|
|
58771
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, fill, height, width, viewBox: "0 0 256 256", children: [
|
|
58772
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58773
|
-
"path",
|
|
58774
|
-
{
|
|
58775
|
-
fill,
|
|
58776
|
-
d: "M48,156c-15.438,0-28-12.562-28-28s12.562-28,28-28,28,12.562,28,28-12.562,28-28,28Z"
|
|
58777
|
-
}
|
|
58778
|
-
),
|
|
58779
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58780
|
-
"path",
|
|
58781
|
-
{
|
|
58782
|
-
fill,
|
|
58783
|
-
d: "M128,156c-15.438,0-28-12.562-28-28s12.562-28,28-28,28,12.562,28,28-12.562,28-28,28Z"
|
|
58784
|
-
}
|
|
58785
|
-
),
|
|
58786
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58787
|
-
"path",
|
|
58788
|
-
{
|
|
58789
|
-
fill,
|
|
58790
|
-
d: "M208,156c-15.438,0-28-12.562-28-28s12.562-28,28-28,28,12.562,28,28-12.562,28-28,28Z"
|
|
58791
|
-
}
|
|
58792
|
-
)
|
|
58793
|
-
] });
|
|
58794
|
-
}
|
|
58795
58761
|
function collapse({ height, width, fill, className }) {
|
|
58796
58762
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58797
58763
|
"svg",
|
|
@@ -58810,75 +58776,6 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
58810
58776
|
}
|
|
58811
58777
|
);
|
|
58812
58778
|
}
|
|
58813
|
-
function arrowLeft({ height, width, fill, className }) {
|
|
58814
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
58815
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
58816
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill, d: "m161.905 202.207.019-.017c6.547-5.937 7.04-16.057 1.102-22.602L118.457 128l44.569-51.588c5.938-6.546 5.444-16.666-1.102-22.602l-.019-.017c-6.545-5.935-16.662-5.442-22.599 1.102l-54.33 62.348c-5.536 6.103-5.536 15.411 0 21.514l54.33 62.348c5.936 6.544 16.054 7.038 22.599 1.102Z" })
|
|
58817
|
-
] });
|
|
58818
|
-
}
|
|
58819
|
-
function fullArrowLeft({ height, width, fill, className }) {
|
|
58820
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
58821
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
58822
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "128", cy: "32", r: "16" }),
|
|
58823
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "128", cy: "224", r: "16" }),
|
|
58824
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58825
|
-
"path",
|
|
58826
|
-
{
|
|
58827
|
-
fill,
|
|
58828
|
-
d: "M224 112H70.627l68.686-68.686c6.249-6.248 6.249-16.379 0-22.627-6.248-6.248-16.379-6.248-22.627 0l-95.999 95.999C17.791 119.582 16 123.582 16 128s1.791 8.418 4.687 11.314l96 96c6.248 6.248 16.379 6.248 22.627 0 6.249-6.248 6.249-16.379 0-22.627l-68.686-68.686H224c8.836 0 16-7.164 16-16s-7.164-16-16-16Z"
|
|
58829
|
-
}
|
|
58830
|
-
)
|
|
58831
|
-
] });
|
|
58832
|
-
}
|
|
58833
|
-
function visible({ height, width, fill, className }) {
|
|
58834
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
58835
|
-
"svg",
|
|
58836
|
-
{
|
|
58837
|
-
className,
|
|
58838
|
-
height,
|
|
58839
|
-
width,
|
|
58840
|
-
viewBox: "0 0 256 256",
|
|
58841
|
-
children: [
|
|
58842
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
58843
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58844
|
-
"path",
|
|
58845
|
-
{
|
|
58846
|
-
fill,
|
|
58847
|
-
d: "M128 36C57.308 36 0 97.054 0 128c0 32.943 57.308 92 128 92s128-59.057 128-92c0-30.946-57.308-92-128-92Zm75.346 131.751C190.404 178.301 163.406 196 128 196s-62.403-17.699-75.346-28.249C31.004 150.103 24 133.349 24 128c0-.047.071-4.846 6.247-14.452 5.34-8.308 13.341-17.061 22.527-24.648 6.833-5.643 17.521-13.282 31.163-19.291C71.664 81.27 64 97.734 64 116c0 35.346 28.654 64 64 64s64-28.654 64-64a63.79 63.79 0 0 0-5.004-24.847C186.913 106.546 174.413 119 159 119s-28-12.536-28-28c0-13.851 10.06-25.346 23.271-27.594 22.243 5.762 39.382 17.586 48.956 25.494 9.186 7.587 17.187 16.341 22.527 24.648 6.176 9.606 6.247 14.405 6.247 14.452 0 5.349-7.004 22.103-28.654 39.751Z"
|
|
58848
|
-
}
|
|
58849
|
-
)
|
|
58850
|
-
]
|
|
58851
|
-
}
|
|
58852
|
-
);
|
|
58853
|
-
}
|
|
58854
|
-
function hidden({ height, width, fill, className = "" }) {
|
|
58855
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
58856
|
-
"svg",
|
|
58857
|
-
{
|
|
58858
|
-
className,
|
|
58859
|
-
height,
|
|
58860
|
-
width,
|
|
58861
|
-
viewBox: "0 0 256 256",
|
|
58862
|
-
children: [
|
|
58863
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
58864
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58865
|
-
"path",
|
|
58866
|
-
{
|
|
58867
|
-
fill,
|
|
58868
|
-
d: "M154.271 63.406c22.243 5.762 39.382 17.586 48.956 25.494 9.186 7.587 17.187 16.341 22.527 24.648 6.176 9.606 6.247 14.405 6.247 14.452 0 4.764-5.566 18.577-22.079 34.01l16.973 16.972c18.185-17.247 29.106-36.602 29.106-50.982 0-30.946-57.308-92-128-92-13.307 0-26.139 2.165-38.205 5.884l42.099 42.099c2.731-10.572 11.479-18.722 22.376-20.577Z"
|
|
58869
|
-
}
|
|
58870
|
-
),
|
|
58871
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58872
|
-
"path",
|
|
58873
|
-
{
|
|
58874
|
-
fill,
|
|
58875
|
-
d: "m166.022 118.111 21.472 21.472A63.801 63.801 0 0 0 191.999 116a63.79 63.79 0 0 0-5.004-24.847c-.07 12.971-8.957 23.853-20.974 26.958ZM31.833 17.863c-4.687-4.686-12.284-4.686-16.971 0-4.686 4.687-4.686 12.285 0 16.971l29.92 29.92C17.38 84.825 0 110.966 0 128c0 32.943 57.308 92 128 92 21.088 0 40.972-5.269 58.51-13.52l37.657 37.657c4.687 4.686 12.284 4.686 16.971 0 4.686-4.687 4.686-12.285 0-16.971L31.833 17.863ZM128 196c-35.405 0-62.403-17.699-75.346-28.249C31.004 150.103 24 133.349 24 128c0-.047.071-4.846 6.247-14.452 5.34-8.308 13.341-17.061 22.527-24.648a134.832 134.832 0 0 1 9.205-6.95l7.708 7.708a63.612 63.612 0 0 0-5.686 26.343c0 35.346 28.654 64 64 64 9.397 0 18.31-2.043 26.345-5.684l13.936 13.936c-11.606 4.516-25.17 7.749-40.281 7.749Z"
|
|
58876
|
-
}
|
|
58877
|
-
)
|
|
58878
|
-
]
|
|
58879
|
-
}
|
|
58880
|
-
);
|
|
58881
|
-
}
|
|
58882
58779
|
function orbit({ height, width, fill = "", className }) {
|
|
58883
58780
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
58884
58781
|
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
@@ -58935,19 +58832,6 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
58935
58832
|
)
|
|
58936
58833
|
] });
|
|
58937
58834
|
}
|
|
58938
|
-
function camera({ height, width, fill, className }) {
|
|
58939
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
58940
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
58941
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58942
|
-
"path",
|
|
58943
|
-
{
|
|
58944
|
-
fill,
|
|
58945
|
-
id: "noun-walking-4952413",
|
|
58946
|
-
d: "M136.693,8c-13.243,.037-23.948,10.802-23.911,24.044,.037,13.243,10.802,23.948,24.044,23.911,13.217-.037,23.912-10.761,23.912-23.978s-10.735-23.978-23.978-23.978c-.022,0-.045,0-.067,0Zm-13.867,54.936c-21.612,1.291-41.372,12.631-53.391,30.639-6.568,13.483-9.23,28.535-7.686,43.454,0,5.19,4.208,9.398,9.398,9.398s9.398-4.208,9.398-9.398c-1.308-11.482,.414-23.106,4.995-33.716,5.052-6.952,11.735-12.556,19.462-16.318-3.344,15.466-6.407,30.958-9.538,46.371l44.626,106.009c2.654,6.925,10.42,10.386,17.344,7.732,6.925-2.654,10.386-10.42,7.732-17.344-.104-.272-.217-.54-.339-.805l-35.901-85.255,4.569-19.076,3.344-13.974c9.591,17.424,31.878,22.14,47.117,25.763,5.051,1.188,10.108-1.943,11.296-6.994,1.188-5.051-1.943-10.108-6.994-11.296-11.472-1.392-22.38-5.765-31.638-12.682-3.628-3.641-6.363-8.073-7.993-12.948-2.198-6.128-3.224-12.882-5.182-18.929h0c-4.103-10.577-11.496-10.524-20.661-10.55l.04-.08Zm-30.292,84.443l-9.098,45.119-20.821,34.795c-3.996,6.247-2.171,14.551,4.076,18.547,6.247,3.996,14.551,2.171,18.547-4.076,.143-.224,.279-.452,.409-.684l22.646-37.859c1.207-2.015,1.864-4.312,1.905-6.661v-7.087l-17.717-42.108,.053,.013Z"
|
|
58947
|
-
}
|
|
58948
|
-
)
|
|
58949
|
-
] });
|
|
58950
|
-
}
|
|
58951
58835
|
function pan({ height, width, fill, className }) {
|
|
58952
58836
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
58953
58837
|
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
@@ -59302,43 +59186,6 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
59302
59186
|
}
|
|
59303
59187
|
) }) });
|
|
59304
59188
|
}
|
|
59305
|
-
const icons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
59306
|
-
__proto__: null,
|
|
59307
|
-
arrowLeft,
|
|
59308
|
-
camera,
|
|
59309
|
-
checkmark,
|
|
59310
|
-
close,
|
|
59311
|
-
collapse,
|
|
59312
|
-
frameRect,
|
|
59313
|
-
frameSelection,
|
|
59314
|
-
fullArrowLeft,
|
|
59315
|
-
fullsScreen,
|
|
59316
|
-
ghost,
|
|
59317
|
-
ghostDead,
|
|
59318
|
-
help,
|
|
59319
|
-
hidden,
|
|
59320
|
-
home,
|
|
59321
|
-
look,
|
|
59322
|
-
measure,
|
|
59323
|
-
minimize,
|
|
59324
|
-
more,
|
|
59325
|
-
orbit,
|
|
59326
|
-
orthographic,
|
|
59327
|
-
pan,
|
|
59328
|
-
perspective,
|
|
59329
|
-
sectionBox,
|
|
59330
|
-
sectionBoxClip,
|
|
59331
|
-
sectionBoxIgnore,
|
|
59332
|
-
sectionBoxReset,
|
|
59333
|
-
sectionBoxShrink,
|
|
59334
|
-
settings,
|
|
59335
|
-
toggleIsolation,
|
|
59336
|
-
trash,
|
|
59337
|
-
treeView,
|
|
59338
|
-
undo,
|
|
59339
|
-
visible,
|
|
59340
|
-
zoom
|
|
59341
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
59342
59189
|
function isTrue(value) {
|
|
59343
59190
|
return value === true || value === "AlwaysTrue";
|
|
59344
59191
|
}
|
|
@@ -59483,7 +59330,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
59483
59330
|
children: ortho ? /* @__PURE__ */ jsxRuntimeExports.jsx(orthographic, { height: 20, width: 20, fill: "currentColor" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(perspective, { height: 20, width: 20, fill: "currentColor" })
|
|
59484
59331
|
}
|
|
59485
59332
|
);
|
|
59486
|
-
const
|
|
59333
|
+
const hidden = isTrue(props.settings.value.ui.axesPanel) ? "" : " vc-hidden";
|
|
59487
59334
|
const createBar2 = () => {
|
|
59488
59335
|
if (!anyUiAxesButton(props.settings.value)) {
|
|
59489
59336
|
return (
|
|
@@ -59503,7 +59350,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
59503
59350
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
59504
59351
|
"div",
|
|
59505
59352
|
{
|
|
59506
|
-
className: "vim-axes-panel vc-pointer-events-none vc-absolute vc-overflow-hidden vc-z-20 vc-flex vc-flex-col vc-border vc-border-white vc-opacity-50 vc-shadow-lg vc-saturate-0 vc-transition-all hover:vc-opacity-100 hover:vc-saturate-100" +
|
|
59353
|
+
className: "vim-axes-panel vc-pointer-events-none vc-absolute vc-overflow-hidden vc-z-20 vc-flex vc-flex-col vc-border vc-border-white vc-opacity-50 vc-shadow-lg vc-saturate-0 vc-transition-all hover:vc-opacity-100 hover:vc-saturate-100" + hidden,
|
|
59507
59354
|
children: [
|
|
59508
59355
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: gizmoDiv, className: "vim-axes-panel-gizmo vc-absolute vc-pointer-events-auto" }),
|
|
59509
59356
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vim-axes-panel-bar vc-absolute vc-top-[75%] vc-bottom-0 vc-right-0 vc-left-0", children: createBar2() })
|
|
@@ -63456,7 +63303,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
63456
63303
|
selected
|
|
63457
63304
|
} = this.props;
|
|
63458
63305
|
const {
|
|
63459
|
-
visible
|
|
63306
|
+
visible
|
|
63460
63307
|
} = this.state;
|
|
63461
63308
|
const menuProps = {
|
|
63462
63309
|
ref: this.menuRef,
|
|
@@ -63470,7 +63317,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
63470
63317
|
const menuItemProps = {
|
|
63471
63318
|
className: cx(cssClasses.menuItem, attributes.className, {
|
|
63472
63319
|
[cx(cssClasses.menuItemDisabled, attributes.disabledClassName)]: disabled,
|
|
63473
|
-
[cx(cssClasses.menuItemActive, attributes.visibleClassName)]:
|
|
63320
|
+
[cx(cssClasses.menuItemActive, attributes.visibleClassName)]: visible,
|
|
63474
63321
|
[cx(cssClasses.menuItemSelected, attributes.selectedClassName)]: selected
|
|
63475
63322
|
}),
|
|
63476
63323
|
onMouseMove: this.props.onMouseMove,
|
|
@@ -63998,7 +63845,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
63998
63845
|
return [...props.viewer.selection.objects].filter((o) => o.type === "Object3D");
|
|
63999
63846
|
};
|
|
64000
63847
|
const viewer = props.viewer;
|
|
64001
|
-
const
|
|
63848
|
+
const camera = props.camera;
|
|
64002
63849
|
const [section, setSection] = React2.useState({
|
|
64003
63850
|
visible: viewer.gizmos.section.visible,
|
|
64004
63851
|
clip: viewer.gizmos.section.clip
|
|
@@ -64008,7 +63855,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
64008
63855
|
};
|
|
64009
63856
|
const [clipping, setClipping] = React2.useState(isClipping());
|
|
64010
63857
|
const [, setVersion] = React2.useState(0);
|
|
64011
|
-
const
|
|
63858
|
+
const hidden = props.isolation.any();
|
|
64012
63859
|
React2.useEffect(() => {
|
|
64013
63860
|
const subState = viewer.gizmos.section.onStateChanged.subscribe(() => {
|
|
64014
63861
|
setSection({
|
|
@@ -64030,11 +63877,11 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
64030
63877
|
e.stopPropagation();
|
|
64031
63878
|
};
|
|
64032
63879
|
const onCameraResetBtn = (e) => {
|
|
64033
|
-
|
|
63880
|
+
camera.reset();
|
|
64034
63881
|
e.stopPropagation();
|
|
64035
63882
|
};
|
|
64036
63883
|
const onCameraFrameBtn = (e) => {
|
|
64037
|
-
|
|
63884
|
+
camera.frameContext();
|
|
64038
63885
|
e.stopPropagation();
|
|
64039
63886
|
};
|
|
64040
63887
|
const onSelectionIsolateBtn = (e) => {
|
|
@@ -64136,7 +63983,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
64136
63983
|
},
|
|
64137
63984
|
{
|
|
64138
63985
|
id: contextMenuElementIds.dividerSelection,
|
|
64139
|
-
enabled: hasSelection ||
|
|
63986
|
+
enabled: hasSelection || hidden
|
|
64140
63987
|
},
|
|
64141
63988
|
{
|
|
64142
63989
|
id: contextMenuElementIds.isolateSelection,
|
|
@@ -64178,7 +64025,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
64178
64025
|
label: "Show All",
|
|
64179
64026
|
keyboard: "Esc",
|
|
64180
64027
|
action: onShowAllBtn,
|
|
64181
|
-
enabled:
|
|
64028
|
+
enabled: hidden
|
|
64182
64029
|
},
|
|
64183
64030
|
{ id: contextMenuElementIds.dividerMeasure, enabled: measuring },
|
|
64184
64031
|
{
|
|
@@ -64614,14 +64461,14 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
64614
64461
|
}
|
|
64615
64462
|
set2.add(node);
|
|
64616
64463
|
if (node.children.length > 0) {
|
|
64617
|
-
let
|
|
64618
|
-
let
|
|
64464
|
+
let hidden = true;
|
|
64465
|
+
let visible = true;
|
|
64619
64466
|
node.children.forEach((c) => {
|
|
64620
64467
|
const r = updateOne(this.nodes[c]);
|
|
64621
|
-
if (r !== "vim-hidden")
|
|
64622
|
-
if (r !== "vim-visible")
|
|
64468
|
+
if (r !== "vim-hidden") hidden = false;
|
|
64469
|
+
if (r !== "vim-visible") visible = false;
|
|
64623
64470
|
});
|
|
64624
|
-
node.visible =
|
|
64471
|
+
node.visible = visible ? "vim-visible" : hidden ? "vim-hidden" : "vim-undefined";
|
|
64625
64472
|
return node.visible;
|
|
64626
64473
|
} else {
|
|
64627
64474
|
const obj = vim.getObjectFromElement((_a2 = node.data) == null ? void 0 : _a2.index);
|
|
@@ -66541,7 +66388,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
66541
66388
|
}
|
|
66542
66389
|
const MenuToastMemo = React2.memo(MenuToast);
|
|
66543
66390
|
function MenuToast(props) {
|
|
66544
|
-
const [
|
|
66391
|
+
const [visible, setVisible] = React2.useState();
|
|
66545
66392
|
const [speed, setSpeed] = React2.useState(-1);
|
|
66546
66393
|
const speedRef = React2.useRef(speed);
|
|
66547
66394
|
const toastTimeout = React2.useRef();
|
|
@@ -66572,7 +66419,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
66572
66419
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
66573
66420
|
"div",
|
|
66574
66421
|
{
|
|
66575
|
-
className: `vim-menu-toast vc-m-auto vc-flex vc-items-center vc-justify-between vc-rounded vc-bg-gray-warm vc-py-2 vc-px-5 vc-shadow-lg vc-transition-all ${
|
|
66422
|
+
className: `vim-menu-toast vc-m-auto vc-flex vc-items-center vc-justify-between vc-rounded vc-bg-gray-warm vc-py-2 vc-px-5 vc-shadow-lg vc-transition-all ${visible ? "vc-opacity-100" : "vc-opacity-0"}`,
|
|
66576
66423
|
children: [
|
|
66577
66424
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "vc-text-sm vc-font-semibold vc-uppercase vc-text-gray-light", children: "Speed:" }),
|
|
66578
66425
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "vc-ml-1 vc-text-lg vc-font-bold vc-text-white", children: speed + 25 })
|
|
@@ -66681,7 +66528,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
66681
66528
|
animate();
|
|
66682
66529
|
}
|
|
66683
66530
|
class ComponentInputs {
|
|
66684
|
-
constructor(viewer,
|
|
66531
|
+
constructor(viewer, camera, isolation, sideState) {
|
|
66685
66532
|
__publicField(this, "_viewer");
|
|
66686
66533
|
__publicField(this, "_camera");
|
|
66687
66534
|
__publicField(this, "_default");
|
|
@@ -66694,7 +66541,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
66694
66541
|
);
|
|
66695
66542
|
});
|
|
66696
66543
|
this._viewer = viewer;
|
|
66697
|
-
this._camera =
|
|
66544
|
+
this._camera = camera;
|
|
66698
66545
|
this._default = new DefaultInputScheme(viewer);
|
|
66699
66546
|
this._isolation = isolation;
|
|
66700
66547
|
this._sideState = sideState;
|
|
@@ -66734,8 +66581,8 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
66734
66581
|
case KEYS.KEY_V: {
|
|
66735
66582
|
if (this._viewer.selection.count === 0) return false;
|
|
66736
66583
|
const objs = [...this._viewer.selection.objects];
|
|
66737
|
-
const
|
|
66738
|
-
if (
|
|
66584
|
+
const visible = objs.findIndex((o) => o.visible) >= 0;
|
|
66585
|
+
if (visible) {
|
|
66739
66586
|
this._isolation.hide(
|
|
66740
66587
|
this._getSelection(),
|
|
66741
66588
|
"keyboard"
|
|
@@ -66851,7 +66698,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
66851
66698
|
});
|
|
66852
66699
|
}
|
|
66853
66700
|
class Isolation {
|
|
66854
|
-
constructor(viewer,
|
|
66701
|
+
constructor(viewer, camera, settings2) {
|
|
66855
66702
|
__publicField(this, "_viewer");
|
|
66856
66703
|
__publicField(this, "_settings");
|
|
66857
66704
|
__publicField(this, "_isolation");
|
|
@@ -66860,7 +66707,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
66860
66707
|
__publicField(this, "_references", /* @__PURE__ */ new Map());
|
|
66861
66708
|
__publicField(this, "_onChanged", new distExports.SimpleEventDispatcher());
|
|
66862
66709
|
this._viewer = viewer;
|
|
66863
|
-
this._camera =
|
|
66710
|
+
this._camera = camera;
|
|
66864
66711
|
this.applySettings(settings2);
|
|
66865
66712
|
}
|
|
66866
66713
|
/** Signal dispatched when the isolation set changes. */
|
|
@@ -67791,7 +67638,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
67791
67638
|
return Math.min(Math.max(value, min2), max2);
|
|
67792
67639
|
}
|
|
67793
67640
|
class InputMouse extends InputHandler {
|
|
67794
|
-
constructor(canvas, rpc, selection,
|
|
67641
|
+
constructor(canvas, rpc, selection, camera) {
|
|
67795
67642
|
super();
|
|
67796
67643
|
__publicField(this, "_rpc");
|
|
67797
67644
|
__publicField(this, "_canvas");
|
|
@@ -67801,7 +67648,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
67801
67648
|
this._canvas = canvas;
|
|
67802
67649
|
this._rpc = rpc;
|
|
67803
67650
|
this._selection = selection;
|
|
67804
|
-
this._camera =
|
|
67651
|
+
this._camera = camera;
|
|
67805
67652
|
}
|
|
67806
67653
|
register() {
|
|
67807
67654
|
this.reg(this._canvas, "pointerdown", (e) => {
|
|
@@ -69668,7 +69515,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
69668
69515
|
"Shift"
|
|
69669
69516
|
]);
|
|
69670
69517
|
class InputKeyboard extends InputHandler {
|
|
69671
|
-
constructor(rpc, selection,
|
|
69518
|
+
constructor(rpc, selection, camera, inputs) {
|
|
69672
69519
|
super();
|
|
69673
69520
|
__publicField(this, "_rpc");
|
|
69674
69521
|
__publicField(this, "_selection");
|
|
@@ -69676,7 +69523,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
69676
69523
|
__publicField(this, "_inputs");
|
|
69677
69524
|
this._rpc = rpc;
|
|
69678
69525
|
this._selection = selection;
|
|
69679
|
-
this._camera =
|
|
69526
|
+
this._camera = camera;
|
|
69680
69527
|
this._inputs = inputs;
|
|
69681
69528
|
}
|
|
69682
69529
|
register() {
|
|
@@ -69732,7 +69579,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
69732
69579
|
}
|
|
69733
69580
|
}
|
|
69734
69581
|
class Inputs extends InputHandler {
|
|
69735
|
-
constructor(canvas, rpc, selection,
|
|
69582
|
+
constructor(canvas, rpc, selection, camera, renderer) {
|
|
69736
69583
|
super();
|
|
69737
69584
|
__publicField(this, "_rpc");
|
|
69738
69585
|
__publicField(this, "_canvas");
|
|
@@ -69745,9 +69592,9 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAAAXNSR0IArs
|
|
|
69745
69592
|
this._canvas = canvas;
|
|
69746
69593
|
this._rpc = rpc;
|
|
69747
69594
|
this._renderer = renderer;
|
|
69748
|
-
this._inputsMouse = new InputMouse(this._canvas, this._rpc, selection,
|
|
69595
|
+
this._inputsMouse = new InputMouse(this._canvas, this._rpc, selection, camera);
|
|
69749
69596
|
this._inputsTouch = new InputTouch(this._canvas, this._rpc);
|
|
69750
|
-
this._keyboard = new InputKeyboard(this._rpc, selection,
|
|
69597
|
+
this._keyboard = new InputKeyboard(this._rpc, selection, camera, this);
|
|
69751
69598
|
this.register();
|
|
69752
69599
|
}
|
|
69753
69600
|
onConnect() {
|
|
@@ -72464,6 +72311,11 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72464
72311
|
modal.loading({ message: "Loading File...", progress });
|
|
72465
72312
|
}
|
|
72466
72313
|
}
|
|
72314
|
+
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
72315
|
+
__proto__: null,
|
|
72316
|
+
UltraComponent,
|
|
72317
|
+
createUltraComponent
|
|
72318
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
72467
72319
|
class ComponentLoader {
|
|
72468
72320
|
constructor(viewer, modal) {
|
|
72469
72321
|
__publicField(this, "_viewer");
|
|
@@ -72592,10 +72444,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72592
72444
|
var _a2;
|
|
72593
72445
|
const settings2 = useSettings(props.viewer, props.settings ?? {});
|
|
72594
72446
|
const modal = useModal(settings2.value.capacity.canFollowUrl);
|
|
72595
|
-
const
|
|
72447
|
+
const camera = React2.useMemo(() => new ComponentCamera(props.viewer), []);
|
|
72596
72448
|
const cursor = React2.useMemo(() => new CursorManager(props.viewer), []);
|
|
72597
72449
|
const loader = React2.useRef(new ComponentLoader(props.viewer, modal));
|
|
72598
|
-
const [isolation] = React2.useState(() => new Isolation(props.viewer,
|
|
72450
|
+
const [isolation] = React2.useState(() => new Isolation(props.viewer, camera, settings2.value));
|
|
72599
72451
|
React2.useEffect(() => isolation.applySettings(settings2.value), [settings2]);
|
|
72600
72452
|
const side = useSideState(
|
|
72601
72453
|
isTrue(settings2.value.ui.bimTreePanel) || isTrue(settings2.value.ui.bimInfoPanel),
|
|
@@ -72619,7 +72471,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72619
72471
|
props.viewer.viewport.canvas.tabIndex = 0;
|
|
72620
72472
|
props.viewer.inputs.scheme = new ComponentInputs(
|
|
72621
72473
|
props.viewer,
|
|
72622
|
-
|
|
72474
|
+
camera,
|
|
72623
72475
|
isolation,
|
|
72624
72476
|
side
|
|
72625
72477
|
);
|
|
@@ -72629,7 +72481,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72629
72481
|
viewer: props.viewer,
|
|
72630
72482
|
loader: loader.current,
|
|
72631
72483
|
isolation,
|
|
72632
|
-
camera
|
|
72484
|
+
camera,
|
|
72633
72485
|
settings: settings2,
|
|
72634
72486
|
contextMenu: {
|
|
72635
72487
|
customize: (v) => setcontextMenu(() => v)
|
|
@@ -72652,7 +72504,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72652
72504
|
OptionalBimPanel,
|
|
72653
72505
|
{
|
|
72654
72506
|
viewer: props.viewer,
|
|
72655
|
-
camera
|
|
72507
|
+
camera,
|
|
72656
72508
|
viewerState,
|
|
72657
72509
|
visible: side.getContent() === "bim",
|
|
72658
72510
|
isolation,
|
|
@@ -72690,7 +72542,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72690
72542
|
ControlBar,
|
|
72691
72543
|
{
|
|
72692
72544
|
viewer: props.viewer,
|
|
72693
|
-
camera
|
|
72545
|
+
camera,
|
|
72694
72546
|
modal,
|
|
72695
72547
|
side,
|
|
72696
72548
|
isolation,
|
|
@@ -72703,7 +72555,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72703
72555
|
AxesPanelMemo,
|
|
72704
72556
|
{
|
|
72705
72557
|
viewer: props.viewer,
|
|
72706
|
-
camera
|
|
72558
|
+
camera,
|
|
72707
72559
|
settings: settings2
|
|
72708
72560
|
}
|
|
72709
72561
|
)
|
|
@@ -72713,7 +72565,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72713
72565
|
VimContextMenuMemo,
|
|
72714
72566
|
{
|
|
72715
72567
|
viewer: props.viewer,
|
|
72716
|
-
camera
|
|
72568
|
+
camera,
|
|
72717
72569
|
modal,
|
|
72718
72570
|
isolation,
|
|
72719
72571
|
selection: viewerState.selection,
|
|
@@ -72737,29 +72589,22 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72737
72589
|
const webglComponentRef = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
72738
72590
|
__proto__: null
|
|
72739
72591
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
72740
|
-
const index
|
|
72592
|
+
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
72741
72593
|
__proto__: null,
|
|
72742
72594
|
BimInfo: bimInfoData,
|
|
72743
72595
|
ContextMenu: contextMenu,
|
|
72744
72596
|
ControlBar: controlBar,
|
|
72745
|
-
Icons: icons,
|
|
72746
72597
|
LoadRequest: LoadRequest$1,
|
|
72747
72598
|
Refs: webglComponentRef,
|
|
72748
72599
|
VimComponent,
|
|
72749
|
-
createContainer,
|
|
72750
72600
|
createWebglComponent,
|
|
72751
72601
|
defaultSettings,
|
|
72752
72602
|
getLocalSettings
|
|
72753
72603
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
72754
|
-
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
72755
|
-
__proto__: null,
|
|
72756
|
-
UltraComponent,
|
|
72757
|
-
createUltraComponent
|
|
72758
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
72759
72604
|
exports.THREE = three_module;
|
|
72760
|
-
exports.UltraReact = index;
|
|
72605
|
+
exports.UltraReact = index$1;
|
|
72761
72606
|
exports.UltraViewer = index$2;
|
|
72762
|
-
exports.WebglReact = index
|
|
72607
|
+
exports.WebglReact = index;
|
|
72763
72608
|
exports.WebglViewer = index$3;
|
|
72764
72609
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
72765
72610
|
return exports;
|