gaesup-world 0.2.51 → 0.2.52
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/gaesup/camera/index.js +17 -16
- package/package.json +1 -1
|
@@ -19,7 +19,6 @@ import { GaesupControllerContext } from "../controller/context";
|
|
|
19
19
|
import { GaesupWorldContext } from "../world/context";
|
|
20
20
|
import normal from "./control/normal";
|
|
21
21
|
import orbit from "./control/orbit";
|
|
22
|
-
import detector from "./detector";
|
|
23
22
|
export default function Camera(_a) {
|
|
24
23
|
var refs = _a.refs, prop = _a.prop, control = _a.control;
|
|
25
24
|
var worldContext = useContext(GaesupWorldContext);
|
|
@@ -30,20 +29,22 @@ export default function Camera(_a) {
|
|
|
30
29
|
var cameraRef = useRef();
|
|
31
30
|
var intersectObjectMap = useMemo(function () { return ({}); }, []);
|
|
32
31
|
var cameraProp = __assign(__assign({}, prop), { control: control, controllerContext: controllerContext, worldContext: worldContext, intersectObjectMap: intersectObjectMap });
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
// const getMeshs = (object: THREE.Object3D) => {
|
|
33
|
+
// if (object.userData && object.userData.intangible) return;
|
|
34
|
+
// if (
|
|
35
|
+
// object instanceof THREE.Mesh &&
|
|
36
|
+
// object.geometry.type !== "InstancedBufferGeometry"
|
|
37
|
+
// ) {
|
|
38
|
+
// intersectObjectMap[object.uuid] = object;
|
|
39
|
+
// }
|
|
40
|
+
// object.children.forEach((child) => {
|
|
41
|
+
// getMeshs(child);
|
|
42
|
+
// });
|
|
43
|
+
// };
|
|
44
|
+
//
|
|
45
|
+
// useEffect(() => {
|
|
46
|
+
// scene.children.forEach((child) => getMeshs(child));
|
|
47
|
+
// }, []);
|
|
47
48
|
var position = useMemo(function () { return camera.position; }, []);
|
|
48
49
|
var dir = useMemo(function () { return vec3(); }, []);
|
|
49
50
|
cameraProp.cameraRay.rayCast = new THREE.Raycaster(cameraProp.cameraRay.origin, cameraProp.cameraRay.dir, 0, -cameraOption.maxDistance);
|
|
@@ -66,7 +67,7 @@ export default function Camera(_a) {
|
|
|
66
67
|
else if (mode.control === "normal") {
|
|
67
68
|
normal(cameraProp);
|
|
68
69
|
}
|
|
69
|
-
detector(cameraProp);
|
|
70
|
+
// detector(cameraProp);
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
// // moveTo 함수 정의
|