-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
Environment
Reactversion: 19.0.0Nextversion: 15.1.4threeversion: 0.172.0@react-three/fiberversion: 9.0.0-rc.2@react-three/dreiversion: 9.120.6nodeversion: v23.4.0npmversion: 10.9.2
Problem description:
When using the EffectComposer component from react-three/postprocessing, I'm encountering a "Cannot read properties of undefined (reading 'length')" error. This error occurs in the useLayoutEffect hook of the EffectComposer component. The current behavior is problematic because it prevents the EffectComposer from initializing properly and applying post-processing effects to the scene.
Actuall Behavior
The application throws the following error:
EffectComposer.tsx:141 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at EffectComposer.useLayoutEffect (EffectComposer.tsx:141:40)
Steps to Reproduce
- Create a React Three Fiber scene
- Add an EffectComposer component to the scene
- Render the scene
Code Example
import React from 'react'
import { Canvas } from '@react-three/fiber'
import { EffectComposer } from '@react-three/postprocessing'
function Scene() {
return (
<Canvas>
<mesh>
<boxGeometry />
<meshStandardMaterial />
</mesh>
<EffectComposer>
{/* Your effects here */}
</EffectComposer>
</Canvas>
)
}yuann-se and IAmTheAg
Metadata
Metadata
Assignees
Labels
No labels