~/notes/
notes
short lessons, one trap each
- Chrome blocks WebGL for a page after it resets the GPU "Web page caused context loss and was blocked" means Chrome now refuses new contexts for that page. Refreshing does not always help.
- Fetch before branching after merging a PR from the CLI gh pr merge merges on the server. Your local origin/main is still the old one until you fetch.
- Pause SVG animations when they are off-screen SMIL animations keep running when nobody can see them. SVGSVGElement has pauseAnimations() for exactly this.
- Software renderers hide GPU bugs SwiftShader is perfect for screenshots and blind to memory pressure, driver resets and real frame times.
- The same inline SVG twice means duplicate ids Gradients, paths for animateMotion and patterns are looked up by id in the whole document. Render the same SVG twice and the second copy points at the first.
- Vector-tile building ids are not unique Highlighting "the same building" by id lit up neighbours across the street. Filter by distance as well.