@jayf0x/fluidity-js 0.1.4 → 0.1.5
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/README.md +11 -13
- package/dist/globals.d.ts +1 -1
- package/dist/index.js +439 -434
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ export function Cover() {
|
|
|
54
54
|
|
|
55
55
|
```tsx
|
|
56
56
|
import { useRef } from 'react';
|
|
57
|
+
|
|
57
58
|
import { FluidText } from '@jayf0x/fluidity-js';
|
|
58
59
|
|
|
59
60
|
export function Interactive() {
|
|
@@ -81,16 +82,13 @@ More examples → [`demo/src/examples/`](./demo/src/examples/)
|
|
|
81
82
|
|
|
82
83
|
### FluidText
|
|
83
84
|
|
|
84
|
-
| Prop
|
|
85
|
-
|
|
|
86
|
-
| `text`
|
|
87
|
-
| `fontSize`
|
|
88
|
-
| `color`
|
|
89
|
-
| `fontFamily`
|
|
90
|
-
| `fontWeight`
|
|
91
|
-
| `textQuality` | `number` | `2` |
|
|
92
|
-
|
|
93
|
-
`textQuality` controls the oversample factor for text rendering. `2` (default) renders at 2× the simulation resolution before upload so edges are antialiased. Set to `1` for the exact simulation resolution; higher values are sharper but use more texture memory.
|
|
85
|
+
| Prop | Type | Default |
|
|
86
|
+
| ------------ | ------------------ | -------------- |
|
|
87
|
+
| `text` | `string` | — |
|
|
88
|
+
| `fontSize` | `number` | `100` |
|
|
89
|
+
| `color` | `string` | `'#ffffff'` |
|
|
90
|
+
| `fontFamily` | `string` | `'sans-serif'` |
|
|
91
|
+
| `fontWeight` | `string \| number` | `900` |
|
|
94
92
|
|
|
95
93
|
### FluidImage
|
|
96
94
|
|
|
@@ -167,11 +165,11 @@ More examples → [`demo/src/examples/`](./demo/src/examples/)
|
|
|
167
165
|
## Presets
|
|
168
166
|
|
|
169
167
|
```tsx
|
|
170
|
-
<FluidText text="
|
|
171
|
-
<FluidText text="
|
|
168
|
+
<FluidText text="Wicked" preset="neon" />
|
|
169
|
+
<FluidText text="Wicked" preset="calm" />
|
|
172
170
|
```
|
|
173
171
|
|
|
174
|
-
Available: `calm` · `
|
|
172
|
+
Available: `calm` · `sand` · `wave` · `neon` · `smoke`
|
|
175
173
|
|
|
176
174
|
`preset` is reactive — changing it re-applies the preset config. Any `config` values you pass override the preset. `algorithm` prop also overrides the preset's algorithm.
|
|
177
175
|
|
package/dist/globals.d.ts
CHANGED