CHANNELS:

All
h
harp34 posted 2 years ago
chris posted 2 years ago

MeshPhongMaterial can be tricky because it requires a light source to show the true color. It's likely the mesh is still red, but it just looks dark blue since there's so little light on it.

Try creating a PointLight and placing it in front of your mesh. Pretty sure that'll brighten it up and show the red color.

Here's some docs to get you going: https://threejs.org/docs/#api/en/lights/PointLight

const light = new THREE.PointLight( 0xff0000, 1, 100 );
light.position.set( 50, 50, 50 );
scene.add( light );
1
h
harp34 posted 2 years ago

Okay perfect thanks, will try this out now!

1

Want to participate?

Create a free Chris Courses account to begin

or
Sign In

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.