-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
update docs 0.3.0 #1494
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
Merged
Merged
update docs 0.3.0 #1494
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6bfe983
update light docs
ngokevin 29a0df5
update camera docs
ngokevin d1625ce
update stats doc
ngokevin 55888af
glTF
ngokevin b5edbad
remove manual order
ngokevin 1e06cab
add debug component docs
ngokevin 5d9961d
window properties
ngokevin cb9e2d3
document utils
ngokevin 73f32fd
a-sound
ngokevin 58ab0c2
update primitive docs
ngokevin 852d3a5
geometry docs
ngokevin e0739a8
new primitives
ngokevin c7314f4
device and platforms
ngokevin 95f446b
intro update
ngokevin 1d9920f
update basic scene
ngokevin 1febc82
plane work
ngokevin 623f57e
wip adv scene
ngokevin 99a6f22
use injected auto table of contents
ngokevin bbb3e5f
update
ngokevin 5e54edb
advanced scene guide
ngokevin 9c5d130
best practices
ngokevin 8bf6a0c
update material docs
ngokevin da416de
typos
ngokevin fa89017
flushtodom
ngokevin 16554cd
canvas texture
ngokevin f9b8bc7
review
ngokevin 3e76813
[wip] address comments
ngokevin 136af0f
dependencies and multiple instances
ngokevin b51ad06
update 360 ex
ngokevin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add debug component docs
- Loading branch information
commit 1e06cabb610a67e06c42f64bc3b1dbb24589e35e
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| title: debug | ||
| type: components | ||
| layout: docs | ||
| parent_section: components | ||
| --- | ||
|
|
||
| The debug component enables component-to-DOM serialization. | ||
|
|
||
| ## Example | ||
|
|
||
| ```html | ||
| <a-scene debug></a-scene> | ||
| ``` | ||
|
|
||
| ## Component-to-DOM Serialization | ||
|
|
||
| By default, for performance reasons, A-Frame does not update the DOM with component data. If we open the browser's DOM inspector, we will see that many entities will have only the component name visible: | ||
|
|
||
| ```html | ||
| <a-entity geometry material position rotation></a-entity> | ||
| ``` | ||
|
|
||
| The component data is stored internally. Updating the DOM takes CPU time for converting component data, which is stored internally, to strings. However, when we want to see the DOM update for debugging purposes, we can attach the `debug` component to the scene. Components will check whether the `debug` component is enabled before trying to serialize to the DOM. Then we will be able to view component data in the DOM: | ||
|
|
||
| ```html | ||
| <a-entity geometry="primitive: box" material="color: red" position="1 2 3" rotation="0 180 0"></a-entity> | ||
| ``` | ||
|
|
||
| Make sure that this component is not active in production. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@dmarcos explained to me when exactly the perf is impaired.
JSON.parse+JSON.stringifybeing costly with animations is an example. that's probably a technical detail I'm just curious about, but now I'm not as surprised or confused.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.
So this here is good enough?