shardlight 0.1.1 → 0.1.2
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 +6 -5
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
[](https://github.com/jukrapopk/shardlight/blob/main/packages/shardlight/LICENSE)
|
|
6
6
|
[](https://jukrapopk.github.io/shardlight/)
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
[
|
|
8
|
+
Procedural lens-flare lights for React, [three.js](https://threejs.org) and
|
|
9
|
+
[React Three Fiber](https://r3f.docs.pmnd.rs/). Build a light once and it looks the same
|
|
10
|
+
everywhere.
|
|
10
11
|
|
|
11
12
|
A light is an ordered list of _shards_ (glows, rays, streak bundles, halos). Shards that
|
|
12
13
|
share a motion channel are baked into one image, then animated — scale, opacity and rotation —
|
|
@@ -15,7 +16,7 @@ with no re-rendering.
|
|
|
15
16
|

|
|
16
17
|
|
|
17
18
|
- **One light, three targets.** The same config renders to `<img>`, to three.js planes, and
|
|
18
|
-
to R3F meshes, and looks
|
|
19
|
+
to R3F meshes, and looks the same everywhere.
|
|
19
20
|
- **Easy by default.** `<ShardLight preset="star" />` draws a light; swap the preset, or start
|
|
20
21
|
from nothing.
|
|
21
22
|
- **Tunable at every level.** Preset → shards → per-shard motion → channel effects → per-frame
|
|
@@ -195,7 +196,7 @@ model.dispose();
|
|
|
195
196
|
|
|
196
197
|
## Control
|
|
197
198
|
|
|
198
|
-
Everything below animates without re-baking. Only changing a shard — its kind, params or
|
|
199
|
+
Everything below animates without re-baking. Only changing a shard — its kind, params or color —
|
|
199
200
|
bakes again, and only the layers that changed.
|
|
200
201
|
|
|
201
202
|
**Presets.** Start from a built-in, your own config object, or nothing:
|
|
@@ -274,7 +275,7 @@ const dots = defineShardKind({
|
|
|
274
275
|
kind: 'dots',
|
|
275
276
|
label: 'Ring of dots',
|
|
276
277
|
params: { count: { type: 'number', default: 12, min: 1, max: 64, step: 1 } },
|
|
277
|
-
draw(ctx, p, env) { /* the context is
|
|
278
|
+
draw(ctx, p, env) { /* the context is centered, rotated and colored for you */ },
|
|
278
279
|
});
|
|
279
280
|
registerShardKind(dots);
|
|
280
281
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shardlight",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Procedural lens-flare lights for React, three.js and React Three Fiber. Build a light once and it looks the same everywhere.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"sideEffects": [
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
},
|
|
91
91
|
"keywords": [
|
|
92
92
|
"lens-flare",
|
|
93
|
+
"procedural",
|
|
93
94
|
"flare",
|
|
94
95
|
"light",
|
|
95
96
|
"glow",
|
|
@@ -117,5 +118,5 @@
|
|
|
117
118
|
"bugs": {
|
|
118
119
|
"url": "https://github.com/jukrapopk/shardlight/issues"
|
|
119
120
|
},
|
|
120
|
-
"homepage": "https://github.
|
|
121
|
+
"homepage": "https://jukrapopk.github.io/shardlight/"
|
|
121
122
|
}
|