Utilities
listenControl

listenControl

Listen to changes in a control.

 
import { useEffect } from 'react'
import { listenControl } from './effect-control'
 
export default function App({
 
  useEffect(() => {
    const onChange = (value) => {
      /* Do something */
    }
 
    const stopListening = listenControl('sphere-control-id', 'scale', onChange)
 
    return () => {
      stopListening()
    }
  }, [])
 
  return (
    <>
      ...
    </>
  )
}

Where to find the control ids.