feat(nds): fixed camera position
This commit is contained in:
@@ -142,6 +142,11 @@ onRender(({ delta }) => {
|
||||
const handleClick = (event: MouseEvent) => {
|
||||
if (!scene.value) return;
|
||||
|
||||
console.log(
|
||||
camera.activeCamera.value?.getWorldPosition(new THREE.Vector3()),
|
||||
camera.activeCamera.value?.rotation,
|
||||
);
|
||||
|
||||
const domElement = renderer.instance.domElement;
|
||||
const rect = domElement.getBoundingClientRect();
|
||||
|
||||
|
||||
@@ -17,8 +17,11 @@ const bottomScreenCanvas = computed(() => bottomScreen.value?.canvas ?? null);
|
||||
<template>
|
||||
<div>
|
||||
<TresCanvas window-size clear-color="#181818">
|
||||
<TresPerspectiveCamera :args="[45, 1, 0.001, 1000]" />
|
||||
<OrbitControls />
|
||||
<TresPerspectiveCamera
|
||||
:args="[45, 1, 0.001, 1000]"
|
||||
:position="[0, 10, 12]"
|
||||
:rotation="[-Math.PI / 4.7, 0, 0]"
|
||||
/>
|
||||
|
||||
<TresAmbientLight />
|
||||
<TresDirectionalLight />
|
||||
|
||||
Reference in New Issue
Block a user