-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Cleanup examples #26869
Cleanup examples #26869
Conversation
console.log( 'model ' + Math.round( percentComplete, 2 ) + '% downloaded' ); | ||
console.log( 'model ' + percentComplete.toFixed( 2 ) + '% downloaded' ); |
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.
Math.round doesn't take a second parameter. toFixed accomplishes the desired behavior.
gui.add( playbackConfig, 'wireframe', false ).onChange( function () { | ||
gui.add( playbackConfig, 'wireframe' ).onChange( function () { |
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.
gui.add
doesn't do anything with the third parameter if the property value is a boolean.
@@ -210,7 +210,7 @@ | |||
start.multiplyScalar( 75 ); | |||
end.multiplyScalar( 75 ); | |||
|
|||
const object = new THREE.Mesh( boxGeometry, new THREE.MeshPhongMaterial( 0xffffff ) ); | |||
const object = new THREE.Mesh( boxGeometry, new THREE.MeshPhongMaterial( { color: 0xffffff } ) ); |
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.
The MeshPhongMaterial
takes an object of parameters. 0xffffff
matches the default color, so alternatively it could be removed altogether.
Related issue: #XXXX
Description
Explanations below.