Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need understanding how we can use types.image in case of three.js #483

Closed
RaishavHanspal opened this issue Apr 2, 2024 · 2 comments
Closed

Comments

@RaishavHanspal
Copy link

RaishavHanspal commented Apr 2, 2024

I'm trying to link the types.image theatre property to work with my MeshStandardMaterial map property, Could you suggest this is viable/feasible with the current implementation.

the onValuesChanges function return object in form

{ id: string; type: "image" }

The id only shows the image name.
There is a suggestion in the Docs: that a custom interpolator might be required, please give insights on the usage?

Another thing: https://theatre-playground.vercel.app/shared/dom is down.

@RaishavHanspal
Copy link
Author

Hi @AriaMinaei,
Could you please suggest on this?
Thanks :)

@AriaMinaei
Copy link
Member

Looks like the link that is supposed explain this is broken. Here it is.

Basically:

onst object = sheet.object('My Object', {
  texture: types.image(undefined, {
    label: 'Texture',
  }),
})

object.onValuesChange(({ texture }) => {
  setImageUrl(project.getAssetUrl(texture))
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants