-
-
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: increate time to advance on manual mode * chore: correct playground
- Loading branch information
1 parent
f840614
commit 0720d18
Showing
9 changed files
with
119 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,28 @@ | ||
<script setup lang="ts"> | ||
import { OrbitControls } from '@tresjs/cientos' | ||
import { useTres } from '@tresjs/core' | ||
import BlenderCube from '../../../components/BlenderCube.vue' | ||
const { advance } = useTres() | ||
onMounted(() => { | ||
advance() | ||
}) | ||
</script> | ||
|
||
<template> | ||
<TresPerspectiveCamera | ||
:position="[5, 5, 5]" | ||
:look-at="[0, 0, 0]" | ||
/> | ||
<Suspense> | ||
<BlenderCube /> | ||
</Suspense> | ||
<TresGridHelper /> | ||
<OrbitControls @change="advance" /> | ||
<TresAmbientLight :intensity="1" /> | ||
<TresDirectionalLight | ||
:position="[0, 8, 4]" | ||
:intensity="0.7" | ||
/> | ||
</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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script setup lang="ts"> | ||
import { TresCanvas } from '@tresjs/core' | ||
import { useState } from '../../../composables/state' | ||
import GraphPane from '../../../components/GraphPane.vue' | ||
import ManualExperience from './experience.vue' | ||
const { renderingTimes } = useState() | ||
function onRender() { | ||
renderingTimes.value = 1 | ||
} | ||
</script> | ||
|
||
<template> | ||
<GraphPane /> | ||
<TresCanvas | ||
render-mode="manual" | ||
clear-color="#82DBC5" | ||
@render="onRender" | ||
> | ||
<ManualExperience /> | ||
</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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<script setup lang="ts"> | ||
import { OrbitControls } from '@tresjs/cientos' | ||
import { useTres } from '@tresjs/core' | ||
import { ref, watch } from 'vue' | ||
import BlenderCube from '../../../components/BlenderCube.vue' | ||
const { invalidate } = useTres() | ||
const blenderCubeRef = ref() | ||
watch(blenderCubeRef, (prev, next) => { | ||
if (!next) { return } | ||
invalidate() | ||
}) | ||
function onControlChange() { | ||
invalidate() | ||
} | ||
</script> | ||
|
||
<template> | ||
<TresPerspectiveCamera | ||
:position="[5, 5, 5]" | ||
:look-at="[0, 0, 0]" | ||
/> | ||
<Suspense> | ||
<BlenderCube ref="blenderCubeRef" /> | ||
</Suspense> | ||
<TresGridHelper /> | ||
<OrbitControls @change="onControlChange" /> | ||
<TresAmbientLight :intensity="1" /> | ||
<TresDirectionalLight | ||
:position="[0, 8, 4]" | ||
:intensity="0.7" | ||
/> | ||
</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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script setup lang="ts"> | ||
import { TresCanvas } from '@tresjs/core' | ||
import { useState } from '../../../composables/state' | ||
import GraphPane from '../../../components/GraphPane.vue' | ||
import OnDemandExperience from './experience.vue' | ||
const { renderingTimes } = useState() | ||
function onRender() { | ||
renderingTimes.value = 1 | ||
} | ||
</script> | ||
|
||
<template> | ||
<GraphPane /> | ||
<TresCanvas | ||
render-mode="on-demand" | ||
clear-color="#82DBC5" | ||
@render="onRender" | ||
> | ||
<OnDemandExperience /> | ||
</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
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