feat(gallery): transition to and from the nds
This commit is contained in:
@@ -41,6 +41,15 @@ const { camera, renderer } = useTresContext();
|
||||
|
||||
model.scale.set(100, 100, 100);
|
||||
|
||||
const app = useAppStore();
|
||||
watch(
|
||||
() => camera.activeCamera.value,
|
||||
(cam) => {
|
||||
if (cam) app.setCamera(cam);
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
|
||||
meshes.clear();
|
||||
model.traverse((child) => {
|
||||
if (child instanceof THREE.Mesh) {
|
||||
@@ -199,6 +208,7 @@ const handleClick = (event: MouseEvent) => {
|
||||
switch (intersection.object.name) {
|
||||
case TOP_SCREEN:
|
||||
case BOTTOM_SCREEN: {
|
||||
console.log(intersection);
|
||||
const canvas =
|
||||
intersection.object.name === TOP_SCREEN
|
||||
? props.topScreenCanvas
|
||||
|
||||
Reference in New Issue
Block a user