Replies: 1 comment 1 reply
-
you need shader-lib chunks for light. you will find it on stackoverflow or threejs discussion forums. same goes for shadows, fog, instancing, etc. everything that's more than a pixel color needs these chunks. you can also dig into threejs source for light responsive materials and copy it from there. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please check the "/src/components/Text.js" file of this CodeSandbox:
https://codesandbox.io/embed/r3f-moksha-f1ixt
I'm using that on my 3D scene but with a higher
height
.As you can see, I've added
<meshNormalMaterial attach="material" color={color} />
, unfortunately anycolor
would not work, but it's reacting to lights.If I remove
meshNormalMaterial
,color
would work but without any highlighting reactions on the lights.Any tips how can I make the "/src/components/Text.js" component of https://codesandbox.io/embed/r3f-moksha-f1ixt react to a light?
Beta Was this translation helpful? Give feedback.
All reactions