const RenderQueue=new Set;let stopped=!0;export const onRender=a=>(RenderQueue.add(a),()=>{RenderQueue.delete(a)});export const removeRender=a=>{RenderQueue.delete(a)};export const clear=()=>{RenderQueue.clear()};function render(a=0){stopped||(forceRender(a),requestAnimationFrame(render))}export const forceRender=(a=0)=>{RenderQueue.forEach(b=>b(a))};export const startRequestAnimationFrame=()=>{stopped&&(stopped=!1,render())};export const stopRequestAnimationFrame=()=>{stopped=!0};