Skip to content
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

Merged
merged 2 commits into from
Feb 7, 2018
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 7, 2018

As requested in #13259

Also correct the docs.


//

var ambientLight = new THREE.AmbientLight( 0xcccccc );
Copy link
Collaborator

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 );
Copy link
Collaborator

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,
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay done 👍

Copy link
Collaborator Author

@Mugen87 Mugen87 Feb 7, 2018

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...

Copy link
Collaborator

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. :/

@mrdoob mrdoob merged commit 081e4fb into mrdoob:dev Feb 7, 2018
@mrdoob mrdoob added this to the r90 milestone Feb 7, 2018
@mrdoob
Copy link
Owner

mrdoob commented Feb 7, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants