Open alvarosabu opened 3 months ago
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
Describe the bug
While adding
on-demand
invalidation on theuseSurfaceSampler
andSampler
on #436 I noticed thatuseSurfaceSampler
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-composableSince we are providing to our users as it was a composable, I would expect that the options are reactive.
https://github.com/Tresjs/cientos/blob/9e17559fc98066db79b02b7ea0c98ae3037ac906/src/core/abstractions/useSurfaceSampler/index.ts#L81-L143
Reproduction
Local playground, run useSurfaceSampler
Steps to reproduce
No response
System Info
Used Package Manager
pnpm
Code of Conduct