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

Docs: Update 'Creating A Scene' code #22921

Merged
merged 5 commits into from
Dec 2, 2021
Merged

Docs: Update 'Creating A Scene' code #22921

merged 5 commits into from
Dec 2, 2021

Conversation

ayushmanchhabra
Copy link
Contributor

@ayushmanchhabra ayushmanchhabra commented Nov 30, 2021

Related issue: #XXXX

Description

  • Update cube.rotate.x and cube.rotate.y to cube.rotateX() and cube.rotateY() respectively
  • Make function declarations consistent
  • Made the above changes for all languages

@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 30, 2021

Update cube.rotate.x and cube.rotate.y to cube.rotateX() and cube.rotateY() respectively

I'm not sure we should do that. Modulating the properties position, rotation and scale should be the first choice when transforming objects.

Make function declarations consistent

For simplicity I vote to use ordinary function declarations. So just:

function animate() {

    requestAnimationFrame( animate );
    renderer.render( scene, camera );

}

@ayushmanchhabra
Copy link
Contributor Author

I'm not sure we should do that. Modulating the properties position, rotation and scale should be the first choice when transforming objects.

My code editor's IntelliSense showed me there was no rotate property on cube so I went with rotateX and rotateY which worked. After looking into the source realized rotate had changed to rotation!

For simplicity I vote to use ordinary function declarations. So just:

Sure!

@ayushmanchhabra
Copy link
Contributor Author

ayushmanchhabra commented Nov 30, 2021

My code editor's IntelliSense showed me there was no rotate property on cube so I went with rotateX and rotateY which worked. After looking into the source realized rotate had changed to rotation!

Just realized I must have misread rotation as rotate on the website!

@Mugen87 Mugen87 added this to the r136 milestone Dec 1, 2021
@Mugen87 Mugen87 merged commit 13b67d9 into mrdoob:dev Dec 2, 2021
@ayushmanchhabra ayushmanchhabra deleted the docs-creating-a-scene branch December 2, 2021 15:22
@mrdoob
Copy link
Owner

mrdoob commented Dec 3, 2021

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.

None yet

3 participants