@materials3d/react 0.1.0 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +11 -11
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -30,16 +30,16 @@ motion and Save-Data, with three code-split out of the initial bundle.
30
30
 
31
31
  Precedence: the defaults, then `preset`, then the flat props, then `config`.
32
32
 
33
- | prop | notes |
34
- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35
- | `preset` | a name (`"skewer"`, `"assembly"`, `"staircase"`, `"slimes"`, `"reactions"`, `"materials"`, `"prism"`, `"orb"`) or a function returning a config. A name lazy-loads the presets chunk; a function is tree-shakeable. |
36
- | `config` | a full or partial config, applied last |
37
- | `lamps`, `lampGain`, `background`, `transparentBackground`, `clearGlass` | the light field and the backdrop |
38
- | `post`, `motion`, `scatter` | merged onto what the preset authored, so `scatter={{ count: 24 }}` re-scatters the reference scene; `motion` applies to every shape |
39
- | `orbit`, `quality`, `dprMax`, `paused` | live |
40
- | `poster`, `posterFit`, `lazy`, `webgl`, `minSizeForWebGL`, `respectReducedMotion`, `renderer` | shell options, read at mount only. Changing one on a mounted component does nothing until it remounts. |
41
- | `onReady(renderer)`, `onFallback(reason)` | callbacks; the latest ones are called without a remount |
42
- | `className`, `style`, `children` | the `<div>` |
33
+ | prop | notes |
34
+ | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35
+ | `preset` | a name (`"skewer"`, `"assembly"`, `"staircase"`, `"slimes"`, `"reactions"`, `"materials"`, `"prism"`, `"knot"`) or a function returning a config. A name lazy-loads the presets chunk; a function is tree-shakeable. |
36
+ | `config` | a full or partial config, applied last |
37
+ | `lamps`, `lampGain`, `background`, `transparentBackground`, `clearGlass` | the light field and the backdrop |
38
+ | `post`, `motion`, `scatter` | merged onto what the preset authored, so `scatter={{ count: 24 }}` re-scatters the reference scene; `motion` applies to every shape |
39
+ | `orbit`, `quality`, `dprMax`, `paused` | live |
40
+ | `poster`, `posterFit`, `lazy`, `webgl`, `minSizeForWebGL`, `respectReducedMotion`, `renderer` | shell options, read at mount only. Changing one on a mounted component does nothing until it remounts. |
41
+ | `onReady(renderer)`, `onFallback(reason)` | callbacks; the latest ones are called without a remount |
42
+ | `className`, `style`, `children` | the `<div>` |
43
43
 
44
44
  Config-shaped props update the live scene through the handle. A changed shape list or scatter
45
45
  rebuilds geometry; everything else pushes uniforms.
@@ -58,7 +58,7 @@ export function Hero() {
58
58
  const ref = useRef<MaterialHandle>(null);
59
59
  return (
60
60
  <>
61
- <Materials3D ref={ref} preset="orb" poster="/orb.webp" style={{ height: 480 }} />
61
+ <Materials3D ref={ref} preset="knot" poster="/knot.webp" style={{ height: 480 }} />
62
62
  <button onClick={() => ref.current?.pause()}>Pause</button>
63
63
  </>
64
64
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@materials3d/react",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Drop-in Materials3D scene for React: the <Materials3D> component",
5
5
  "keywords": [
6
6
  "background",
@@ -36,7 +36,7 @@
36
36
  "access": "public"
37
37
  },
38
38
  "dependencies": {
39
- "@materials3d/core": "^0.1.0"
39
+ "@materials3d/core": "^0.3.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/react": "^19.0.0",