-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples: Add demo for indexed BufferGeometry #13266
Conversation
|
||
// | ||
|
||
var ambientLight = new THREE.AmbientLight( 0xcccccc ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ambient light should never be that high. Try 0x222222.
light1.position.set( 1, 1, 1 ); | ||
scene.add( light1 ); | ||
|
||
var light2 = new THREE.DirectionalLight( 0xffffff, 1.5 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try not not over-brighten you scene.
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) ); | ||
|
||
var material = new THREE.MeshPhongMaterial( { | ||
specular: 0xffffff, shininess: 250, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the specular reflectance of the material is 0xffffff
, and the diffuse reflectance is greater than zero, then more than 100% of the light is being reflected. Set specular
to 0x111111
. Study the hot-spot before and after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay done 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW: I've just copied the material/lights from an other example. We might want to review the lightings in the examples at some point...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Check the outline pass demo. :/
Thanks! |
As requested in #13259
Also correct the docs.