Recreate WebGL example as custom element, pause animation when in background