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

Material does not work as documented for HTML #1915

Open
kevinschaich opened this issue Apr 11, 2024 · 1 comment
Open

Material does not work as documented for HTML #1915

kevinschaich opened this issue Apr 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kevinschaich
Copy link

Problem description:

From the README:

You can also give HTML material properties using the material prop.

I have not been able to get this to work and it doesn't appear to be the case in any of the examples – as I understand the DOM gets rendered in a separate canvas either in front of or behind the rest of the scene, e.g.:

https://codesandbox.io/p/sandbox/occluded-html-forked-wp9mkp?file=%2Fsrc%2Findex.js

Is it possible to wrap this element with a decal or rendered texture?

Relevant code:

<Html
  occlude
  material={
    <meshPhysicalMaterial
      side={DoubleSide} // Required
      opacity={0.1} // Degree of influence of lighting on the HTML
      ... // Any other material properties
    />
  }
/>

Suggested solution:

Update the docs with solution if it's possible, or remove it

@kevinschaich kevinschaich added the bug Something isn't working label Apr 11, 2024
@dale8nson
Copy link

Did you set occlude to "blending"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants