Skip to content
Merged
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
7 changes: 5 additions & 2 deletions docs/user-manual/react/api/hooks/use-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ function MyComponent() {

// Access application properties
console.log('Scene:', app.scene)
console.log('Camera:', app.scene.camera)

// Cameras are components on entities, so look them up from the root
const cameras = app.root.findComponents('camera')
console.log('Cameras:', cameras)

return null
}
```

A reference to the app gives you access to the scene, camera, systems, etc.
A reference to the app gives you access to the scene, root entity, systems, assets, events, etc.

## Application context

Expand Down