I have a problem, the color displayed in the element is not yellow, but gray with yellow
export const CubeAnimation = () => {
return (
<Canvas
camera={{ aspect: 2, far: 1000, fov: 45, near: 0.1, position: [0, 90, 50] }}
style={{ background: 'black' }}
>
<pointLight color={0xffffff} intensity={1500} />
<mesh position={[0,0,0]} scale={[5,5,5]}>
<sphereGeometry args={[1, 6, 6]} />
<meshPhongMaterial color={0xffff00} emissive={0xffff00} /> // This element
</mesh>
<mesh position={[0, -3, 0]} rotation={[-Math.PI / 2, 0, 0]}>
<planeGeometry args={[500, 500]} />
<meshPhongMaterial color={'black'} />
</mesh>
<OrbitControls enablePan enableZoom />
</Canvas>
)
}
enter image description here
That’s the color
Expected
enter image description here
New contributor
Геннадий Лобоцкий is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.