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

Cleanup examples #26869

Merged
merged 4 commits into from
Sep 29, 2023
Merged

Cleanup examples #26869

merged 4 commits into from
Sep 29, 2023

Conversation

Methuselah96
Copy link
Contributor

@Methuselah96 Methuselah96 commented Sep 29, 2023

Related issue: #XXXX

Description

Explanations below.

console.log( 'model ' + Math.round( percentComplete, 2 ) + '% downloaded' );
console.log( 'model ' + percentComplete.toFixed( 2 ) + '% downloaded' );
Copy link
Contributor Author

@Methuselah96 Methuselah96 Sep 29, 2023

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 () {
Copy link
Contributor Author

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.

@Methuselah96 Methuselah96 changed the title Cleanup example Cleanup examples Sep 29, 2023
@@ -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 } ) );
Copy link
Contributor Author

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.

@Mugen87 Mugen87 merged commit d18060c into mrdoob:dev Sep 29, 2023
17 checks passed
@Mugen87 Mugen87 added this to the r158 milestone Sep 29, 2023
@Methuselah96 Methuselah96 deleted the loader-md2-example-cleanup branch September 29, 2023 15:18
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.

2 participants