Skip to content

Commit

Permalink
chore: renamed positional audio demo
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Jun 17, 2024
1 parent 593f4a0 commit a3d7f47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { TresCanvas } from '@tresjs/core'
import { Box, OrbitControls, PositionalAudio } from '@tresjs/cientos'
import { useState } from '../../composables/state'
const gl = {
clearColor: '#82DBC5',
Expand Down Expand Up @@ -31,6 +32,12 @@ const handlerAudio = (action: string) => {
const onContinue = () => {
ready.value = true
}
const { renderingTimes } = useState()
function onRender() {
renderingTimes.value = 1
}
</script>

<template>
Expand Down Expand Up @@ -65,8 +72,8 @@ const onContinue = () => {
</button>
</div>
</div>

<TresCanvas v-bind="gl">
<GraphPane />
<TresCanvas v-bind="gl" render-mode="on-demand" @render="onRender">
<TresPerspectiveCamera :position="[0, 0.5, 5]" />
<OrbitControls />

Expand Down
2 changes: 1 addition & 1 deletion playground/src/router/routes/abstractions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const abstractionsRoutes = [
{
path: '/abstractions/positional-audio',
name: 'PositionalAudio',
component: () => import('../../pages/abstractions/PositionalAudio.vue'),
component: () => import('../../pages/abstractions/PositionalAudioDemo.vue'),
},
{
path: '/abstractions/animated-sprite',
Expand Down

0 comments on commit a3d7f47

Please sign in to comment.