-
Notifications
You must be signed in to change notification settings - Fork 199
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... can be put anywhere ... => can be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... and the code will still find it ... => and the code will still |
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should not the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... your use case might change ... => your use case might change |
||
to the code. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`. | ||
|
||
|
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.
Should not be: ... a canvas will be created for you.
Anyway, in both cases t
he canvas that was created will still have to be added to ...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.
thx bro