Skip to content

Commit

Permalink
fix: removed toFixed for progress value (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu authored Sep 1, 2023
1 parent 0f5d9cf commit d46f90f
Show file tree
Hide file tree
Showing 5 changed files with 4,673 additions and 225 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@release-it/conventional-changelog": "^7.0.0",
"@tweakpane/core": "^1.1.9",
"@types/node": "^20.5.4",
"@types/three": "^0.155.1",
"@types/three": "^0.155.0",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"@vitejs/plugin-vue": "^4.3.3",
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"vue-router": "^4.2.4"
},
"devDependencies": {
"@tresjs/leches": "^0.7.0",
"@tresjs/leches": "^0.8.0",
"unplugin-auto-import": "^0.16.6",
"unplugin-vue-components": "^0.25.1",
"vite-plugin-glsl": "^1.1.2",
Expand Down
9 changes: 9 additions & 0 deletions playground/src/pages/ScrollControlsDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { ref, watchEffect } from 'vue'
import { TresCanvas, useRenderLoop } from '@tresjs/core'
import { ScrollControls, Stars, Sphere, Box } from '@tresjs/cientos'
import { SRGBColorSpace, NoToneMapping } from 'three'
import { TresLeches, useControls } from '@tresjs/leches';
import '@tresjs/leches/styles'
const scRef = ref()
const sphereRef = ref()
Expand All @@ -20,6 +22,12 @@ const gl = {
outputColorSpace: SRGBColorSpace,
toneMapping: NoToneMapping,
}
useControls('fpsgraph')
useControls({
progress: progress.value
})
const { onLoop } = useRenderLoop()
onLoop(() => {
if (boxRef.value) {
Expand All @@ -29,6 +37,7 @@ onLoop(() => {
})
</script>
<template>
<TresLeches class="important-fixed" />
<TresCanvas v-bind="gl" ref="canvasRef" window-size>
<TresPerspectiveCamera :position="[0, 2, 5]" />
<Stars :radius="1" />
Expand Down
Loading

0 comments on commit d46f90f

Please sign in to comment.