Skip to content

Commit

Permalink
Fix documentation regarding removed hook variable
Browse files Browse the repository at this point in the history
Fixes #217
  • Loading branch information
partynikko committed Oct 10, 2019
1 parent b613000 commit 18c343f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions migration.md
Expand Up @@ -41,6 +41,8 @@ const {
} = useThree()
```

**[DEPRECATED]**: `useThree().canvas`. Replace by using `useThree().gl.domElement`.

#### useFrame(callback: (state, delta) => void, renderPriority: number = 0)

This hooks calls you back every frame, which is good for running effects, updating controls, etc. You receive the state (same as useThree) and a clock delta. If you supply a render priority greater than zero it will switch off automatic rendering entirely, you can then control rendering yourself. If you have multiple frames with a render priority then they are ordered highest priority last, similar to the web's z-index. Frames are managed, three-fiber will remove them automatically when the component that holds them is unmounted.
Expand Down
1 change: 0 additions & 1 deletion readme.md
Expand Up @@ -274,7 +274,6 @@ import { useThree } from 'react-three-fiber'

const {
gl, // WebGL renderer
canvas, // canvas the dom element that was created
scene, // Default scene
camera, // Default camera
size, // Bounds of the view (which stretches 100% and auto-adjusts)
Expand Down

0 comments on commit 18c343f

Please sign in to comment.