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

Update threejs-fundamentals.md #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions threejs/lessons/threejs-fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,15 @@ like `CSSRenderer`, a `CanvasRenderer` and in the future there may be a
`WebGL2Renderer` or `WebGPURenderer`. For now there's the `WebGLRenderer`
that uses WebGL to render 3D to the canvas.

Note there are some esoteric details here. If you don't pass a canvas
into three.js it will create one for you but then you have to add it
to your document. Where to add it may change depending on your use case
and you'll have to change your code so I find that passing a canvas
to three.js feels a little more flexible. I can put the canvas anywhere
and the code will find it where as if I had code to insert the canvas
into to the document I'd likely have to change that code if my use case
changed.
Note there are some esoteric details here. For three.js to work, it must
have a canvas. You have a choice of either passing a canvas into three.js
or not. If you decide not to pass a canvas into three.js, a canvas will be
created for you. The canvas that was created will still have to be added to
Copy link
Contributor

Choose a reason for hiding this comment

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

Should not be: ... a canvas will be created for you. Anyway, in both cases the canvas that was created will still have to be added to ...

Choose a reason for hiding this comment

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

thx bro

your document. I think passing a canvas to three.js feels more flexible
because the canvas can be put anywhere, and the code will still find it.
Copy link
Contributor

Choose a reason for hiding this comment

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

... can be put anywhere ... => can be place anywhere inside the document ?

Copy link
Contributor

Choose a reason for hiding this comment

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

... and the code will still find it ... => and the code will still know where to locate it

Otherwise, not passing in a canvas into three.js might cause two problems.
First, your use case might change. Lastly, changes will have to be made
Copy link
Contributor

Choose a reason for hiding this comment

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

Should not the . be a : instead ? So: two problems: - firstly, your use case might change; - secondly, changes ...

Copy link
Contributor

Choose a reason for hiding this comment

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

... your use case might change ... => your use case might change: modify its localization

to the code.
Copy link
Contributor

Choose a reason for hiding this comment

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

... to the code. => ... in the code source.


Next up we need a camera. We'll create a `PerspectiveCamera`.

Expand Down