shardlight 0.1.0 → 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.
Files changed (2) hide show
  1. package/README.md +8 -7
  2. package/package.json +4 -3
package/README.md CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
3
  [![CI](https://github.com/jukrapopk/shardlight/actions/workflows/ci.yml/badge.svg)](https://github.com/jukrapopk/shardlight/actions/workflows/ci.yml)
4
4
  [![npm version](https://img.shields.io/npm/v/shardlight.svg)](https://www.npmjs.com/package/shardlight)
5
- [![license](https://img.shields.io/npm/l/shardlight.svg)](./LICENSE)
5
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jukrapopk/shardlight/blob/main/packages/shardlight/LICENSE)
6
6
  [![demo](https://img.shields.io/badge/demo-live-ffb454)](https://jukrapopk.github.io/shardlight/)
7
7
 
8
- Layered **shard** lens-flare lights that render the same in normal 2D React (DOM),
9
- [three.js](https://threejs.org) and [React Three Fiber](https://docs.pmnd.rs/react-three-fiber).
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
  ![shardlight presets: star, sun, sparkle, starburst, ember](https://raw.githubusercontent.com/jukrapopk/shardlight/main/assets/demo.png)
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 identical everywhere.
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 colour —
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 centred, rotated and coloured for you */ },
278
+ draw(ctx, p, env) { /* the context is centered, rotated and colored for you */ },
278
279
  });
279
280
  registerShardKind(dots);
280
281
 
@@ -325,4 +326,4 @@ compare against golden PNGs in `tests/visual/__screenshots__`, and check parity
325
326
 
326
327
  ## License
327
328
 
328
- MIT
329
+ [MIT](https://github.com/jukrapopk/shardlight/blob/main/packages/shardlight/LICENSE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shardlight",
3
- "version": "0.1.0",
4
- "description": "Layered shard lens-flare lights that render identically in 2D React (DOM), three.js and React Three Fiber.",
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.com/jukrapopk/shardlight#readme"
121
+ "homepage": "https://jukrapopk.github.io/shardlight/"
121
122
  }