@lv-x-software-house/x_view 1.2.6-dev.46 → 1.2.6-dev.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +45 -39
- package/dist/index.mjs +45 -39
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14575,20 +14575,20 @@ function XViewScene({
|
|
|
14575
14575
|
};
|
|
14576
14576
|
const tweenToTarget = (0, import_react31.useCallback)(
|
|
14577
14577
|
(target, zoomFactor = 1, forcedDirection = null) => {
|
|
14578
|
-
const { camera, controls, tweenGroup } = stateRef.current;
|
|
14579
|
-
if (!
|
|
14578
|
+
const { camera: sceneCamera, controls: sceneControls, tweenGroup } = stateRef.current;
|
|
14579
|
+
if (!sceneCamera || !sceneControls || !tweenGroup) return;
|
|
14580
14580
|
const targetPos = target instanceof THREE3.Mesh ? target.getWorldPosition(new THREE3.Vector3()) : target;
|
|
14581
|
-
const controlsTween = new import_tween2.Tween(
|
|
14581
|
+
const controlsTween = new import_tween2.Tween(sceneControls.target).to(targetPos, 1500).easing(import_tween2.Easing.Cubic.Out);
|
|
14582
14582
|
tweenGroup.add(controlsTween);
|
|
14583
14583
|
controlsTween.start();
|
|
14584
14584
|
let offset;
|
|
14585
14585
|
if (forcedDirection) {
|
|
14586
14586
|
offset = forcedDirection.clone().normalize().multiplyScalar(x_view_config.CAMERA_ZOOM_DISTANCE / zoomFactor);
|
|
14587
14587
|
} else {
|
|
14588
|
-
offset =
|
|
14588
|
+
offset = sceneCamera.position.clone().sub(sceneControls.target).normalize().multiplyScalar(x_view_config.CAMERA_ZOOM_DISTANCE / zoomFactor);
|
|
14589
14589
|
}
|
|
14590
14590
|
const targetCameraPos = targetPos.clone().add(offset);
|
|
14591
|
-
const cameraTween = new import_tween2.Tween(
|
|
14591
|
+
const cameraTween = new import_tween2.Tween(sceneCamera.position).to(targetCameraPos, 1500).easing(import_tween2.Easing.Cubic.Out);
|
|
14592
14592
|
tweenGroup.add(cameraTween);
|
|
14593
14593
|
cameraTween.start();
|
|
14594
14594
|
},
|
|
@@ -15334,14 +15334,14 @@ function XViewScene({
|
|
|
15334
15334
|
});
|
|
15335
15335
|
});
|
|
15336
15336
|
if (questCount > 0) {
|
|
15337
|
-
const { camera, controls } = stateRef.current;
|
|
15337
|
+
const { camera: sceneCamera, controls: sceneControls } = stateRef.current;
|
|
15338
15338
|
const centerX = sumX / questCount;
|
|
15339
15339
|
const centerY = sumY / questCount;
|
|
15340
15340
|
const targetFocus = new THREE3.Vector3(centerX, centerY, 0);
|
|
15341
|
-
const targetTween = new import_tween2.Tween(
|
|
15341
|
+
const targetTween = new import_tween2.Tween(sceneControls.target).to({ x: targetFocus.x, y: targetFocus.y, z: targetFocus.z }, 1500).easing(import_tween2.Easing.Cubic.InOut);
|
|
15342
15342
|
tweenGroup.add(targetTween);
|
|
15343
15343
|
targetTween.start();
|
|
15344
|
-
const camTween = new import_tween2.Tween(
|
|
15344
|
+
const camTween = new import_tween2.Tween(sceneCamera.position).to({ x: targetFocus.x, y: targetFocus.y, z: 140 }, 1500).easing(import_tween2.Easing.Cubic.InOut);
|
|
15345
15345
|
tweenGroup.add(camTween);
|
|
15346
15346
|
camTween.start();
|
|
15347
15347
|
}
|
|
@@ -15899,14 +15899,14 @@ function XViewScene({
|
|
|
15899
15899
|
node.position.y += Math.sin(clock.getElapsedTime() * 0.5 + i) * 5e-3;
|
|
15900
15900
|
const isImageNode = node.userData.useImageAsTexture === true || String(node.userData.useImageAsTexture) === "true";
|
|
15901
15901
|
if (isImageNode) {
|
|
15902
|
-
node.quaternion.copy(
|
|
15902
|
+
node.quaternion.copy(camera.quaternion);
|
|
15903
15903
|
}
|
|
15904
15904
|
});
|
|
15905
15905
|
} else {
|
|
15906
15906
|
stateRef.current.clickableNodes.forEach((node) => {
|
|
15907
15907
|
const isImageNode = node.userData.useImageAsTexture === true || String(node.userData.useImageAsTexture) === "true";
|
|
15908
15908
|
if (isImageNode) {
|
|
15909
|
-
node.quaternion.copy(
|
|
15909
|
+
node.quaternion.copy(camera.quaternion);
|
|
15910
15910
|
}
|
|
15911
15911
|
});
|
|
15912
15912
|
}
|
|
@@ -15976,8 +15976,8 @@ function XViewScene({
|
|
|
15976
15976
|
const srcMesh = stateRef.current.nodeObjects[String(connection.sourceNodeData.id)];
|
|
15977
15977
|
if (srcMesh) {
|
|
15978
15978
|
const raycaster2 = new THREE3.Raycaster();
|
|
15979
|
-
raycaster2.setFromCamera(mouse,
|
|
15980
|
-
|
|
15979
|
+
raycaster2.setFromCamera(mouse, camera);
|
|
15980
|
+
camera.getWorldDirection(plane.normal);
|
|
15981
15981
|
plane.setFromNormalAndCoplanarPoint(plane.normal, srcMesh.position);
|
|
15982
15982
|
if (raycaster2.ray.intersectPlane(plane, intersectionPoint))
|
|
15983
15983
|
connection.line.geometry.setPositions([
|
|
@@ -15990,8 +15990,8 @@ function XViewScene({
|
|
|
15990
15990
|
const fixedMesh = stateRef.current.nodeObjects[String(relink.fixedNodeId)];
|
|
15991
15991
|
if (fixedMesh) {
|
|
15992
15992
|
const raycaster2 = new THREE3.Raycaster();
|
|
15993
|
-
raycaster2.setFromCamera(mouse,
|
|
15994
|
-
|
|
15993
|
+
raycaster2.setFromCamera(mouse, camera);
|
|
15994
|
+
camera.getWorldDirection(plane.normal);
|
|
15995
15995
|
plane.setFromNormalAndCoplanarPoint(plane.normal, fixedMesh.position);
|
|
15996
15996
|
if (raycaster2.ray.intersectPlane(plane, intersectionPoint))
|
|
15997
15997
|
relink.line.geometry.setPositions([
|
|
@@ -16014,46 +16014,52 @@ function XViewScene({
|
|
|
16014
16014
|
tooltipEl: tooltipRef.current,
|
|
16015
16015
|
hoveredNode: stateRef.current.hoveredNode,
|
|
16016
16016
|
hoveredLink: stateRef.current.hoveredLink,
|
|
16017
|
-
camera
|
|
16017
|
+
camera,
|
|
16018
16018
|
mountEl: currentMount,
|
|
16019
16019
|
isSceneBusy: stateRef.current.isDragging || creation.isActive || connection.isActive || relink.isActive || ancestryMode.isActive,
|
|
16020
16020
|
parentData: parentDataRef.current,
|
|
16021
16021
|
ancestryData: ancestryDataRef.current
|
|
16022
16022
|
});
|
|
16023
16023
|
(_b2 = stateRef.current.tweenGroup) == null ? void 0 : _b2.update(time);
|
|
16024
|
-
const { keysPressed, controls:
|
|
16025
|
-
if (
|
|
16026
|
-
const panSpeed = 0.
|
|
16027
|
-
const rotateSpeed = 0.
|
|
16028
|
-
const
|
|
16024
|
+
const { keysPressed, controls: sceneControls, camera: sceneCamera } = stateRef.current;
|
|
16025
|
+
if (sceneControls && keysPressed) {
|
|
16026
|
+
const panSpeed = 0.5;
|
|
16027
|
+
const rotateSpeed = 0.02;
|
|
16028
|
+
const zoomInFactor = 0.98;
|
|
16029
|
+
const zoomOutFactor = 1.02;
|
|
16029
16030
|
const isShift = !!keysPressed["shiftKey"];
|
|
16030
16031
|
const isCtrl = !!keysPressed["ctrlKey"];
|
|
16031
16032
|
if (isCtrl) {
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
if (keysPressed["
|
|
16035
|
-
if (keysPressed["
|
|
16033
|
+
const offset = sceneCamera.position.clone().sub(sceneControls.target);
|
|
16034
|
+
const spherical = new THREE3.Spherical().setFromVector3(offset);
|
|
16035
|
+
if (keysPressed["ArrowLeft"]) spherical.theta += rotateSpeed;
|
|
16036
|
+
if (keysPressed["ArrowRight"]) spherical.theta -= rotateSpeed;
|
|
16037
|
+
if (keysPressed["ArrowUp"]) spherical.phi -= rotateSpeed;
|
|
16038
|
+
if (keysPressed["ArrowDown"]) spherical.phi += rotateSpeed;
|
|
16039
|
+
spherical.makeSafe();
|
|
16040
|
+
offset.setFromSpherical(spherical);
|
|
16041
|
+
sceneCamera.position.copy(sceneControls.target).add(offset);
|
|
16036
16042
|
} else if (isShift) {
|
|
16037
|
-
if (keysPressed["ArrowUp"])
|
|
16038
|
-
if (keysPressed["ArrowDown"])
|
|
16043
|
+
if (keysPressed["ArrowUp"]) sceneControls.dollyIn(zoomInFactor);
|
|
16044
|
+
if (keysPressed["ArrowDown"]) sceneControls.dollyOut(zoomOutFactor);
|
|
16039
16045
|
} else {
|
|
16040
|
-
if (keysPressed["ArrowLeft"])
|
|
16041
|
-
if (keysPressed["ArrowRight"])
|
|
16042
|
-
if (keysPressed["ArrowUp"])
|
|
16043
|
-
if (keysPressed["ArrowDown"])
|
|
16046
|
+
if (keysPressed["ArrowLeft"]) sceneControls.panLeft(panSpeed, sceneCamera.matrix);
|
|
16047
|
+
if (keysPressed["ArrowRight"]) sceneControls.panLeft(-panSpeed, sceneCamera.matrix);
|
|
16048
|
+
if (keysPressed["ArrowUp"]) sceneControls.panUp(panSpeed, sceneCamera.matrix);
|
|
16049
|
+
if (keysPressed["ArrowDown"]) sceneControls.panUp(-panSpeed, sceneCamera.matrix);
|
|
16044
16050
|
}
|
|
16045
16051
|
}
|
|
16046
16052
|
stateRef.current.controls.update();
|
|
16047
16053
|
renderer.autoClear = false;
|
|
16048
16054
|
renderer.clear();
|
|
16049
16055
|
scene.background = originalBackground;
|
|
16050
|
-
|
|
16056
|
+
camera.layers.set(GHOST_BLOOM_LAYER);
|
|
16051
16057
|
composer.render();
|
|
16052
16058
|
renderer.clearDepth();
|
|
16053
16059
|
scene.background = null;
|
|
16054
|
-
|
|
16055
|
-
renderer.render(scene,
|
|
16056
|
-
|
|
16060
|
+
camera.layers.set(DEFAULT_LAYER);
|
|
16061
|
+
renderer.render(scene, camera);
|
|
16062
|
+
camera.layers.enableAll();
|
|
16057
16063
|
}
|
|
16058
16064
|
animate();
|
|
16059
16065
|
function handleResize() {
|
|
@@ -18518,9 +18524,9 @@ function XViewScene({
|
|
|
18518
18524
|
if (isUiClear) {
|
|
18519
18525
|
const isView = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
|
|
18520
18526
|
if (!isView) return;
|
|
18521
|
-
const { graphGroup, glowTexture, controls, nodeObjects } = stateRef.current;
|
|
18527
|
+
const { graphGroup, glowTexture, controls: sceneControls, nodeObjects } = stateRef.current;
|
|
18522
18528
|
if (graphGroup) {
|
|
18523
|
-
let ghostPosition =
|
|
18529
|
+
let ghostPosition = sceneControls.target.clone();
|
|
18524
18530
|
const existingNodes = Object.values(nodeObjects);
|
|
18525
18531
|
let isOccupied = true;
|
|
18526
18532
|
let radius = 18;
|
|
@@ -18532,9 +18538,9 @@ function XViewScene({
|
|
|
18532
18538
|
(mesh) => mesh.position.distanceTo(ghostPosition) < MIN_CLEARANCE
|
|
18533
18539
|
);
|
|
18534
18540
|
if (isOccupied) {
|
|
18535
|
-
ghostPosition.x =
|
|
18536
|
-
ghostPosition.y =
|
|
18537
|
-
ghostPosition.z =
|
|
18541
|
+
ghostPosition.x = sceneControls.target.x + Math.cos(angle) * radius;
|
|
18542
|
+
ghostPosition.y = sceneControls.target.y + (Math.random() - 0.5) * 8;
|
|
18543
|
+
ghostPosition.z = sceneControls.target.z + Math.sin(angle) * radius;
|
|
18538
18544
|
angle += Math.PI / 3;
|
|
18539
18545
|
radius += 2.5;
|
|
18540
18546
|
attempts++;
|
package/dist/index.mjs
CHANGED
|
@@ -14631,20 +14631,20 @@ function XViewScene({
|
|
|
14631
14631
|
};
|
|
14632
14632
|
const tweenToTarget = useCallback6(
|
|
14633
14633
|
(target, zoomFactor = 1, forcedDirection = null) => {
|
|
14634
|
-
const { camera, controls, tweenGroup } = stateRef.current;
|
|
14635
|
-
if (!
|
|
14634
|
+
const { camera: sceneCamera, controls: sceneControls, tweenGroup } = stateRef.current;
|
|
14635
|
+
if (!sceneCamera || !sceneControls || !tweenGroup) return;
|
|
14636
14636
|
const targetPos = target instanceof THREE3.Mesh ? target.getWorldPosition(new THREE3.Vector3()) : target;
|
|
14637
|
-
const controlsTween = new Tween2(
|
|
14637
|
+
const controlsTween = new Tween2(sceneControls.target).to(targetPos, 1500).easing(Easing2.Cubic.Out);
|
|
14638
14638
|
tweenGroup.add(controlsTween);
|
|
14639
14639
|
controlsTween.start();
|
|
14640
14640
|
let offset;
|
|
14641
14641
|
if (forcedDirection) {
|
|
14642
14642
|
offset = forcedDirection.clone().normalize().multiplyScalar(x_view_config.CAMERA_ZOOM_DISTANCE / zoomFactor);
|
|
14643
14643
|
} else {
|
|
14644
|
-
offset =
|
|
14644
|
+
offset = sceneCamera.position.clone().sub(sceneControls.target).normalize().multiplyScalar(x_view_config.CAMERA_ZOOM_DISTANCE / zoomFactor);
|
|
14645
14645
|
}
|
|
14646
14646
|
const targetCameraPos = targetPos.clone().add(offset);
|
|
14647
|
-
const cameraTween = new Tween2(
|
|
14647
|
+
const cameraTween = new Tween2(sceneCamera.position).to(targetCameraPos, 1500).easing(Easing2.Cubic.Out);
|
|
14648
14648
|
tweenGroup.add(cameraTween);
|
|
14649
14649
|
cameraTween.start();
|
|
14650
14650
|
},
|
|
@@ -15390,14 +15390,14 @@ function XViewScene({
|
|
|
15390
15390
|
});
|
|
15391
15391
|
});
|
|
15392
15392
|
if (questCount > 0) {
|
|
15393
|
-
const { camera, controls } = stateRef.current;
|
|
15393
|
+
const { camera: sceneCamera, controls: sceneControls } = stateRef.current;
|
|
15394
15394
|
const centerX = sumX / questCount;
|
|
15395
15395
|
const centerY = sumY / questCount;
|
|
15396
15396
|
const targetFocus = new THREE3.Vector3(centerX, centerY, 0);
|
|
15397
|
-
const targetTween = new Tween2(
|
|
15397
|
+
const targetTween = new Tween2(sceneControls.target).to({ x: targetFocus.x, y: targetFocus.y, z: targetFocus.z }, 1500).easing(Easing2.Cubic.InOut);
|
|
15398
15398
|
tweenGroup.add(targetTween);
|
|
15399
15399
|
targetTween.start();
|
|
15400
|
-
const camTween = new Tween2(
|
|
15400
|
+
const camTween = new Tween2(sceneCamera.position).to({ x: targetFocus.x, y: targetFocus.y, z: 140 }, 1500).easing(Easing2.Cubic.InOut);
|
|
15401
15401
|
tweenGroup.add(camTween);
|
|
15402
15402
|
camTween.start();
|
|
15403
15403
|
}
|
|
@@ -15955,14 +15955,14 @@ function XViewScene({
|
|
|
15955
15955
|
node.position.y += Math.sin(clock.getElapsedTime() * 0.5 + i) * 5e-3;
|
|
15956
15956
|
const isImageNode = node.userData.useImageAsTexture === true || String(node.userData.useImageAsTexture) === "true";
|
|
15957
15957
|
if (isImageNode) {
|
|
15958
|
-
node.quaternion.copy(
|
|
15958
|
+
node.quaternion.copy(camera.quaternion);
|
|
15959
15959
|
}
|
|
15960
15960
|
});
|
|
15961
15961
|
} else {
|
|
15962
15962
|
stateRef.current.clickableNodes.forEach((node) => {
|
|
15963
15963
|
const isImageNode = node.userData.useImageAsTexture === true || String(node.userData.useImageAsTexture) === "true";
|
|
15964
15964
|
if (isImageNode) {
|
|
15965
|
-
node.quaternion.copy(
|
|
15965
|
+
node.quaternion.copy(camera.quaternion);
|
|
15966
15966
|
}
|
|
15967
15967
|
});
|
|
15968
15968
|
}
|
|
@@ -16032,8 +16032,8 @@ function XViewScene({
|
|
|
16032
16032
|
const srcMesh = stateRef.current.nodeObjects[String(connection.sourceNodeData.id)];
|
|
16033
16033
|
if (srcMesh) {
|
|
16034
16034
|
const raycaster2 = new THREE3.Raycaster();
|
|
16035
|
-
raycaster2.setFromCamera(mouse,
|
|
16036
|
-
|
|
16035
|
+
raycaster2.setFromCamera(mouse, camera);
|
|
16036
|
+
camera.getWorldDirection(plane.normal);
|
|
16037
16037
|
plane.setFromNormalAndCoplanarPoint(plane.normal, srcMesh.position);
|
|
16038
16038
|
if (raycaster2.ray.intersectPlane(plane, intersectionPoint))
|
|
16039
16039
|
connection.line.geometry.setPositions([
|
|
@@ -16046,8 +16046,8 @@ function XViewScene({
|
|
|
16046
16046
|
const fixedMesh = stateRef.current.nodeObjects[String(relink.fixedNodeId)];
|
|
16047
16047
|
if (fixedMesh) {
|
|
16048
16048
|
const raycaster2 = new THREE3.Raycaster();
|
|
16049
|
-
raycaster2.setFromCamera(mouse,
|
|
16050
|
-
|
|
16049
|
+
raycaster2.setFromCamera(mouse, camera);
|
|
16050
|
+
camera.getWorldDirection(plane.normal);
|
|
16051
16051
|
plane.setFromNormalAndCoplanarPoint(plane.normal, fixedMesh.position);
|
|
16052
16052
|
if (raycaster2.ray.intersectPlane(plane, intersectionPoint))
|
|
16053
16053
|
relink.line.geometry.setPositions([
|
|
@@ -16070,46 +16070,52 @@ function XViewScene({
|
|
|
16070
16070
|
tooltipEl: tooltipRef.current,
|
|
16071
16071
|
hoveredNode: stateRef.current.hoveredNode,
|
|
16072
16072
|
hoveredLink: stateRef.current.hoveredLink,
|
|
16073
|
-
camera
|
|
16073
|
+
camera,
|
|
16074
16074
|
mountEl: currentMount,
|
|
16075
16075
|
isSceneBusy: stateRef.current.isDragging || creation.isActive || connection.isActive || relink.isActive || ancestryMode.isActive,
|
|
16076
16076
|
parentData: parentDataRef.current,
|
|
16077
16077
|
ancestryData: ancestryDataRef.current
|
|
16078
16078
|
});
|
|
16079
16079
|
(_b2 = stateRef.current.tweenGroup) == null ? void 0 : _b2.update(time);
|
|
16080
|
-
const { keysPressed, controls:
|
|
16081
|
-
if (
|
|
16082
|
-
const panSpeed = 0.
|
|
16083
|
-
const rotateSpeed = 0.
|
|
16084
|
-
const
|
|
16080
|
+
const { keysPressed, controls: sceneControls, camera: sceneCamera } = stateRef.current;
|
|
16081
|
+
if (sceneControls && keysPressed) {
|
|
16082
|
+
const panSpeed = 0.5;
|
|
16083
|
+
const rotateSpeed = 0.02;
|
|
16084
|
+
const zoomInFactor = 0.98;
|
|
16085
|
+
const zoomOutFactor = 1.02;
|
|
16085
16086
|
const isShift = !!keysPressed["shiftKey"];
|
|
16086
16087
|
const isCtrl = !!keysPressed["ctrlKey"];
|
|
16087
16088
|
if (isCtrl) {
|
|
16088
|
-
|
|
16089
|
-
|
|
16090
|
-
if (keysPressed["
|
|
16091
|
-
if (keysPressed["
|
|
16089
|
+
const offset = sceneCamera.position.clone().sub(sceneControls.target);
|
|
16090
|
+
const spherical = new THREE3.Spherical().setFromVector3(offset);
|
|
16091
|
+
if (keysPressed["ArrowLeft"]) spherical.theta += rotateSpeed;
|
|
16092
|
+
if (keysPressed["ArrowRight"]) spherical.theta -= rotateSpeed;
|
|
16093
|
+
if (keysPressed["ArrowUp"]) spherical.phi -= rotateSpeed;
|
|
16094
|
+
if (keysPressed["ArrowDown"]) spherical.phi += rotateSpeed;
|
|
16095
|
+
spherical.makeSafe();
|
|
16096
|
+
offset.setFromSpherical(spherical);
|
|
16097
|
+
sceneCamera.position.copy(sceneControls.target).add(offset);
|
|
16092
16098
|
} else if (isShift) {
|
|
16093
|
-
if (keysPressed["ArrowUp"])
|
|
16094
|
-
if (keysPressed["ArrowDown"])
|
|
16099
|
+
if (keysPressed["ArrowUp"]) sceneControls.dollyIn(zoomInFactor);
|
|
16100
|
+
if (keysPressed["ArrowDown"]) sceneControls.dollyOut(zoomOutFactor);
|
|
16095
16101
|
} else {
|
|
16096
|
-
if (keysPressed["ArrowLeft"])
|
|
16097
|
-
if (keysPressed["ArrowRight"])
|
|
16098
|
-
if (keysPressed["ArrowUp"])
|
|
16099
|
-
if (keysPressed["ArrowDown"])
|
|
16102
|
+
if (keysPressed["ArrowLeft"]) sceneControls.panLeft(panSpeed, sceneCamera.matrix);
|
|
16103
|
+
if (keysPressed["ArrowRight"]) sceneControls.panLeft(-panSpeed, sceneCamera.matrix);
|
|
16104
|
+
if (keysPressed["ArrowUp"]) sceneControls.panUp(panSpeed, sceneCamera.matrix);
|
|
16105
|
+
if (keysPressed["ArrowDown"]) sceneControls.panUp(-panSpeed, sceneCamera.matrix);
|
|
16100
16106
|
}
|
|
16101
16107
|
}
|
|
16102
16108
|
stateRef.current.controls.update();
|
|
16103
16109
|
renderer.autoClear = false;
|
|
16104
16110
|
renderer.clear();
|
|
16105
16111
|
scene.background = originalBackground;
|
|
16106
|
-
|
|
16112
|
+
camera.layers.set(GHOST_BLOOM_LAYER);
|
|
16107
16113
|
composer.render();
|
|
16108
16114
|
renderer.clearDepth();
|
|
16109
16115
|
scene.background = null;
|
|
16110
|
-
|
|
16111
|
-
renderer.render(scene,
|
|
16112
|
-
|
|
16116
|
+
camera.layers.set(DEFAULT_LAYER);
|
|
16117
|
+
renderer.render(scene, camera);
|
|
16118
|
+
camera.layers.enableAll();
|
|
16113
16119
|
}
|
|
16114
16120
|
animate();
|
|
16115
16121
|
function handleResize() {
|
|
@@ -18574,9 +18580,9 @@ function XViewScene({
|
|
|
18574
18580
|
if (isUiClear) {
|
|
18575
18581
|
const isView = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
|
|
18576
18582
|
if (!isView) return;
|
|
18577
|
-
const { graphGroup, glowTexture, controls, nodeObjects } = stateRef.current;
|
|
18583
|
+
const { graphGroup, glowTexture, controls: sceneControls, nodeObjects } = stateRef.current;
|
|
18578
18584
|
if (graphGroup) {
|
|
18579
|
-
let ghostPosition =
|
|
18585
|
+
let ghostPosition = sceneControls.target.clone();
|
|
18580
18586
|
const existingNodes = Object.values(nodeObjects);
|
|
18581
18587
|
let isOccupied = true;
|
|
18582
18588
|
let radius = 18;
|
|
@@ -18588,9 +18594,9 @@ function XViewScene({
|
|
|
18588
18594
|
(mesh) => mesh.position.distanceTo(ghostPosition) < MIN_CLEARANCE
|
|
18589
18595
|
);
|
|
18590
18596
|
if (isOccupied) {
|
|
18591
|
-
ghostPosition.x =
|
|
18592
|
-
ghostPosition.y =
|
|
18593
|
-
ghostPosition.z =
|
|
18597
|
+
ghostPosition.x = sceneControls.target.x + Math.cos(angle) * radius;
|
|
18598
|
+
ghostPosition.y = sceneControls.target.y + (Math.random() - 0.5) * 8;
|
|
18599
|
+
ghostPosition.z = sceneControls.target.z + Math.sin(angle) * radius;
|
|
18594
18600
|
angle += Math.PI / 3;
|
|
18595
18601
|
radius += 2.5;
|
|
18596
18602
|
attempts++;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lv-x-software-house/x_view",
|
|
3
|
-
"version": "1.2.6-dev.
|
|
3
|
+
"version": "1.2.6-dev.48",
|
|
4
4
|
"description": "Pacote privado contendo os componentes e lógica de renderização 3D do X View.",
|
|
5
5
|
"author": "iv.x - Engenharia de Software - ivxsoftwarehouse@gmail.com",
|
|
6
6
|
"license": "UNLICENSED",
|