@fxshelf/glyph-rain 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # @fxshelf/glyph-rain
2
+
3
+ Matrix-style glyph rain with cursor stir. Drop heads cast light onto page content when Chrome’s experimental **html-in-canvas** APIs are available; otherwise the rain still renders as a WebGL2 overlay.
4
+
5
+ Inspired by [Canvas UI Glyph Rain](https://canvasui.dev/docs/components/glyph-rain).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @fxshelf/glyph-rain
11
+ ```
12
+
13
+ ## React
14
+
15
+ ```tsx
16
+ import { GlyphRain } from '@fxshelf/glyph-rain'
17
+
18
+ export function Demo() {
19
+ return (
20
+ <GlyphRain style={{ height: 420 }} density={0.18} stir={0.8}>
21
+ <img src="/photo.jpg" alt="" style={{ width: '100%', display: 'block' }} />
22
+ </GlyphRain>
23
+ )
24
+ }
25
+ ```
26
+
27
+ ## Vue
28
+
29
+ ```vue
30
+ <script setup lang="ts">
31
+ import { GlyphRain } from '@fxshelf/glyph-rain/vue'
32
+ </script>
33
+
34
+ <template>
35
+ <GlyphRain :style="{ height: '420px' }" :density="0.18" :stir="0.8">
36
+ <img src="/photo.jpg" alt="" style="width: 100%; display: block" />
37
+ </GlyphRain>
38
+ </template>
39
+ ```
40
+
41
+ ## Browser notes
42
+
43
+ | Capability | Requirement |
44
+ |------------|-------------|
45
+ | Glyph rain overlay | WebGL2 |
46
+ | Content lighting / dim | Chrome experimental `drawElementImage` + `layoutsubtree` (html-in-canvas) |
47
+ | Cursor stir | Pointer events on the wrapper |
48
+
49
+ ## License
50
+
51
+ MIT