tosijs-3d 0.8.15 → 0.10.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/CHANGELOG.md +346 -2
- package/Migration.md +135 -3
- package/README.md +61 -32
- package/dist/aim.js +1 -1
- package/dist/ambient-budget.js +3 -3
- package/dist/ambient-budget.js.map +1 -1
- package/dist/ambient-leaves.js +1 -1
- package/dist/ambient-leaves.js.map +1 -1
- package/dist/angle-field.d.ts +0 -4
- package/dist/angle-field.d.ts.map +1 -1
- package/dist/angle-field.js +1 -1
- package/dist/angle-field.js.map +1 -1
- package/dist/animation-layers.js +1 -1
- package/dist/arc.js +1 -1
- package/dist/arc.js.map +1 -1
- package/dist/asset-url.js +1 -1
- package/dist/asset-url.js.map +1 -1
- package/dist/atmosphere.d.ts +8 -0
- package/dist/atmosphere.d.ts.map +1 -1
- package/dist/atmosphere.js +12 -3
- package/dist/atmosphere.js.map +1 -1
- package/dist/b3d-aircraft.js +3 -3
- package/dist/b3d-aircraft.js.map +1 -1
- package/dist/b3d-ambient.js +1 -1
- package/dist/b3d-ambient.js.map +1 -1
- package/dist/b3d-beacon.js +1 -1
- package/dist/b3d-beacon.js.map +1 -1
- package/dist/b3d-biped.d.ts +2 -0
- package/dist/b3d-biped.d.ts.map +1 -1
- package/dist/b3d-biped.js +53 -7
- package/dist/b3d-biped.js.map +1 -1
- package/dist/b3d-black-hole.js +6 -6
- package/dist/b3d-black-hole.js.map +1 -1
- package/dist/b3d-car.js +1 -1
- package/dist/b3d-car.js.map +1 -1
- package/dist/b3d-cloud-deck.d.ts +1 -0
- package/dist/b3d-cloud-deck.d.ts.map +1 -1
- package/dist/b3d-cloud-deck.js +3 -4
- package/dist/b3d-cloud-deck.js.map +1 -1
- package/dist/b3d-clouds.js +1 -1
- package/dist/b3d-clouds.js.map +1 -1
- package/dist/b3d-collisions.js +1 -1
- package/dist/b3d-collisions.js.map +1 -1
- package/dist/b3d-controllable.js +1 -1
- package/dist/b3d-controllable.js.map +1 -1
- package/dist/b3d-crowd.js +1 -1
- package/dist/b3d-crowd.js.map +1 -1
- package/dist/b3d-death.js +1 -1
- package/dist/b3d-death.js.map +1 -1
- package/dist/b3d-decorator.d.ts +21 -1
- package/dist/b3d-decorator.d.ts.map +1 -1
- package/dist/b3d-decorator.js +58 -14
- package/dist/b3d-decorator.js.map +1 -1
- package/dist/b3d-destroyable.js +1 -1
- package/dist/b3d-destroyable.js.map +1 -1
- package/dist/b3d-elevator.d.ts +1 -0
- package/dist/b3d-elevator.d.ts.map +1 -1
- package/dist/b3d-elevator.js +3 -4
- package/dist/b3d-elevator.js.map +1 -1
- package/dist/b3d-exploder.js +1 -1
- package/dist/b3d-exploder.js.map +1 -1
- package/dist/b3d-fog.js +1 -1
- package/dist/b3d-fog.js.map +1 -1
- package/dist/b3d-galaxy.d.ts +0 -6
- package/dist/b3d-galaxy.d.ts.map +1 -1
- package/dist/b3d-galaxy.js +1 -15
- package/dist/b3d-galaxy.js.map +1 -1
- package/dist/b3d-hud.d.ts.map +1 -1
- package/dist/b3d-hud.js +16 -6
- package/dist/b3d-hud.js.map +1 -1
- package/dist/b3d-input-focus.js +1 -1
- package/dist/b3d-input-focus.js.map +1 -1
- package/dist/b3d-interactive.js +1 -1
- package/dist/b3d-interactive.js.map +1 -1
- package/dist/b3d-lamp.js +1 -1
- package/dist/b3d-lamp.js.map +1 -1
- package/dist/b3d-launcher.js +1 -1
- package/dist/b3d-launcher.js.map +1 -1
- package/dist/b3d-library.js +1 -1
- package/dist/b3d-library.js.map +1 -1
- package/dist/b3d-light-shafts.d.ts +1 -0
- package/dist/b3d-light-shafts.d.ts.map +1 -1
- package/dist/b3d-light-shafts.js +11 -2
- package/dist/b3d-light-shafts.js.map +1 -1
- package/dist/b3d-light.js +2 -2
- package/dist/b3d-light.js.map +1 -1
- package/dist/b3d-lightning.d.ts +3 -0
- package/dist/b3d-lightning.d.ts.map +1 -1
- package/dist/b3d-lightning.js +62 -6
- package/dist/b3d-lightning.js.map +1 -1
- package/dist/b3d-loader.js +1 -1
- package/dist/b3d-loader.js.map +1 -1
- package/dist/b3d-manipulator.d.ts +0 -4
- package/dist/b3d-manipulator.d.ts.map +1 -1
- package/dist/b3d-manipulator.js +4 -9
- package/dist/b3d-manipulator.js.map +1 -1
- package/dist/b3d-moon.js +1 -1
- package/dist/b3d-moon.js.map +1 -1
- package/dist/b3d-panel.js +1 -1
- package/dist/b3d-panel.js.map +1 -1
- package/dist/b3d-particles.js +2 -2
- package/dist/b3d-particles.js.map +1 -1
- package/dist/b3d-physics.js +1 -1
- package/dist/b3d-physics.js.map +1 -1
- package/dist/b3d-planet.js +1 -1
- package/dist/b3d-planet.js.map +1 -1
- package/dist/b3d-primitives.d.ts.map +1 -1
- package/dist/b3d-primitives.js +70 -0
- package/dist/b3d-primitives.js.map +1 -1
- package/dist/b3d-probe.js +1 -1
- package/dist/b3d-probe.js.map +1 -1
- package/dist/b3d-prop.js +1 -1
- package/dist/b3d-prop.js.map +1 -1
- package/dist/b3d-quality.d.ts.map +1 -1
- package/dist/b3d-quality.js +19 -1
- package/dist/b3d-quality.js.map +1 -1
- package/dist/b3d-radar-blip.js +1 -1
- package/dist/b3d-radar-blip.js.map +1 -1
- package/dist/b3d-radar.js +1 -1
- package/dist/b3d-radar.js.map +1 -1
- package/dist/b3d-reflections.js +1 -1
- package/dist/b3d-reflections.js.map +1 -1
- package/dist/b3d-shadows.js +2 -2
- package/dist/b3d-shadows.js.map +1 -1
- package/dist/b3d-skybox.d.ts.map +1 -1
- package/dist/b3d-skybox.js +50 -2
- package/dist/b3d-skybox.js.map +1 -1
- package/dist/b3d-sound.js +1 -1
- package/dist/b3d-sound.js.map +1 -1
- package/dist/b3d-spawner.js +1 -1
- package/dist/b3d-spawner.js.map +1 -1
- package/dist/b3d-ssao.js +1 -1
- package/dist/b3d-ssao.js.map +1 -1
- package/dist/b3d-star-system.js +1 -1
- package/dist/b3d-star-system.js.map +1 -1
- package/dist/b3d-star.js +1 -1
- package/dist/b3d-star.js.map +1 -1
- package/dist/b3d-svg-plane.js +3 -3
- package/dist/b3d-svg-plane.js.map +1 -1
- package/dist/b3d-terrain.d.ts.map +1 -1
- package/dist/b3d-terrain.js +27 -10
- package/dist/b3d-terrain.js.map +1 -1
- package/dist/b3d-trail.js +1 -1
- package/dist/b3d-trail.js.map +1 -1
- package/dist/b3d-trigger.d.ts +0 -4
- package/dist/b3d-trigger.d.ts.map +1 -1
- package/dist/b3d-trigger.js +10 -14
- package/dist/b3d-trigger.js.map +1 -1
- package/dist/b3d-turret.js +1 -1
- package/dist/b3d-turret.js.map +1 -1
- package/dist/b3d-utils.d.ts +29 -0
- package/dist/b3d-utils.d.ts.map +1 -1
- package/dist/b3d-utils.js +79 -2
- package/dist/b3d-utils.js.map +1 -1
- package/dist/b3d-warhead.d.ts.map +1 -1
- package/dist/b3d-warhead.js +37 -11
- package/dist/b3d-warhead.js.map +1 -1
- package/dist/b3d-water.d.ts +29 -0
- package/dist/b3d-water.d.ts.map +1 -1
- package/dist/b3d-water.js +390 -18
- package/dist/b3d-water.js.map +1 -1
- package/dist/b3d-weather-cell.js +1 -1
- package/dist/b3d-weather-cell.js.map +1 -1
- package/dist/ballistics.d.ts.map +1 -1
- package/dist/ballistics.js +32 -10
- package/dist/ballistics.js.map +1 -1
- package/dist/biome-chart.d.ts +21 -0
- package/dist/biome-chart.d.ts.map +1 -1
- package/dist/biome-chart.js +39 -1
- package/dist/biome-chart.js.map +1 -1
- package/dist/biome-plugin.d.ts +36 -0
- package/dist/biome-plugin.d.ts.map +1 -1
- package/dist/biome-plugin.js +176 -7
- package/dist/biome-plugin.js.map +1 -1
- package/dist/bone-mask.js +2 -2
- package/dist/box.d.ts +3 -7
- package/dist/box.d.ts.map +1 -1
- package/dist/box.js +5 -7
- package/dist/box.js.map +1 -1
- package/dist/buoyancy.js +1 -1
- package/dist/buoyancy.js.map +1 -1
- package/dist/camera-fit.js +2 -2
- package/dist/carve.js +1 -1
- package/dist/carve.js.map +1 -1
- package/dist/caustics.js +1 -1
- package/dist/caustics.js.map +1 -1
- package/dist/cloud-field.d.ts.map +1 -1
- package/dist/cloud-field.js +15 -5
- package/dist/cloud-field.js.map +1 -1
- package/dist/cloud-shadows.d.ts +3 -0
- package/dist/cloud-shadows.d.ts.map +1 -1
- package/dist/cloud-shadows.js +22 -1
- package/dist/cloud-shadows.js.map +1 -1
- package/dist/color-field.d.ts +0 -2
- package/dist/color-field.d.ts.map +1 -1
- package/dist/color-field.js +1 -1
- package/dist/color-field.js.map +1 -1
- package/dist/color.js +1 -1
- package/dist/color.js.map +1 -1
- package/dist/control-input.js +1 -1
- package/dist/control-input.js.map +1 -1
- package/dist/cost-sweep.d.ts +92 -0
- package/dist/cost-sweep.d.ts.map +1 -0
- package/dist/cost-sweep.js +213 -0
- package/dist/cost-sweep.js.map +1 -0
- package/dist/curve-field.d.ts +2 -6
- package/dist/curve-field.d.ts.map +1 -1
- package/dist/curve-field.js +2 -3
- package/dist/curve-field.js.map +1 -1
- package/dist/curve-program.js +1 -1
- package/dist/curve-program.js.map +1 -1
- package/dist/curve.js +1 -1
- package/dist/curve.js.map +1 -1
- package/dist/debug-sink.d.ts +6 -0
- package/dist/debug-sink.d.ts.map +1 -0
- package/dist/debug-sink.js +42 -0
- package/dist/debug-sink.js.map +1 -0
- package/dist/demo-utils.js +1 -1
- package/dist/demo-utils.js.map +1 -1
- package/dist/destroyable-behavior.js +1 -1
- package/dist/destroyable-behavior.js.map +1 -1
- package/dist/destroyable.d.ts.map +1 -1
- package/dist/destroyable.js +31 -0
- package/dist/destroyable.js.map +1 -1
- package/dist/dialog-placement.js +1 -1
- package/dist/dialog-placement.js.map +1 -1
- package/dist/draw-order.d.ts +23 -0
- package/dist/draw-order.d.ts.map +1 -0
- package/dist/draw-order.js +47 -0
- package/dist/draw-order.js.map +1 -0
- package/dist/embed-font.js +1 -1
- package/dist/embed-font.js.map +1 -1
- package/dist/flow-layout.js +1 -1
- package/dist/fly-by-wire.d.ts.map +1 -1
- package/dist/fly-by-wire.js +35 -20
- package/dist/fly-by-wire.js.map +1 -1
- package/dist/footprint-field.d.ts +1 -5
- package/dist/footprint-field.d.ts.map +1 -1
- package/dist/footprint-field.js +2 -3
- package/dist/footprint-field.js.map +1 -1
- package/dist/formations.js +1 -1
- package/dist/formations.js.map +1 -1
- package/dist/frame-panel.js +1 -1
- package/dist/frame-panel.js.map +1 -1
- package/dist/galaxy-data.d.ts +0 -16
- package/dist/galaxy-data.d.ts.map +1 -1
- package/dist/galaxy-data.js +9 -34
- package/dist/galaxy-data.js.map +1 -1
- package/dist/game-controller.js +1 -1
- package/dist/game-controller.js.map +1 -1
- package/dist/gamepad-focus.js +1 -1
- package/dist/gamepad-focus.js.map +1 -1
- package/dist/gamepad-svg.js +1 -1
- package/dist/gamepad-svg.js.map +1 -1
- package/dist/glass-gamepad.js +1 -1
- package/dist/glass-gamepad.js.map +1 -1
- package/dist/glb-manifest.js +1 -1
- package/dist/glb-manifest.js.map +1 -1
- package/dist/gradient-filter.d.ts.map +1 -1
- package/dist/gradient-filter.js +25 -0
- package/dist/gradient-filter.js.map +1 -1
- package/dist/guidance.d.ts.map +1 -1
- package/dist/guidance.js +29 -12
- package/dist/guidance.js.map +1 -1
- package/dist/handler-of.d.ts +5 -2
- package/dist/handler-of.d.ts.map +1 -1
- package/dist/handler-of.js +26 -20
- package/dist/handler-of.js.map +1 -1
- package/dist/hardware-gamepad.js +1 -1
- package/dist/hardware-gamepad.js.map +1 -1
- package/dist/hud-math.js +1 -1
- package/dist/hud-math.js.map +1 -1
- package/dist/hud.js +1 -1
- package/dist/hud.js.map +1 -1
- package/dist/icon-grid.js +1 -1
- package/dist/icon-grid.js.map +1 -1
- package/dist/icon-name.js +1 -1
- package/dist/icon-name.js.map +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/interaction.js +1 -1
- package/dist/interaction.js.map +1 -1
- package/dist/interactive-behavior.js +1 -1
- package/dist/interactive-behavior.js.map +1 -1
- package/dist/key-layout.js +1 -1
- package/dist/key-layout.js.map +1 -1
- package/dist/keyboard-gamepad.js +1 -1
- package/dist/keyboard-gamepad.js.map +1 -1
- package/dist/keyboard.d.ts +1 -17
- package/dist/keyboard.d.ts.map +1 -1
- package/dist/keyboard.js +3 -11
- package/dist/keyboard.js.map +1 -1
- package/dist/land-and-sky.js +54 -26
- package/dist/land-and-sky.js.map +1 -1
- package/dist/landform.js +1 -1
- package/dist/landform.js.map +1 -1
- package/dist/library-mesh.js +1 -1
- package/dist/library-mesh.js.map +1 -1
- package/dist/light-editor.js +1 -1
- package/dist/light-editor.js.map +1 -1
- package/dist/light-modulation.js +1 -1
- package/dist/light-rays.js +1 -1
- package/dist/light-rays.js.map +1 -1
- package/dist/light-settings.js +1 -1
- package/dist/light-settings.js.map +1 -1
- package/dist/lightning.js +1 -1
- package/dist/lightning.js.map +1 -1
- package/dist/make-mesh.js +1 -1
- package/dist/make-mesh.js.map +1 -1
- package/dist/manipulator-view.js +1 -1
- package/dist/manipulator-view.js.map +1 -1
- package/dist/manipulator.js +1 -1
- package/dist/manipulator.js.map +1 -1
- package/dist/mantle.js +1 -1
- package/dist/mantle.js.map +1 -1
- package/dist/medium.js +1 -1
- package/dist/medium.js.map +1 -1
- package/dist/mersenne-twister.d.ts +1 -1
- package/dist/mersenne-twister.d.ts.map +1 -1
- package/dist/mersenne-twister.js +11 -2
- package/dist/mersenne-twister.js.map +1 -1
- package/dist/min-sim-conformance.d.ts +6 -0
- package/dist/min-sim-conformance.d.ts.map +1 -1
- package/dist/min-sim-conformance.js +45 -5
- package/dist/min-sim-conformance.js.map +1 -1
- package/dist/noise-volume.d.ts +6 -0
- package/dist/noise-volume.d.ts.map +1 -0
- package/dist/noise-volume.js +79 -0
- package/dist/noise-volume.js.map +1 -0
- package/dist/panel-layer.d.ts.map +1 -1
- package/dist/panel-layer.js +10 -1
- package/dist/panel-layer.js.map +1 -1
- package/dist/panel-orbit.js +1 -1
- package/dist/panel-orbit.js.map +1 -1
- package/dist/patch-field.js +1 -1
- package/dist/patch-field.js.map +1 -1
- package/dist/perf-probe.d.ts +19 -0
- package/dist/perf-probe.d.ts.map +1 -1
- package/dist/perf-probe.js +10 -1
- package/dist/perf-probe.js.map +1 -1
- package/dist/perlin-noise.d.ts.map +1 -1
- package/dist/perlin-noise.js +22 -1
- package/dist/perlin-noise.js.map +1 -1
- package/dist/picker.d.ts +0 -2
- package/dist/picker.d.ts.map +1 -1
- package/dist/picker.js +1 -1
- package/dist/picker.js.map +1 -1
- package/dist/playground.js +1 -1
- package/dist/popup-chrome.js +1 -1
- package/dist/popup-chrome.js.map +1 -1
- package/dist/popup-surface.d.ts +2 -3
- package/dist/popup-surface.d.ts.map +1 -1
- package/dist/popup-surface.js +36 -13
- package/dist/popup-surface.js.map +1 -1
- package/dist/portal-transform.js +1 -1
- package/dist/portal-transform.js.map +1 -1
- package/dist/prefab.js +1 -1
- package/dist/prefab.js.map +1 -1
- package/dist/procedural-rock.js +1 -1
- package/dist/procedural-rock.js.map +1 -1
- package/dist/province-climate.js +1 -1
- package/dist/province-climate.js.map +1 -1
- package/dist/radar.js +2 -2
- package/dist/radar.js.map +1 -1
- package/dist/resource.d.ts.map +1 -1
- package/dist/resource.js +21 -9
- package/dist/resource.js.map +1 -1
- package/dist/rocket-ascent.js +1 -1
- package/dist/rounded-rect.js +1 -1
- package/dist/rounded-rect.js.map +1 -1
- package/dist/scatter.d.ts +47 -2
- package/dist/scatter.d.ts.map +1 -1
- package/dist/scatter.js +130 -9
- package/dist/scatter.js.map +1 -1
- package/dist/scene-schemas.d.ts.map +1 -1
- package/dist/scene-schemas.js +27 -3
- package/dist/scene-schemas.js.map +1 -1
- package/dist/sdf-lattice.js +1 -1
- package/dist/sdf-lattice.js.map +1 -1
- package/dist/selection.js +1 -1
- package/dist/selection.js.map +1 -1
- package/dist/shadow-decal.js +1 -1
- package/dist/shadow-decal.js.map +1 -1
- package/dist/skybox-baker.js +1 -1
- package/dist/slope-profile.js +1 -1
- package/dist/slope-profile.js.map +1 -1
- package/dist/spatial-transform.js +1 -1
- package/dist/spatial-transform.js.map +1 -1
- package/dist/spectral-classes.js +5 -5
- package/dist/star-populations.js +1 -1
- package/dist/star-populations.js.map +1 -1
- package/dist/starfield-codec.js +1 -1
- package/dist/starfield-codec.js.map +1 -1
- package/dist/surface.d.ts +1 -3
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +2 -2
- package/dist/surface.js.map +1 -1
- package/dist/surroundings-probe.js +1 -1
- package/dist/surroundings.js +1 -1
- package/dist/svg-icons.js +2 -2
- package/dist/svg-icons.js.map +1 -1
- package/dist/svg-texture.d.ts +12 -0
- package/dist/svg-texture.d.ts.map +1 -1
- package/dist/svg-texture.js +20 -2
- package/dist/svg-texture.js.map +1 -1
- package/dist/swim-aim.js +1 -1
- package/dist/swim-aim.js.map +1 -1
- package/dist/table-layout.js +1 -1
- package/dist/table-layout.js.map +1 -1
- package/dist/table.d.ts +0 -4
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +2 -2
- package/dist/table.js.map +1 -1
- package/dist/terrain-editor.d.ts +0 -2
- package/dist/terrain-editor.d.ts.map +1 -1
- package/dist/terrain-editor.js +1 -1
- package/dist/terrain-editor.js.map +1 -1
- package/dist/terrain-grid.d.ts.map +1 -1
- package/dist/terrain-grid.js +22 -0
- package/dist/terrain-grid.js.map +1 -1
- package/dist/text-edit.js +1 -1
- package/dist/text-edit.js.map +1 -1
- package/dist/text-entry.js +1 -1
- package/dist/text-entry.js.map +1 -1
- package/dist/theme-editor.d.ts +0 -2
- package/dist/theme-editor.d.ts.map +1 -1
- package/dist/theme-editor.js +4 -4
- package/dist/theme-editor.js.map +1 -1
- package/dist/tosi-b3d.d.ts +48 -2
- package/dist/tosi-b3d.d.ts.map +1 -1
- package/dist/tosi-b3d.js +461 -15
- package/dist/tosi-b3d.js.map +1 -1
- package/dist/touch-gamepad.js +1 -1
- package/dist/touch-gamepad.js.map +1 -1
- package/dist/touch-gesture.js +1 -1
- package/dist/touch-gesture.js.map +1 -1
- package/dist/touch-orbit.js +1 -1
- package/dist/touch-orbit.js.map +1 -1
- package/dist/vector-field.d.ts +0 -2
- package/dist/vector-field.d.ts.map +1 -1
- package/dist/vector-field.js +1 -1
- package/dist/vector-field.js.map +1 -1
- package/dist/vertex-animation.js +1 -1
- package/dist/vertex-animation.js.map +1 -1
- package/dist/virtual-gamepad.js +1 -1
- package/dist/virtual-gamepad.js.map +1 -1
- package/dist/voxel-galaxy.js +4 -4
- package/dist/voxel-galaxy.js.map +1 -1
- package/dist/w3d-theme.js +1 -1
- package/dist/w3d-theme.js.map +1 -1
- package/dist/warhead.d.ts.map +1 -1
- package/dist/warhead.js +28 -12
- package/dist/warhead.js.map +1 -1
- package/dist/water-normal.js +1 -1
- package/dist/water-normal.js.map +1 -1
- package/dist/water-shore-shader.d.ts +35 -0
- package/dist/water-shore-shader.d.ts.map +1 -0
- package/dist/water-shore-shader.js +296 -0
- package/dist/water-shore-shader.js.map +1 -0
- package/dist/water-shore.d.ts +116 -0
- package/dist/water-shore.d.ts.map +1 -0
- package/dist/water-shore.js +404 -0
- package/dist/water-shore.js.map +1 -0
- package/dist/weapon-fit.js +1 -1
- package/dist/weather.js +1 -1
- package/dist/weather.js.map +1 -1
- package/dist/widget-box.js +1 -1
- package/dist/widget-box.js.map +1 -1
- package/dist/widgets3d-layout.js +1 -1
- package/dist/widgets3d-layout.js.map +1 -1
- package/dist/widgets3d.d.ts +1 -19
- package/dist/widgets3d.d.ts.map +1 -1
- package/dist/widgets3d.js +16 -10
- package/dist/widgets3d.js.map +1 -1
- package/dist/wind.js +1 -1
- package/dist/wind.js.map +1 -1
- package/dist/world-contract.d.ts +14 -2
- package/dist/world-contract.d.ts.map +1 -1
- package/dist/world-contract.js +17 -7
- package/dist/world-contract.js.map +1 -1
- package/dist/world-store.d.ts +6 -0
- package/dist/world-store.d.ts.map +1 -1
- package/dist/world-store.js +42 -4
- package/dist/world-store.js.map +1 -1
- package/dist/world-topology.js +1 -1
- package/dist/world-topology.js.map +1 -1
- package/dist/world-view.d.ts.map +1 -1
- package/dist/world-view.js +5 -4
- package/dist/world-view.js.map +1 -1
- package/dist/wreck-fall.js +1 -1
- package/dist/wreck-fall.js.map +1 -1
- package/dist/xr-frames.js +1 -1
- package/dist/xr-frames.js.map +1 -1
- package/dist/xr-gamepad.js +2 -2
- package/dist/xr-gamepad.js.map +1 -1
- package/package.json +2 -2
- package/static/attributes.json +159 -60
- package/static/attributes.txt +55 -37
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,355 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
<!--{ "order":
|
|
3
|
+
<!--{ "parent": "reference", "order": 20 }-->
|
|
4
4
|
|
|
5
5
|
All notable changes to **tosijs-3d**. This project is pre-1.0 (`0.x`), so minor
|
|
6
6
|
versions may carry breaking peer-dependency changes — each is called out in a
|
|
7
7
|
**⚠️ Breaking** block in its version section below, with what a consumer must do.
|
|
8
8
|
|
|
9
|
+
## 0.10.0
|
|
10
|
+
|
|
11
|
+
**A quality release: the deprecated names are gone, and a long list of bugs
|
|
12
|
+
with them.** No new elements; what was added is tooling for measuring and
|
|
13
|
+
debugging on a device, and some defaults changed (listed under **Changed
|
|
14
|
+
defaults** below). Most of what breaks was announced in 0.8 and
|
|
15
|
+
0.9; three things were not, and are listed below with the rest:
|
|
16
|
+
`new MersenneTwister()` without a seed, `WorldStore` queries returning copies,
|
|
17
|
+
and `surface.openPanel`'s `onClose`. [Migration.md](https://3d.tosijs.net/Migration/) has every
|
|
18
|
+
pair and what to do.
|
|
19
|
+
|
|
20
|
+
Size: barrel (min, packages external) 970.3 KB raw / 327.2 KB gz, +2.30% on
|
|
21
|
+
0.9.0.
|
|
22
|
+
|
|
23
|
+
### ⚠️ Breaking
|
|
24
|
+
|
|
25
|
+
- **`onX` callback options are removed.** `onChange`, `onClick`, `onSelect`,
|
|
26
|
+
`onActivate`, `onClose`, `onKey`, `onAction`, `onCaretMove`, `onEnter` and
|
|
27
|
+
`onFocus` are no longer called; use `handleX`. An old name is not dropped
|
|
28
|
+
silently: `handlerOf` warns once per name that it is ignored and names the
|
|
29
|
+
replacement.
|
|
30
|
+
- **`<tosi-b3d-trigger>`'s `onEnter` / `onExit` properties** are removed; use
|
|
31
|
+
`whenEnter` / `whenExit`. **`<tosi-b3d-manipulator>`'s `handleChange` /
|
|
32
|
+
`handleCommit`** are removed; use `whenChange` / `whenCommit`.
|
|
33
|
+
- **`generateGalaxy`** is removed; use `voxelGalaxy({ seed, brightBudget }).view()`.
|
|
34
|
+
**`galaxy.getStarSPS()`** is removed; use `pickStar`.
|
|
35
|
+
- **`new MersenneTwister()` needs a seed.** It used to seed from the clock
|
|
36
|
+
when the argument was left out, which silently broke "same seed, same
|
|
37
|
+
result". It now throws; pass `Date.now()` if that is what you want.
|
|
38
|
+
- **`WorldStore.getState()`, `getEntity()` and `query()` return copies.** A
|
|
39
|
+
driver could change the simulation by writing to what a query returned.
|
|
40
|
+
Code that relied on that (deliberately or not) must call a command instead.
|
|
41
|
+
The engine's own systems read `store.liveState`.
|
|
42
|
+
A copy is made on every call, so read once per frame, not once per entity.
|
|
43
|
+
- **A store passed to the conformance kit must implement
|
|
44
|
+
`chooseOption(choiceId, optionId)`.** The kit now covers the choice
|
|
45
|
+
primitive and calls it.
|
|
46
|
+
- **`surface.openPanel({ onClose })` is `handleClose`.** This one was never
|
|
47
|
+
announced: it was the last `onX` option in the library and follows the same
|
|
48
|
+
rule now (ignored, with a warning).
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Changed defaults
|
|
52
|
+
|
|
53
|
+
Nothing here removes an API, but a scene can look or behave differently
|
|
54
|
+
without a line of yours changing. Each has the setting that puts it back.
|
|
55
|
+
|
|
56
|
+
- **Opaque meshes are drawn nearest first, the sky last** (was material
|
|
57
|
+
order). The picture is the same for ordinary opaque meshes; one with depth
|
|
58
|
+
write off can differ. `scene.setRenderingOrder(0)` restores Babylon's order,
|
|
59
|
+
and a camera-pinned sky of your own must set `infiniteDistance`.
|
|
60
|
+
- **A headset session renders at a reduced scale with foveation** on the low
|
|
61
|
+
tier (`xrRenderScale`, `xrFoveation`; `1` and `0` for full).
|
|
62
|
+
- **The decorator places a tier share of its budget** (0.6 on the low tier)
|
|
63
|
+
and plant rules thin with moisture (`thirst`), so the same seed gives a
|
|
64
|
+
different layout from 0.9. `budgetScale: 1` places the whole budget.
|
|
65
|
+
- **Scatter rules gather more** (`clump` 0.95, was 0.85).
|
|
66
|
+
- **Water receives sun and cloud shadows.**
|
|
67
|
+
- **The low tier uses the lighter ground shader** (`groundDetail`).
|
|
68
|
+
- **`PerlinNoise(0)` is a seed**, not "no seed".
|
|
69
|
+
|
|
70
|
+
### Docs
|
|
71
|
+
|
|
72
|
+
- **The doc site is reorganised.** Sections now list the elements you put in a
|
|
73
|
+
scene, with the pure models and helpers each is built from tucked beneath
|
|
74
|
+
it (the flight model under the aircraft, the biome chart under the
|
|
75
|
+
terrain). UI was one list of 39 pages and Environment one of 37; no section
|
|
76
|
+
now has more than 12 direct children. Environment is split into Sky and
|
|
77
|
+
light, Weather and clouds, Terrain and Water; Migration and the Changelog
|
|
78
|
+
moved from second and third to a Reference section at the end. Page URLs
|
|
79
|
+
are unchanged, except the section landing pages.
|
|
80
|
+
- **Getting started**: the install line with its peer dependencies, a first
|
|
81
|
+
scene that needs no model file, and where to go next. The README has the
|
|
82
|
+
same.
|
|
83
|
+
- **Ten modules that other pages linked to had no page**: the flight model,
|
|
84
|
+
ballistics, guidance, warhead, destroyable, resource, Perlin noise, gradient
|
|
85
|
+
filter, terrain grid and the primitives (box, sphere, ground). 17 links were
|
|
86
|
+
dead. A test now fails on a link to a page that does not exist.
|
|
87
|
+
- Every section landing page says which page you want, where most were a bare
|
|
88
|
+
list of links.
|
|
89
|
+
|
|
90
|
+
### Fixed
|
|
91
|
+
|
|
92
|
+
- **A headset is drawn at the device tier's resolution.** It never was: the
|
|
93
|
+
tier lowered the engine's hardware scaling for a session, and that does not
|
|
94
|
+
reach the XR layer, so every tier drew both eyes at full size. The viewport
|
|
95
|
+
is now scaled per frame (`xrRenderScale`, auto: 0.67 on the low tier, 0.83
|
|
96
|
+
on medium) and fixed foveation is set (`xrFoveation`, auto: 1 on low, 0.5 on
|
|
97
|
+
medium). Measured on a Quest in Land and Sky at 90 ms a frame: half the
|
|
98
|
+
pixels saved 19 ms and full foveation 12 ms. Both are attributes of
|
|
99
|
+
`<tosi-b3d>`; set `xrRenderScale="1" xrFoveation="0"` for the old picture.
|
|
100
|
+
- **Opaque meshes are drawn nearest first, and the sky last.** Babylon draws
|
|
101
|
+
them in creation order, so a sky made first was shaded across the whole view
|
|
102
|
+
and then painted over by the land. The picture is the same; a covered pixel
|
|
103
|
+
is now rejected before its shader runs. `nearFirst(scene)` is exported for a
|
|
104
|
+
render target of your own (the water's two have it).
|
|
105
|
+
- **A cheaper ground shader for a weak GPU** (`<tosi-b3d groundDetail>`:
|
|
106
|
+
`auto`, `full`, `lite`). The biome shader took eight noise samples a pixel;
|
|
107
|
+
`lite` takes three and looks nearly the same from a distance. `auto` picks
|
|
108
|
+
it on the low tier, and in a headset on the medium tier. Measured on a Quest
|
|
109
|
+
in Land and Sky, the terrain was 40 ms of a 90 ms frame. The cost sweep
|
|
110
|
+
measures the other form on your device.
|
|
111
|
+
- **The ground shader reads its fine noise from a texture.** It computed 3D
|
|
112
|
+
noise four times a pixel, eight hashed corners each; it now reads a shared
|
|
113
|
+
64-texel tiling block (`noiseVolume`, exported) once per sample. Mip-mapped,
|
|
114
|
+
so the detail fades in the distance where the computed noise shimmered. On
|
|
115
|
+
every tier with WebGL 2; `setBiomeComputedNoise(scene, true)` is the way
|
|
116
|
+
back, and the cost sweep measures it. The climate noise is still computed.
|
|
117
|
+
- **The water's reflection and refraction are drawn once for both eyes, and
|
|
118
|
+
every Nth frame in a headset too.** Each is the scene drawn again, and a
|
|
119
|
+
headset drew both for each eye on every frame: four extra scene passes.
|
|
120
|
+
Each is now looked up through the view it was drawn from, so one drawing is
|
|
121
|
+
in the right place from either eye and on later frames (`reflectionRefresh`,
|
|
122
|
+
from the device tier: every 3rd frame on the low tier). This also fixes the
|
|
123
|
+
refraction sliding against the seabed between redraws on a flat screen.
|
|
124
|
+
- **Perf Stats reports what SVG texture repaints cost** (the HUD, panels):
|
|
125
|
+
repaints a second and main-thread milliseconds a second (`svgTextureCost`).
|
|
126
|
+
It also shows the JS heap against its first reading and the total redraw
|
|
127
|
+
count, so a leak is visible from inside a headset.
|
|
128
|
+
- **Debug sink** (`debugSink.url`, `sendDebug`): a page can post its readings
|
|
129
|
+
to an endpoint, for a headset that has no console. With a URL set,
|
|
130
|
+
`<tosi-b3d>` sends each cost sweep step, the Perf Stats lines while that
|
|
131
|
+
popup is open in a session, and every `logDebug` event. Off by default.
|
|
132
|
+
- **`bun run xr … --counters [--again n]`**: documents, DOM nodes, listeners
|
|
133
|
+
and JS heap before and after a script, after a collection.
|
|
134
|
+
- **Cost sweep** (`b3d.costSweep()`, and a button in Perf Stats): where a
|
|
135
|
+
frame goes, measured on the device, by switching one thing off at a time.
|
|
136
|
+
Runs are numbered and the last four are kept, each saying whether it
|
|
137
|
+
finished or where it stopped, so a run that hangs does not replace the one
|
|
138
|
+
before. **Shader sweep** is a separate button: it measures the ground
|
|
139
|
+
shader's other forms, which recompiles shaders.
|
|
140
|
+
- **A popup's move and close icons keep their size on a tall popup in a
|
|
141
|
+
headset.** The title bar was a fifth of the popup's height, so Perf Stats
|
|
142
|
+
with a long list got icons several times too large, over its first rows.
|
|
143
|
+
- **A popup is capped in height and scrolls past the cap** (480 units, or the
|
|
144
|
+
caller's `maxHeight`). Perf Stats with a sweep listed was taller than the
|
|
145
|
+
screen flat and enormous in a headset, with no way to its lower rows.
|
|
146
|
+
- **The decorator places a share of its budget set by the device tier**
|
|
147
|
+
(`budgetScale`, `0` = auto: 1, and 0.6 on the low tier, which is a Quest in
|
|
148
|
+
a session). Measured on a Quest: decorations were 16 ms of a 42 ms frame.
|
|
149
|
+
Set `budgetScale: 1` to place the whole budget everywhere.
|
|
150
|
+
- **A thinned scatter loses clumps, not density** (`ScatterOptions.share`,
|
|
151
|
+
`clumpCentreFor`): the weaker clumps go and the middle of the rest stays as
|
|
152
|
+
full, in the same places as the whole scatter. The decorator's share and the
|
|
153
|
+
moisture thinning both work this way. Rules also gather more by default
|
|
154
|
+
(`clump` 0.95, was 0.85), so fewer things stand alone.
|
|
155
|
+
- **The cost sweep's two headset rows measure what the resolution levers are
|
|
156
|
+
saving** (`+ full resolution`, `+ no foveation`). The old rows set the
|
|
157
|
+
values the tier already uses, so they measured nothing.
|
|
158
|
+
- **Wetter country grows more.** A scatter rule's moisture band only said
|
|
159
|
+
where a kind may grow, and every plant's band reached the top, so anything
|
|
160
|
+
damp enough for a tree grew the same forest as the wettest setting. Plant
|
|
161
|
+
rules now have a `thirst`: the drier it is, the more of their places are
|
|
162
|
+
left empty (`moistureCover`). In Land and Sky, trees go from about 120 at
|
|
163
|
+
moisture 0.5 to about 240 at 1; rocks are unchanged.
|
|
164
|
+
- **A headset session no longer freezes the second time your hands are
|
|
165
|
+
tracked.** Babylon's hand tracking (9.16) takes the topmost ancestor of its
|
|
166
|
+
shared hand mesh as a root and parents it to the camera's parent every
|
|
167
|
+
frame. The second time hands appear (a controller put down twice), that root
|
|
168
|
+
is the camera's parent itself, which became its own parent; the next enable
|
|
169
|
+
or dispose then recursed until the stack ran out and the picture stopped.
|
|
170
|
+
Found on a Quest with Perf Stats open (#3135). The rig now refuses such a
|
|
171
|
+
parent (`refuseOwnAncestor`, exported for anyone parenting an XR camera to
|
|
172
|
+
their own node).
|
|
173
|
+
- **Underwater light rays go away when you leave the water.** They were still
|
|
174
|
+
fading on the frame you surfaced, the update read the water that was no
|
|
175
|
+
longer above you and threw, and it threw again every frame after, so the
|
|
176
|
+
rays stayed for good.
|
|
177
|
+
- **A popup moved in a headset stays with its panel.** Dragging an owned popup
|
|
178
|
+
used to tear it off, so moving the panel afterwards left it behind. It now
|
|
179
|
+
moves relative to its opener and stays owned; `tearOff()` is still how a
|
|
180
|
+
caller lets one go.
|
|
181
|
+
- **No second, dead copy of a popup after a panel rebuild in a headset.** The
|
|
182
|
+
rebuild dropped its popups' handles and relied on each dying with the panel
|
|
183
|
+
plane. One that was torn off, or not yet mounted, stayed in the scene: a
|
|
184
|
+
Perf Stats that never updated and could not be closed. They are now closed
|
|
185
|
+
before the plane goes, and a popup whose opener has been disposed closes
|
|
186
|
+
itself.
|
|
187
|
+
- **Perf Stats refreshes every two seconds in a headset** (was 0.4 s). A
|
|
188
|
+
Quest hung within minutes with it open and ran on with it closed; the cause
|
|
189
|
+
is not known, this redraws its texture less often.
|
|
190
|
+
- **Water, and the ice on it, receives shadows.** The surface never did: it
|
|
191
|
+
was not marked as a shadow receiver, so nothing cast a shadow on the sea,
|
|
192
|
+
which on a white ice sheet is obvious. `<tosi-b3d-water receiveShadows="off">`
|
|
193
|
+
restores the old behaviour and saves a shadow lookup per water pixel (the
|
|
194
|
+
cost on a headset has not been measured).
|
|
195
|
+
- **Cloud shadows fall on water and ice.** They never did, on any device:
|
|
196
|
+
cloud shadows are a material plugin, and Babylon's water material runs no
|
|
197
|
+
plugins. The lookup is now in the water's own shader, fed from the scene's
|
|
198
|
+
cloud shadow map (`cloudShadowMapOf(scene)`, new). `receiveShadows="off"`
|
|
199
|
+
turns it off with the sun's shadows. Every water now uses the patched
|
|
200
|
+
shader, not only `shore="on"`.
|
|
201
|
+
- `PerlinNoise(0)` uses seed 0. It was treated as "no seed" and gave a
|
|
202
|
+
different field every time.
|
|
203
|
+
- `world-store.ts` compiles under `noUncheckedIndexedAccess` (the steer loop
|
|
204
|
+
read `r.portals[0]` unguarded), so a project that vendors it with strict
|
|
205
|
+
settings no longer has to pin an old copy.
|
|
206
|
+
- The world contract now says what it meant: a driver must supply `spec.id` to
|
|
207
|
+
`spawn` (the return value cannot cross a worker boundary), and `setIntent`
|
|
208
|
+
is legacy (`steer` is what the sim honours).
|
|
209
|
+
- The conformance kit covers the choice primitive: a pick emits exactly one
|
|
210
|
+
`choiceMade`, an option that is not on the menu emits nothing, a choice is
|
|
211
|
+
reported once, and the sim resolves nothing.
|
|
212
|
+
- **A bomb that goes off on terrain now hurts what is above it.** The blast's
|
|
213
|
+
line of sight started on (or just under) the surface it hit, so the terrain
|
|
214
|
+
was cover for everything and a ground burst damaged nothing. A burst near a
|
|
215
|
+
surface now looks from a metre above it; a hill or wall in between is still
|
|
216
|
+
cover. (Only a mesh named `ground` was exempt before.)
|
|
217
|
+
- **Decorator: naming the default library explicitly no longer empties the
|
|
218
|
+
scatter.** Default rules were chosen by whether `url` was set, so
|
|
219
|
+
`url="…/quaternius/libraries/nature.glb"` got the other library's rules,
|
|
220
|
+
which matched no model. The choice is now made from the library in use.
|
|
221
|
+
- **Decorator: `NATURE_ROLES` applies only to the default library.** Its keys
|
|
222
|
+
are generic material names (`White`, `Wood`), so a third-party model with a
|
|
223
|
+
material of the same name had it replaced by flat biome shading. Set `roles`
|
|
224
|
+
to opt a custom library in.
|
|
225
|
+
- The Perf Stats "Occlusion" button says whether occlusion is running, not
|
|
226
|
+
what was asked for (`on, not running here` when the method cannot run in
|
|
227
|
+
the current mode). Land and Sky's own occlusion select, which drifted out of
|
|
228
|
+
step with it, is gone.
|
|
229
|
+
- **Lightning bolts are solid, not see-through.** The channel was faded by
|
|
230
|
+
transparency between re-strokes, so up close it was a pale translucent
|
|
231
|
+
tube. It is opaque while the stroke is live, far brighter than white (so it
|
|
232
|
+
blooms), and the glow around it fades to nothing at its edge. The flicker is
|
|
233
|
+
carried by the glow, the cloud and the ground.
|
|
234
|
+
- **Thunder stops when its storm does.** Thunder is queued as far ahead as
|
|
235
|
+
sound takes to arrive, so changing world left the old storm's thunder
|
|
236
|
+
playing over the new one.
|
|
237
|
+
- **In VR, the pointer no longer lands on the vehicle you are sitting in.**
|
|
238
|
+
In the aircraft's cockpit the controller ray hit the canopy first, and on a
|
|
239
|
+
Quest the panel behind it could be hovered but not pressed or dragged, so
|
|
240
|
+
there was no way out of the session from inside. Anything beneath the node
|
|
241
|
+
the XR rig rides on is no longer a pointer target; your own panels are.
|
|
242
|
+
(Reproduced and checked with the emulated headset; not yet on a device.)
|
|
243
|
+
- **Sea ice: the plate pattern no longer depends on the GPU's `sin`.** The
|
|
244
|
+
plates were laid out with the classic `fract(sin(x) * 43758.5)` hash, which
|
|
245
|
+
mobile GPUs evaluate differently from desktop ones; in a headset the ice
|
|
246
|
+
showed severe mismatches that a Mac never did. The hash is arithmetic only
|
|
247
|
+
now. Plate edges are also a little softer. (The layout of plates for a given
|
|
248
|
+
place changes. Not yet confirmed on a headset.)
|
|
249
|
+
- **No holes in solid sea ice near its edge.** The invisible mesh a car or a
|
|
250
|
+
shell lands on kept a triangle only if all three corners were solid, so a
|
|
251
|
+
band one cell wide (16 m and more far from the viewer) was drawn solid and
|
|
252
|
+
had nothing to stand on. A triangle is kept when it is solid on average,
|
|
253
|
+
which is where the drawn ice crosses the same line.
|
|
254
|
+
- **The HUD page no longer throws 30 times a second.** Its demo still called
|
|
255
|
+
`setTraces(traces, viewer, options)`, a signature that went away when the
|
|
256
|
+
HUD started projecting through the camera. The demo passes the camera, and
|
|
257
|
+
`setTraces` warns once (and draws nothing) if it is handed anything else.
|
|
258
|
+
- Three demo controls were dead because they still used an old name the
|
|
259
|
+
compiler cannot see in a doc comment: the aircraft page's "chase pitch
|
|
260
|
+
follow" and "follow lag" sliders, and the particles page's Burst button.
|
|
261
|
+
(They worked, with a warning, until the fallback was removed here.)
|
|
262
|
+
|
|
263
|
+
## 0.9.0
|
|
264
|
+
|
|
265
|
+
**A sea that knows its shore, and a temperature that means one.** The water
|
|
266
|
+
takes the depth and the distance to land from the terrain and draws surf that
|
|
267
|
+
runs in, pale shallows and sea ice; solid ice is solid for everything in the
|
|
268
|
+
scene. Temperature is now a real scale (0 is 0 °C, 1 is 50 °C), so the same
|
|
269
|
+
dial reaches Titan and Venus.
|
|
270
|
+
|
|
271
|
+
Size: barrel (min, packages external) 948.5 KB raw / 318.9 KB gz, +1.75% on
|
|
272
|
+
0.8.15 (the shore model and its shader).
|
|
273
|
+
|
|
274
|
+
### ⚠️ Breaking
|
|
275
|
+
|
|
276
|
+
- **`biomeTemperature` is a temperature, and `-1` no longer means
|
|
277
|
+
"default".** `0` is 0 °C and each unit is 50 °C (`1` = 50 °C, `-1` =
|
|
278
|
+
-50 °C, which warns once in the console), with no limit either way, so a world
|
|
279
|
+
can be as cold as Titan or as hot as Venus. It used to be the biome
|
|
280
|
+
chart's `0…1` axis with `-1` for "default". Convert old values with
|
|
281
|
+
`(old - 0.36) / 0.8`; the default is now `0.45` and looks the same. The
|
|
282
|
+
chart is a window onto the new scale (-22.5 °C to 40 °C) and clamps beyond
|
|
283
|
+
it. `chartTemperature` / `planetTemperature` convert. Everything inside the
|
|
284
|
+
biome shader, province climate and decorator bands is still in chart
|
|
285
|
+
units. See [Migration](https://3d.tosijs.net/Migration/).
|
|
286
|
+
|
|
287
|
+
### Changed
|
|
288
|
+
|
|
289
|
+
- **The deprecated `onX` callback names stay for one more minor.** They were
|
|
290
|
+
announced as "removed in 0.9"; they are removed in **0.10** instead, and
|
|
291
|
+
still work and warn once in 0.9.x. The same goes for the other names marked
|
|
292
|
+
for removal in 0.9 (`whenEnter`/`whenExit`'s old spellings on the trigger,
|
|
293
|
+
the manipulator's, `generateGalaxy`). Nothing to do yet beyond renaming at
|
|
294
|
+
your own pace.
|
|
295
|
+
|
|
296
|
+
### Added
|
|
297
|
+
|
|
298
|
+
- **A shoreline, and sea ice.** `<tosi-b3d-water shore="on">` gives the water
|
|
299
|
+
the depth of the ground under each vertex (from the scene's terrain) and
|
|
300
|
+
draws from it: surf (wave fronts running in to the shore one after
|
|
301
|
+
another, and a wet edge lapping at the waterline), paler water over the
|
|
302
|
+
shallows, and ice. The surf is drawn from each vertex's DISTANCE to the
|
|
303
|
+
waterline, not its depth, so it is the same width on a steep shore as on
|
|
304
|
+
a flat one. The distance is a real one, carried across the grid from
|
|
305
|
+
the waterline, so the fronts are evenly spaced whatever the bed does.
|
|
306
|
+
`shoreFine` doubles the mesh near the viewer: a vertex every 2 m out to
|
|
307
|
+
64 m (about 16,600 in all) where there is otherwise one every 4 m. The ice follows the cold and the shore: a solid sheet
|
|
308
|
+
along the beach, breaking into plates further out, open water beyond, and
|
|
309
|
+
all of it moving out to sea as the climate at sea level (season included)
|
|
310
|
+
gets colder. It is there from below as well. The sea starts to freeze at
|
|
311
|
+
-2 °C at the beach; open water stays clear to about -8 °C and is one
|
|
312
|
+
unbroken surface by -22.5 °C. `iceCover(temperature, depth)` is the rule; see [water-shore](/water-shore/). With `shore="on"` a vertex
|
|
313
|
+
colour on the water mesh is shore data, not a tint. The shader patch is
|
|
314
|
+
made once for the page, so this holds for EVERY `WaterMaterial` on a page
|
|
315
|
+
that has one `shore="on"` water: a vertex-coloured water mesh of your own
|
|
316
|
+
loses its tint there.
|
|
317
|
+
- **Solid ice is solid.** Ice is water until it has knitted solid
|
|
318
|
+
(`iceBears`); where it has, the water carries an invisible collision mesh
|
|
319
|
+
(collision group `ice`), so anything that collides or picks meets it: a
|
|
320
|
+
car, a shell, a ground probe. Plates and a sheet still showing its cracks
|
|
321
|
+
are water. Wave displacement fades out under ice, so the sheet lies flat
|
|
322
|
+
where it collides. A biped swimming at the surface climbs onto solid ice;
|
|
323
|
+
one that dived first goes under it, with the ice as a ceiling.
|
|
324
|
+
`water.iceBearsAt(x, z)` asks for any point.
|
|
325
|
+
|
|
326
|
+
### Fixed
|
|
327
|
+
|
|
328
|
+
- **Water animates on every browser.** Babylon's `WaterMaterial` advances
|
|
329
|
+
its clock only on a frame whose duration differs from the last, so where
|
|
330
|
+
frame times are steady (a browser that rounds its timer, a display holding
|
|
331
|
+
its rate) the ripples crawled. `<tosi-b3d-water>` now writes the
|
|
332
|
+
material's time itself, once a frame, from the scene's clock. It also
|
|
333
|
+
stops when the scene is paused.
|
|
334
|
+
- **Fog takes the sky's tint.** A `syncSkybox` fog fades distant ground to
|
|
335
|
+
the skybox's `horizonColor`, which ignored `horizonTint`: under a tinted
|
|
336
|
+
sky the far hills stood out as a pale blue-white band along the horizon.
|
|
337
|
+
It now keeps its brightness and takes the tint's hue, by `tintStrength`.
|
|
338
|
+
- **Land and Sky: no air, no cloud.** The demo's cloud cover and orographic
|
|
339
|
+
dials are thinned by the air setting (none below a twentieth of Earth's),
|
|
340
|
+
so Mars has a clear sky. The cloud deck itself is unchanged.
|
|
341
|
+
- **Negative `cirrus` had a quarter of the cloud of positive `cirrus`.** The
|
|
342
|
+
two streak directions were built differently; across-the-wind is now the
|
|
343
|
+
same field turned a quarter, so the sign changes only which way the streaks
|
|
344
|
+
run.
|
|
345
|
+
- **Clouds needed exactly full air.** With `atmosphere` under about 0.8 the
|
|
346
|
+
sky dome becomes a blended mesh, and it was drawn after the cloud deck and
|
|
347
|
+
over it. It is now drawn first.
|
|
348
|
+
- **A little less air cleared the haze almost completely, and a slow drag
|
|
349
|
+
back to full air never quite arrived.** The vacuum fog layer now mixes fog
|
|
350
|
+
by strength (`FogLayer.reciprocal`), and the sky's air value lands exactly
|
|
351
|
+
on 0 and 1.
|
|
352
|
+
|
|
9
353
|
## 0.8.15
|
|
10
354
|
|
|
11
355
|
**Rocks and trees that belong to the land.** Procedural rocks, Quaternius
|
|
@@ -1273,7 +1617,7 @@ demo is now **Land and Sky**.
|
|
|
1273
1617
|
### ⚠️ Breaking
|
|
1274
1618
|
|
|
1275
1619
|
Nothing breaks at compile time. Two behaviours change, and
|
|
1276
|
-
[Migration.md](
|
|
1620
|
+
[Migration.md](https://3d.tosijs.net/Migration/) has the before/after for each.
|
|
1277
1621
|
|
|
1278
1622
|
- **Aircraft guns are direct-hit, not area-effect.** `gun-mode="blast"`
|
|
1279
1623
|
restores the old behaviour; `gunBlastRadius`/`gunFullRadius` are attributes
|
package/Migration.md
CHANGED
|
@@ -1,14 +1,145 @@
|
|
|
1
1
|
# Migration
|
|
2
2
|
|
|
3
|
-
<!--{ "order":
|
|
3
|
+
<!--{ "parent": "reference", "order": 10 }-->
|
|
4
4
|
|
|
5
5
|
What to change when upgrading. Only breaking changes are listed — everything
|
|
6
|
-
else is additive. The full detail for each is in [CHANGELOG.md](
|
|
6
|
+
else is additive. The full detail for each is in [CHANGELOG.md](https://3d.tosijs.net/CHANGELOG/).
|
|
7
7
|
|
|
8
8
|
This file ships **inside the package**, because a migration table you can only
|
|
9
9
|
read on GitHub does not exist for someone who has already installed the thing
|
|
10
10
|
and is staring at an error.
|
|
11
11
|
|
|
12
|
+
## 0.9.0 → 0.10.0
|
|
13
|
+
|
|
14
|
+
### 1. The deprecated callback names are gone: `onX` → `handleX`
|
|
15
|
+
|
|
16
|
+
**What changed.** The `onX` callback options were deprecated in 0.8.0 and kept
|
|
17
|
+
working, with a warning, through 0.9.x. They are removed. An `onX` option is
|
|
18
|
+
no longer called.
|
|
19
|
+
|
|
20
|
+
**Who is affected.** Anyone who saw the console warning
|
|
21
|
+
"`onChange` is deprecated — use `handleChange`" and has not renamed yet.
|
|
22
|
+
|
|
23
|
+
**How you will notice.** TypeScript reports the old name as an unknown
|
|
24
|
+
property. At runtime the callback does not fire, and the console says so once
|
|
25
|
+
per name: "`onChange` was removed in 0.10 and is IGNORED — use `handleChange`".
|
|
26
|
+
Demo code in doc comments and plain JavaScript is not type-checked, so search
|
|
27
|
+
for the names rather than relying on the compiler.
|
|
28
|
+
|
|
29
|
+
**What to do.** Rename. Every pair:
|
|
30
|
+
|
|
31
|
+
| where | removed | use |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `toggle3d` `slider3d` `select3d` `color3d` `vector3d` `euler3d` `angle3d` `arc3d` `picker3d` `curve3d` `footprint3d` `themeEditor` `terrainEditor3d` | `onChange` | `handleChange` |
|
|
34
|
+
| `button3d`, menu actions, `addDebugSource` actions | `onClick` | `handleClick` |
|
|
35
|
+
| `list3d`, `surface` `MenuItem`, `table` | `onSelect` | `handleSelect` |
|
|
36
|
+
| `table`, `box` `button` / `BoxChild` | `onActivate` | `handleActivate` |
|
|
37
|
+
| `showPopup` / `openPopup` / `openMenu3d` / `surface.openPanel` | `onClose` | `handleClose` |
|
|
38
|
+
| `inputField` | `onChange` / `onEnter` / `onFocus` | `handleChange` / `handleEnter` / `handleFocus` |
|
|
39
|
+
| `keyboard` | `onKey` / `onAction` / `onCaretMove` | `handleKey` / `handleAction` / `handleCaretMove` |
|
|
40
|
+
| `curve3d` / `footprint3d` result (`field.onChange = …`) | `onChange` | `handleChange` |
|
|
41
|
+
|
|
42
|
+
Components take `when*`:
|
|
43
|
+
|
|
44
|
+
| component | removed | use |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `<tosi-b3d-trigger>` | `onEnter` / `onExit` properties | `whenEnter` / `whenExit` |
|
|
47
|
+
| `<tosi-b3d-manipulator>` | `handleChange` / `handleCommit` | `whenChange` / `whenCommit` |
|
|
48
|
+
|
|
49
|
+
`b3dTrigger({ onEnter })` through the element creator is unchanged: it was
|
|
50
|
+
never the property, it is a listener for the `'enter'` event and receives an
|
|
51
|
+
`Event`.
|
|
52
|
+
|
|
53
|
+
`handlerOf(config, 'handleX', 'onX')` keeps its signature. It now returns only
|
|
54
|
+
`handleX`, and warns once if it finds a function under the old name.
|
|
55
|
+
|
|
56
|
+
### 2. `generateGalaxy` and `galaxy.getStarSPS()` are removed
|
|
57
|
+
|
|
58
|
+
`generateGalaxy(seed, count, options)` was an adapter over the voxel galaxy.
|
|
59
|
+
Call that directly:
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
// before
|
|
63
|
+
const galaxy = generateGalaxy(1234, 10000, options)
|
|
64
|
+
// after
|
|
65
|
+
const galaxy = voxelGalaxy({
|
|
66
|
+
seed: 1234,
|
|
67
|
+
brightBudget: 10000,
|
|
68
|
+
dimBudget: 0,
|
|
69
|
+
galaxyOptions: options,
|
|
70
|
+
}).view({ generatePlanets: options.generatePlanets === true })
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The result is identical. `getStarSPS()` on `<tosi-b3d-galaxy>` returned `null`
|
|
74
|
+
since the stars moved to a vertex shader; use `galaxy.pickStar(x, y)`.
|
|
75
|
+
|
|
76
|
+
### 3. `new MersenneTwister()` needs a seed
|
|
77
|
+
|
|
78
|
+
It used to seed from `Date.now()` when you left the argument out. It now
|
|
79
|
+
throws. Pass a seed, or `new MersenneTwister(Date.now())` if you want a
|
|
80
|
+
different sequence each run. (`PRNG` always required one.)
|
|
81
|
+
|
|
82
|
+
### 4. `WorldStore` queries return copies
|
|
83
|
+
|
|
84
|
+
`getState()`, `getEntity()` and `query()` used to return the store's live
|
|
85
|
+
objects, so writing to a result changed the simulation. They return copies
|
|
86
|
+
now. If you were moving something by writing to a query result, call the
|
|
87
|
+
command for it. Engine-side code that needs the live state every frame reads
|
|
88
|
+
`store.liveState` and must not write to it. A store passed to the conformance
|
|
89
|
+
kit must also implement `chooseOption(choiceId, optionId)`.
|
|
90
|
+
|
|
91
|
+
### 5. Some defaults changed: a scene can look different
|
|
92
|
+
|
|
93
|
+
Nothing to rename, but four things change what you see without a line of
|
|
94
|
+
yours changing. The changelog's **Changed defaults** block has all of them.
|
|
95
|
+
|
|
96
|
+
- **Decoration layouts differ again.** Plants thin out in drier country, things
|
|
97
|
+
gather into clumps more strongly, and a low-tier device (a Quest in a
|
|
98
|
+
session) places 60% of the budget as fewer clumps. `budgetScale: 1` places
|
|
99
|
+
the whole budget; `clump: 0.85` on the decorator is the old gathering.
|
|
100
|
+
- **Opaque meshes are drawn nearest first.** Same picture for ordinary meshes.
|
|
101
|
+
`scene.setRenderingOrder(0)` puts Babylon's order back; a camera-pinned sky
|
|
102
|
+
of your own needs `infiniteDistance`.
|
|
103
|
+
- **A headset on the low tier renders at reduced scale with foveation.**
|
|
104
|
+
`xrRenderScale: 1` and `xrFoveation: 0` are full resolution.
|
|
105
|
+
- **Water receives sun and cloud shadows.**
|
|
106
|
+
|
|
107
|
+
## 0.8.15 → 0.9.0
|
|
108
|
+
|
|
109
|
+
### 1. `biomeTemperature` is in degrees now: 0 is 0 °C, 1 is 50 °C
|
|
110
|
+
|
|
111
|
+
**What changed.** `<tosi-b3d-terrain biomeTemperature>` used to be the biome
|
|
112
|
+
chart's own axis: `0…1`, cold to warm, with `-1` meaning "use the default".
|
|
113
|
+
It is now a temperature: `0` is 0 °C and each unit is 50 °C, so `-1` is
|
|
114
|
+
-50 °C, and the value is not limited to any range. The default is `0.45`
|
|
115
|
+
(22.5 °C), which is the same climate as before.
|
|
116
|
+
|
|
117
|
+
**Who is affected.** Anyone who sets `biomeTemperature`. An old value is read
|
|
118
|
+
on the new scale and comes out much warmer: `0.3` used to be about -4 °C and
|
|
119
|
+
is now 15 °C. `-1` used to mean the default and is now -50 °C.
|
|
120
|
+
|
|
121
|
+
**What to do.** Convert each value: `new = (old - 0.36) / 0.8`. Replace `-1`
|
|
122
|
+
with `0.45`, or delete the attribute.
|
|
123
|
+
|
|
124
|
+
| Old | New | Climate |
|
|
125
|
+
|-----|-----|---------|
|
|
126
|
+
| `-1` (auto) | `0.45` | 22.5 °C |
|
|
127
|
+
| `1` | `0.8` | 40 °C |
|
|
128
|
+
| `0.72` | `0.45` | 22.5 °C |
|
|
129
|
+
| `0.36` | `0` | 0 °C |
|
|
130
|
+
| `0` | `-0.45` | -22.5 °C |
|
|
131
|
+
|
|
132
|
+
`chartTemperature` and `planetTemperature` (from `biome-chart`) do the
|
|
133
|
+
conversion in code. Only this attribute moved. `BiomePlugin.params`, the
|
|
134
|
+
province climate curves and the decorator's rule bands are still in chart
|
|
135
|
+
units.
|
|
136
|
+
|
|
137
|
+
### 2. Nothing else is removed, including what was promised
|
|
138
|
+
|
|
139
|
+
The deprecated `onX` callback names (and the other names announced as
|
|
140
|
+
"removed in 0.9") still work in 0.9.x and warn once. They are removed in
|
|
141
|
+
0.10. Rename when convenient.
|
|
142
|
+
|
|
12
143
|
## 0.8.14 → 0.8.15
|
|
13
144
|
|
|
14
145
|
**Nothing breaks at compile time. Three defaults change what you see.**
|
|
@@ -150,7 +281,8 @@ Use **`isOff()`** from `tosijs-3d`, which accepts `'off'`, `false` and
|
|
|
150
281
|
### 2. Callback options: `onX` → `handleX`
|
|
151
282
|
|
|
152
283
|
Every callback option in the library now takes `handleX`. The old `onX` spelling
|
|
153
|
-
|
|
284
|
+
kept working through 0.9.x, warning **once per name**, and was **removed in
|
|
285
|
+
0.10** (see the top of this file).
|
|
154
286
|
|
|
155
287
|
| widget | old | new |
|
|
156
288
|
| ---------------------------------------- | ------------------------------------ | ------------------------------------------------ |
|
package/README.md
CHANGED
|
@@ -24,8 +24,54 @@ b3d(
|
|
|
24
24
|
)
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
The [doc site](https://3d.tosijs.net) has about a hundred live demos you can
|
|
28
|
+
edit in place; the [b3d page](https://3d.tosijs.net/tosi-b3d/) is that scene
|
|
29
|
+
running.
|
|
30
|
+
|
|
31
|
+
## Getting started
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install tosijs-3d tosijs @babylonjs/core @babylonjs/gui @babylonjs/loaders @babylonjs/materials
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Babylon (`^9`) and `tosijs` (`^1.9.2`) are peer dependencies: you install
|
|
38
|
+
them, so there is exactly one copy of the engine in your app. `jolt-physics`
|
|
39
|
+
is an optional peer, needed only if you use `b3dPhysics`.
|
|
40
|
+
|
|
41
|
+
A first scene, with no model file to find:
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
import { b3d, b3dSun, b3dSkybox, b3dGround, b3dBox, b3dSphere } from 'tosijs-3d'
|
|
45
|
+
|
|
46
|
+
document.body.append(
|
|
47
|
+
b3d(
|
|
48
|
+
b3dSun({ shadowCascading: true }),
|
|
49
|
+
b3dSkybox({ timeOfDay: 10 }),
|
|
50
|
+
b3dGround({ size: 24, texture: 'checker' }),
|
|
51
|
+
b3dBox({ x: -1.5, y: 0.5, color: '#c8553d' }),
|
|
52
|
+
b3dSphere({ x: 1.5, y: 1, diameter: 2, color: '#ffd166' })
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Give `tosi-b3d` a size in CSS (`tosi-b3d { width: 100vw; height: 100vh }`) and
|
|
58
|
+
you have a lit scene with shadows and an orbit camera. Then:
|
|
59
|
+
|
|
60
|
+
- **Your own model:** [b3d-loader](https://3d.tosijs.net/b3d-loader/) takes a
|
|
61
|
+
GLB; name suffixes on its meshes (`_collide`, `_mirror`, `_nocast`) set how
|
|
62
|
+
they behave.
|
|
63
|
+
- **Something to drive:** a [character](https://3d.tosijs.net/b3d-biped/), a
|
|
64
|
+
[car](https://3d.tosijs.net/b3d-car/) or an
|
|
65
|
+
[aircraft](https://3d.tosijs.net/b3d-aircraft/), inside an
|
|
66
|
+
[input focus](https://3d.tosijs.net/b3d-input-focus/) so keyboard, gamepad,
|
|
67
|
+
touch and VR controllers all work.
|
|
68
|
+
- **A world:** [terrain](https://3d.tosijs.net/b3d-terrain/),
|
|
69
|
+
[water](https://3d.tosijs.net/b3d-water/) and a
|
|
70
|
+
[sky](https://3d.tosijs.net/b3d-skybox/); [Land and
|
|
71
|
+
Sky](https://3d.tosijs.net/land-and-sky/) is all of it at once.
|
|
72
|
+
- **Controls that work in a headset:** the `scenePanel` hook on
|
|
73
|
+
[b3d](https://3d.tosijs.net/tosi-b3d/) and the
|
|
74
|
+
[widget set](https://3d.tosijs.net/widgets3d/).
|
|
29
75
|
|
|
30
76
|
## Four things you may not have seen in a 3D library
|
|
31
77
|
|
|
@@ -60,33 +106,13 @@ the package**, so an agent already in a consumer project reads
|
|
|
60
106
|
It exists because the recurring adopter failure is not a missing feature, it is
|
|
61
107
|
a feature that ships, is documented, and cannot be found: three issues in one
|
|
62
108
|
week turned out to be capability that was already there. One `grep water` finds
|
|
63
|
-
`submersible`; reading
|
|
64
|
-
|
|
65
|
-
**Upgrading?** See [Migration.md](./Migration.md) for the breaking changes and
|
|
66
|
-
what to do about them, and [CHANGELOG.md](./CHANGELOG.md) for the full detail.
|
|
67
|
-
Both ship inside the package, so they work from `node_modules` too.
|
|
68
|
-
|
|
69
|
-
```javascript
|
|
70
|
-
import {
|
|
71
|
-
b3d,
|
|
72
|
-
b3dSun,
|
|
73
|
-
b3dSkybox,
|
|
74
|
-
b3dLoader,
|
|
75
|
-
b3dWater,
|
|
76
|
-
b3dReflections,
|
|
77
|
-
} from 'tosijs-3d'
|
|
109
|
+
`submersible`; reading two hundred doc pages does not.
|
|
78
110
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
b3dLoader({ url: './scene.glb' }),
|
|
85
|
-
b3dWater({ y: -0.2 }),
|
|
86
|
-
b3dReflections()
|
|
87
|
-
)
|
|
88
|
-
)
|
|
89
|
-
```
|
|
111
|
+
**Upgrading?** See [Migration](https://3d.tosijs.net/Migration/) for the
|
|
112
|
+
breaking changes and what to do about them, and the
|
|
113
|
+
[Changelog](https://3d.tosijs.net/CHANGELOG/) for the full detail. Both ship
|
|
114
|
+
inside the package as `Migration.md` and `CHANGELOG.md`, so they work from
|
|
115
|
+
`node_modules` too.
|
|
90
116
|
|
|
91
117
|
## Highlights
|
|
92
118
|
|
|
@@ -137,8 +163,9 @@ performance-sensitive settings resolve to `auto` rather than to a number that is
|
|
|
137
163
|
always wrong for something. A Quest and a workstation get different worlds.
|
|
138
164
|
|
|
139
165
|
**Pure models, actually tested** — the flight model, ballistics, guidance, biome
|
|
140
|
-
classification, layout and text editing are engine-free and unit-tested (
|
|
141
|
-
|
|
166
|
+
classification, layout and text editing are engine-free and unit-tested (about
|
|
167
|
+
3,000 tests, run in seconds with no GPU). If it can be a function of its inputs,
|
|
168
|
+
it is.
|
|
142
169
|
|
|
143
170
|
## Development
|
|
144
171
|
|
|
@@ -146,9 +173,11 @@ Requires [Bun](https://bun.sh).
|
|
|
146
173
|
|
|
147
174
|
```bash
|
|
148
175
|
bun install
|
|
149
|
-
bun
|
|
176
|
+
bun tls # once: local HTTPS certificates (needs mkcert)
|
|
177
|
+
bun start # the doc site and dev server, rebuilding on change
|
|
178
|
+
bun test
|
|
150
179
|
```
|
|
151
180
|
|
|
152
|
-
|
|
181
|
+
The dev server runs on https://localhost:8030.
|
|
153
182
|
|
|
154
183
|
<!--{ "pin": "top" }-->
|
package/dist/aim.js
CHANGED
|
@@ -188,7 +188,7 @@ legible bad-shooter behaviour there is: the aim visibly trails the target, so a
|
|
|
188
188
|
player can *see* they are being missed rather than merely surviving. Pair it
|
|
189
189
|
with `aimWobble` for a shooter who cannot hold still.
|
|
190
190
|
*/
|
|
191
|
-
/*{ "parent": "
|
|
191
|
+
/*{ "parent": "b3d-biped", "order": 40 }*/
|
|
192
192
|
/**
|
|
193
193
|
* Human-ish defaults, and each one is a posture rather than a round number.
|
|
194
194
|
*
|