-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added default position and direction to camera if props are not …
…passed
- Loading branch information
1 parent
8d030fb
commit 63a340f
Showing
6 changed files
with
34 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script setup lang="ts"> | ||
import { TresCanvas } from '/@/' | ||
const context = ref() | ||
watchEffect(() => { | ||
console.log(context) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<TresCanvas ref="context" clear-color="#82DBC5" window-size="true"> | ||
<TresPerspectiveCamera /> | ||
<TresMesh> | ||
<TresTorusGeometry :args="[1, 0.5, 16, 32]" /> | ||
<TresMeshBasicMaterial color="orange" /> | ||
</TresMesh> | ||
<TresAmbientLight :intensity="1" /> | ||
</TresCanvas> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<script setup lang="ts"></script> | ||
<template> | ||
<Suspense> | ||
<TheEvents /> | ||
<TheFirstScene /> | ||
</Suspense> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
html, | ||
/* html, | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
|
@@ -9,3 +9,4 @@ body { | |
height: 100%; | ||
width: 100%; | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters