phoria2 1.0.0-rc.7 → 1.0.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 (82) hide show
  1. package/README.md +26 -6
  2. package/dist/bloom.js +1 -1
  3. package/dist/charts.js +408 -408
  4. package/dist/charts.js.map +1 -1
  5. package/dist/core.js +1069 -1208
  6. package/dist/core.js.map +1 -1
  7. package/dist/edit.js +43 -43
  8. package/dist/edit.js.map +1 -1
  9. package/dist/explain.js +1 -1
  10. package/dist/gltf.js +168 -162
  11. package/dist/gltf.js.map +1 -1
  12. package/dist/motion.js +30 -30
  13. package/dist/motion.js.map +1 -1
  14. package/dist/particles.js +46 -46
  15. package/dist/particles.js.map +1 -1
  16. package/dist/passes.js +33 -33
  17. package/dist/passes.js.map +1 -1
  18. package/dist/phoria2.js +1 -1
  19. package/dist/picking.js +14 -14
  20. package/dist/picking.js.map +1 -1
  21. package/dist/snapshot.js +1 -1
  22. package/dist/tooltip.js +3 -3
  23. package/dist/tooltip.js.map +1 -1
  24. package/dist/types/OrbitControl.d.ts +0 -10
  25. package/dist/types/Raycaster.d.ts +0 -16
  26. package/dist/types/View.d.ts +0 -8
  27. package/dist/types/charts/Chart.d.ts +0 -2
  28. package/dist/types/charts/scales.d.ts +0 -5
  29. package/dist/types/clip.d.ts +0 -6
  30. package/dist/types/fog.d.ts +0 -6
  31. package/dist/types/frame.d.ts +0 -2
  32. package/dist/types/geometry/Geometry.d.ts +0 -4
  33. package/dist/types/geometry/generators.d.ts +10 -4
  34. package/dist/types/gltf/Animation.d.ts +0 -4
  35. package/dist/types/gltf/load.d.ts +6 -0
  36. package/dist/types/index.d.ts +1 -2
  37. package/dist/types/material/Material.d.ts +5 -22
  38. package/dist/types/material/Texture.d.ts +0 -6
  39. package/dist/types/particles/Emitter.d.ts +0 -4
  40. package/dist/types/registry.d.ts +0 -2
  41. package/dist/types/scene/Node.d.ts +13 -40
  42. package/dist/types/scene/Scene.d.ts +0 -4
  43. package/dist/types/scene/cameras.d.ts +0 -12
  44. package/dist/types/scene/drawables.d.ts +0 -42
  45. package/dist/types/scene/lights.d.ts +0 -38
  46. package/dist/types/value/Color.d.ts +0 -2
  47. package/dist/types/value/Euler.d.ts +0 -2
  48. package/dist/types/value/Quat.d.ts +0 -4
  49. package/dist/types/value/Vec3.d.ts +0 -7
  50. package/dist/types/webgl/WebGLRenderer.d.ts +0 -19
  51. package/dist/types/webgl/shaders.d.ts +1 -1
  52. package/llms-full.txt +120 -8
  53. package/llms.txt +2 -1
  54. package/package.json +3 -1
  55. package/schema/chart.schema.json +1 -1
  56. package/schema/scene.schema.json +1149 -0
  57. package/src/Raycaster.js +2 -2
  58. package/src/View.js +2 -2
  59. package/src/charts/Chart.js +1 -1
  60. package/src/clip.js +1 -1
  61. package/src/fog.js +1 -1
  62. package/src/frame.js +1 -1
  63. package/src/geometry/Geometry.js +4 -3
  64. package/src/geometry/generators.js +12 -7
  65. package/src/gltf/Animation.js +1 -1
  66. package/src/gltf/load.js +9 -0
  67. package/src/index.js +1 -2
  68. package/src/material/Material.js +10 -9
  69. package/src/material/Texture.js +2 -2
  70. package/src/particles/Emitter.js +2 -2
  71. package/src/scene/Node.js +20 -5
  72. package/src/scene/Scene.js +2 -2
  73. package/src/scene/cameras.js +6 -6
  74. package/src/scene/drawables.js +14 -12
  75. package/src/scene/lights.js +19 -19
  76. package/src/value/Color.js +1 -1
  77. package/src/value/Euler.js +1 -1
  78. package/src/value/Quat.js +2 -2
  79. package/src/value/Vec3.js +1 -1
  80. package/src/watch.js +1 -1
  81. package/src/webgl/WebGLRenderer.js +11 -3
  82. package/src/webgl/shaders.js +3 -0
