useSurfaceSampler is not a composable
alvarosabu opened this issue · 2 comments
Describe the bug
While adding on-demand
invalidation on the useSurfaceSampler
and Sampler
on #436 I noticed that useSurfaceSampler
is not a vue composable per definition (it doesn't deal with any type of reactivity or state), is just a function. See why here https://vuejs.org/guide/reusability/composables#what-is-a-composable
Since we are providing to our users as it was a composable, I would expect that the options are reactive.
cientos/src/core/abstractions/useSurfaceSampler/index.ts
Lines 81 to 143 in 9e17559
Reproduction
Local playground, run useSurfaceSampler
Steps to reproduce
No response
System Info
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M1 Pro
Memory: 89.09 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
pnpm: 8.15.4 - ~/Library/pnpm/pnpm
bun: 1.0.2 - ~/.bun/bin/bun
Browsers:
Brave Browser: 120.1.61.116
Chrome: 125.0.6422.142
Safari: 17.5
npmPackages:
@tresjs/core: 4.0.2 => 4.0.2
@tresjs/leches: ^0.14.0 => 0.14.0
Used Package Manager
pnpm
Code of Conduct
- I agree to follow this project's Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Hi @andretchen0 could you please help me out with this one? It's blocking full support of the on-demand for the sampler #436
Hey @alvarosabu ,
Since we are providing to our users as it was a composable, I would expect that the options are reactive.
Which options are you referring to? The arguments to the function?
mesh: Mesh,
count: number = 16,
instanceMesh?: InstancedMesh | null,
weight?: string,
transform?: TransformFn,
E.g.: https://vuejs.org/guide/reusability/composables.html#input-arguments