Skip to content

Commit 5cc7048

Browse files
authored
fix(retro-grid): replace the CSS perspective grid with a WebGL renderer (#928)
* fix(retro-grid): switch the grid renderer to raw webgl * fix(retro-grid): match webgl line rendering to the original css grid * fix(retro-grid): fine-tune webgl grid lines to match the css demo * fix(retro-grid): make the webgl grid scroll seamless * fix(retro-grid): reduce top grid density with distance-based lod * fix(retro-grid): keep the css fallback until webgl is ready * refactor(retro-grid): keep the webgl pipeline stable across prop updates * fix(retro-grid): recover gracefully from webgl context loss * fix(retro-grid): normalize fallback props to match the webgl renderer * fix(retro-grid): preserve line color alpha in the webgl shader * fix(retro-grid): resolve css colors via canvas pixels for webgl parity
1 parent 1a4ebf4 commit 5cc7048

9 files changed

Lines changed: 1626 additions & 130 deletions

File tree

apps/www/content/docs/components/retro-grid.mdx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,7 @@ npx shadcn@latest add @magicui/retro-grid
3535

3636
<Step>Update the import paths to match your project setup.</Step>
3737

38-
<Step>Add the required CSS animations</Step>
39-
40-
Add the following animations to your global CSS file.
41-
42-
```css title="app/globals.css" showLineNumbers {2, 4-11}
43-
@theme inline {
44-
--animate-grid: grid 15s linear infinite;
45-
46-
@keyframes grid {
47-
0% {
48-
transform: translateY(-50%);
49-
}
50-
100% {
51-
transform: translateY(0);
52-
}
53-
}
54-
}
55-
```
38+
<Step>No additional CSS is required.</Step>
5639

5740
</Steps>
5841

0 commit comments

Comments
 (0)