Document mousePositionD
This commit is contained in:
parent
e2c98669f9
commit
3c1799dcfd
1 changed files with 3 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
||||||
import {prism} from '@theatre/dataverse'
|
import {prism} from '@theatre/dataverse'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A derivation that holds the current mouse position.
|
||||||
|
*/
|
||||||
const mousePositionD = prism(() => {
|
const mousePositionD = prism(() => {
|
||||||
const [pos, setPos] = prism.state<MouseEvent | null>('pos', null)
|
const [pos, setPos] = prism.state<MouseEvent | null>('pos', null)
|
||||||
prism.effect(
|
prism.effect(
|
||||||
|
|
Loading…
Reference in a new issue