package/README.md CHANGED
@@ -56,12 +56,12 @@ own). Pin the version so a new release can't change your page:
56
56
  <script type="importmap">
57
57
  {
58
58
  "imports": {
59
- "phoria2": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.7/dist/phoria2.js",
60
- "phoria2/charts": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.7/dist/charts.js",
61
- "phoria2/particles": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.7/dist/particles.js",
62
- "phoria2/gltf": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.7/dist/gltf.js",
63
- "phoria2/motion": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.7/dist/motion.js",
64
- "phoria2/edit": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0-rc.7/dist/edit.js"
59
+ "phoria2": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0/dist/phoria2.js",
60
+ "phoria2/charts": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0/dist/charts.js",
61
+ "phoria2/particles": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0/dist/particles.js",
62
+ "phoria2/gltf": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0/dist/gltf.js",
63
+ "phoria2/motion": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0/dist/motion.js",
64
+ "phoria2/edit": "https://cdn.jsdelivr.net/npm/phoria2@1.0.0/dist/edit.js"
65
65
  }
66
66
  }
67
67
  </script>
@@ -162,6 +162,26 @@ A full example, with a chart that follows its data, is in
162
162
  | `phoria2/gltf` | `loadGLTF()` - glTF 2.0 models with their materials and animations |
163
163
  | `phoria2/motion` | `Timeline` - named steps played in order, `follow()` along a curve, `reveal()` a path as it's travelled - for explainers and guided tours |
164
164
  | `phoria2/edit` | `TransformHandle` - a move and turn handle with grid and angle snapping - and `History` for undo, for planners and layout editors |
165
+ | `phoria2/schema.json`, `phoria2/charts/schema.json` | JSON Schemas for scene descriptions (`create()`) and chart specs |
166
+
167
+ ## Versioning
168
+
169
+ phoria2 follows [semver](https://semver.org) from 1.0: no 1.x release breaks code written against
170
+ what is documented.
171
+
172
+ - **Covered:** what the entry points above export, as the [reference](https://kevs3d.co.uk/phoria2/llms-full.txt) and the
173
+ published types describe it - names, options and their defaults, and what they do. The formats
174
+ `create()` reads and `toJSON()` writes, and chart specs, as their JSON Schemas describe them. The
175
+ conventions: +Y up, metres, radians, sRGB colour in, and light intensities - a scene keeps its
176
+ colours and its brightness from one 1.x release to the next.
177
+ - **Not covered:** exact pixels, since drawing can get better (smoother edges, softer shadows); the
178
+ wording of errors and warnings (catch `PhoriaError`, not its message); modules imported from
179
+ `phoria2/src/...` directly, members left out of the types, and the shape of
180
+ `NullRenderer.lastFrame`; the demos.
181
+ - **Minor releases add:** options, methods, node types, chart marks. A new option's default keeps
182
+ what happened before.
183
+ - **Nothing is removed or renamed in 1.x.** What 2.0 will drop is deprecated first: a 1.x release
184
+ keeps it working and warns once in the console, saying exactly what to write instead.
165
185
 
166
186
  ## Browsers
167
187
 
package/dist/bloom.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as e, N as t } from "./core.js";
1
+ import { j as e, k as t } from "./core.js";
2
2
  // src/webgl/bloom.js
3
3
  var n = `precision highp float;
4
4
  in vec2 vUv;