Skip to content

Commit

Permalink
Fix nextjs-prism demo (#59)
Browse files Browse the repository at this point in the history
* Fix nextjs-prism demo

* Fix spotlight intensity and decay
  • Loading branch information
rndexe authored Aug 8, 2024
1 parent 37d99b3 commit 340d651
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions demos/nextjs-prism/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ function Scene() {
<>
{/* Lights */}
<ambientLight ref={ambient} intensity={0} />
<pointLight position={[10, -10, 0]} intensity={0.05} />
<pointLight position={[0, 10, 0]} intensity={0.05} />
<pointLight position={[-10, 0, 0]} intensity={0.05} />
<spotLight ref={spot} intensity={1} distance={7} angle={1} penumbra={1} position={[0, 0, 1]} />
<pointLight position={[10, -10, 0]} intensity={0.05 * Math.PI} decay={0}/>
<pointLight position={[0, 10, 0]} intensity={0.05 * Math.PI} decay={0}/>
<pointLight position={[-10, 0, 0]} intensity={0.05 * Math.PI} decay={0} />
<spotLight ref={spot} intensity={Math.PI} decay={0} distance={7} angle={1} penumbra={1} position={[0, 0, 1]} />
{/* Caption */}
<Center top bottom position={[0, 2, 0]}>
<Text3D size={0.7} letterSpacing={-0.05} height={0.05} font={inter}>
Expand Down
2 changes: 1 addition & 1 deletion demos/nextjs-prism/src/components/Rainbow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const RainbowMaterial = shaderMaterial(
vec3 co = c / iridescence(uv.x * 0.5 * 3.14159, 1.0 - uv.y + time / 10.0) / 20.0;
gl_FragColor = vec4(area * co * l * brightness * emissiveIntensity, 1.0);
if (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b < 0.01) discard;
#include <encodings_fragment>
#include <colorspace_fragment>
}`
)

Expand Down

0 comments on commit 340d651

Please sign in to comment.