Document mousePositionD

This commit is contained in:
Aria Minaei 2022-03-15 14:55:19 +01:00
parent e2c98669f9
commit 3c1799dcfd

View file

@ -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(