phoria2 1.0.0-rc.1 → 1.0.0-rc.3

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 CHANGED
@@ -7,7 +7,7 @@ business apps: charts, labelled scenes, diagrams, dashboards and product viewers
7
7
  - **Small**: about 46 KB gzipped for a lit, interactive scene; charts, particles and glTF are
8
8
  separate imports, and the heavier parts (shadows, HDR environments, GPU picking) load only when used.
9
9
  - **Idle when nothing changes**: a view draws only when something in it changed, so a dashboard of
10
- many views costs nothing at rest.
10
+ many views only updates when needed.
11
11
  - **Tells you what to write**: every option is checked, and a mistake throws an error that names
12
12
  the fix - pass `colour` and you get `Material: use 'color'`. Written to be easy for coding
13
13
  agents too.
@@ -27,6 +27,28 @@ Or straight from a CDN, with no build step:
27
27
  </script>
28
28
  ```
29
29
 
30
+ To use more than the core - charts, particles, glTF or motion - map each import to the package's own
31
+ files, so they share one copy of the core (the CDN's ready-made `+esm` builds each bundle their
32
+ own). Pin the version so a new release can't change your page:
33
+
34
+ ```html
35
+ <script type="importmap">
36
+ {
37
+ "imports": {
38
+ "phoria2": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.3/dist/phoria2.js",
39
+ "phoria2/charts": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.3/dist/charts.js",
40
+ "phoria2/particles": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.3/dist/particles.js",
41
+ "phoria2/gltf": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.3/dist/gltf.js",
42
+ "phoria2/motion": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.3/dist/motion.js"
43
+ }
44
+ }
45
+ </script>
46
+ <script type="module">
47
+ import { View } from 'phoria2'
48
+ import { chart } from 'phoria2/charts'
49
+ </script>
50
+ ```
51
+
30
52
  ## A first scene
31
53
 
32
54
  ```html
@@ -106,16 +128,17 @@ export function SpinningBox({ color }) {
106
128
  ```
107
129
 
108
130
  A full example, with a chart that follows its data, is in
109
- [`examples/react`](https://github.com/kevinroast/kevs3d/tree/master/phoria2/examples/react).
131
+ [`examples/react`](https://github.com/kevinroast/phoria2/tree/main/examples/react).
110
132
 
111
133
  ## What's in the package
112
134
 
113
135
  | Import | |
114
136
  |---|---|
115
- | `phoria2` | the view, scene graph, cameras, lights, materials, geometry, textures, picking, labels, `create()` from JSON |
137
+ | `phoria2` | the view, scene graph, cameras, lights, materials, geometry, curves, textures, picking, labels, `create()` from JSON |
116
138
  | `phoria2/charts` | `chart()` - charts from a spec of mark, data and channels, and the scales they use |
117
139
  | `phoria2/particles` | `Emitter` and `Body` |
118
140
  | `phoria2/gltf` | `loadGLTF()` - glTF 2.0 models with their materials and animations |
141
+ | `phoria2/motion` | `Timeline` - named steps played in order, `follow()` along a curve, `reveal()` a path as it's travelled - for explainers and guided tours |
119
142
 
120
143
  ## Browsers
121
144
 
@@ -123,9 +146,8 @@ Any browser with WebGL 2: current Chrome, Edge, Firefox and Safari (desktop and
123
146
 
124
147
  ## Examples
125
148
 
126
- The demo gallery shows each feature and a few showcase scenes; its source is in
127
- [`demos/`](https://github.com/kevinroast/kevs3d/tree/master/phoria2/demos). The design and the
128
- reasoning behind the API are in [`API-DESIGN.md`](https://github.com/kevinroast/kevs3d/blob/master/phoria2/API-DESIGN.md).
149
+ The [demo gallery](https://kevs3d.co.uk/phoria2/) shows each feature and a few showcase scenes;
150
+ its source is in [`demos/`](https://github.com/kevinroast/phoria2/tree/main/demos).
129
151
 
130
152
  ## Licence
131
153