aether-dice 0.1.0 → 0.2.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/README.md +31 -3
- package/dist/aether-dice.esm.js +1901 -1743
- package/dist/aether-dice.esm.js.map +1 -1
- package/dist/assets/env.png +0 -0
- package/dist/assets/surface-normal.png +0 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ const result = await dice.roll(
|
|
|
63
63
|
| Option | Type | Default | Description |
|
|
64
64
|
|---|---|---|---|
|
|
65
65
|
| `container` | `HTMLElement` | — | Element the canvas overlay mounts into (required). |
|
|
66
|
-
| `assetPath` | `string` |
|
|
66
|
+
| `assetPath` | `string` | bundle-relative | Base URL for textures (env/normal maps). Defaults to the `assets/` folder shipped next to the bundle, so npm/jsDelivr consumers need no config; override with your own hosted path. |
|
|
67
67
|
| `theme` | `string \| object` | `'aether'` | Built-in theme name or a theme object. |
|
|
68
68
|
| `scale` | `number` | `6` | Die size. |
|
|
69
69
|
| `gravity` | `number` | `40` | Physics gravity. |
|
|
@@ -121,9 +121,19 @@ new AetherDice({ theme: { // custom (merged over aether
|
|
|
121
121
|
bloomStrength: 1.5, // overall bloom amount
|
|
122
122
|
bloomRadius: 0.6, // bloom spread
|
|
123
123
|
bloomThreshold:0, // luminance cutoff (0 = bloom all edge light)
|
|
124
|
+
envMap: 'env.png', // environment map for reflections (null to disable)
|
|
125
|
+
envIntensity: 1.0, // reflection strength
|
|
126
|
+
normalMap: 'surface-normal.png', // subtle surface detail (null to disable)
|
|
127
|
+
normalScale: 0.25, // normal map strength
|
|
124
128
|
}});
|
|
125
129
|
```
|
|
126
130
|
|
|
131
|
+
`envMap` and `normalMap` are filenames resolved against `assetPath`. AetherDice ships
|
|
132
|
+
default `env.png` (a studio environment giving the metallic dice reflections) and
|
|
133
|
+
`surface-normal.png` (a faint cast-glass surface) in its `assets/` folder; set either to
|
|
134
|
+
`null` to skip it. Textures load during `init()` and failures are non-fatal — the dice
|
|
135
|
+
just render without that map.
|
|
136
|
+
|
|
127
137
|
### Built-in themes
|
|
128
138
|
|
|
129
139
|
| Preview | Name | Look |
|
|
@@ -166,8 +176,26 @@ result to verify determinism.
|
|
|
166
176
|
## Distribution
|
|
167
177
|
|
|
168
178
|
Published to npm and consumable via jsDelivr. The public API above is the semver
|
|
169
|
-
stability contract.
|
|
170
|
-
`assetPath`
|
|
179
|
+
stability contract. The build emits `dist/aether-dice.esm.js` + `dist/assets/`, and both
|
|
180
|
+
ship in the npm tarball — the bundle resolves its default `assetPath` relative to itself,
|
|
181
|
+
so textures load with no configuration. Override `assetPath` only if you host the assets
|
|
182
|
+
elsewhere (e.g. a different CDN).
|
|
183
|
+
|
|
184
|
+
### Releasing
|
|
185
|
+
|
|
186
|
+
One command runs the whole flow — preflight, quality gate, version bump + tag, push,
|
|
187
|
+
npm publish, and a GitHub release with the bundle attached:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
npm run release # patch (0.1.0 -> 0.1.1)
|
|
191
|
+
npm run release -- minor # minor (0.1.0 -> 0.2.0)
|
|
192
|
+
npm run release -- major # major
|
|
193
|
+
npm run release -- 1.2.3 # explicit version
|
|
194
|
+
npm run release -- patch --dry-run # preflight + gate + pack preview, no changes
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
It aborts before mutating anything if the tree is dirty, the branch isn't `main`, the
|
|
198
|
+
branch is behind `origin`, npm isn't authenticated, or lint/tests/build fail.
|
|
171
199
|
|
|
172
200
|
## License
|
|
173
201
|
|