From 668ae2eb08289ddebc202f1dbf34887f7d09f8e4 Mon Sep 17 00:00:00 2001 From: shinyobjectz Date: Sun, 8 Nov 2026 20:09:26 -0800 Subject: [PATCH] Docs: every SDK prop, field and member described on raea.io/docs, and the reference check fails on a missing one The SDK reference's tables had 1,476 empty cells. Each prop, field and class member the pages table now has a doc comment in its source, or Bevy's own field doc where the SDK mirrors a Bevy type: - doc comments on 773 declarations across 84 SDK files (song maps, goo and rigid bodies, matchmove, the clock and timeline, state machines, materials and their extensions, the 2D shapes, bevy_ui and feathers wrappers, colours) - inline prop types pulled out as named, documented interfaces (EchoesProps, DaylightProps, UiScaleProps, ...), so each prop can carry its own doc - types raea-bevy-sdk generates from raea's crates (/** raea_core_animate::spec::AnimKey */) take their field docs from the Rust source, shown as raea's ("Rust: ..."), not Bevy's; core/animate's spec.rs gains the missing /// - a props type (StandardMaterialProps) takes its component's @bevy fields; the colour classes gain their @bevy tags - tools/manual-ref/sdk.ts check now fails on any prop, field or member without a description, as cli.ts does for flags; tools/manual-ref.sh links an export's node_modules (RAEA_MODULES) so it can run in L1's lane export --- core/animate/src/spec.rs | 6 + docs/manual/reference/sdk/3d.md | 761 ++- docs/manual/reference/sdk/animation.md | 86 +- docs/manual/reference/sdk/app.md | 74 +- docs/manual/reference/sdk/asset.md | 28 +- docs/manual/reference/sdk/audio.md | 126 +- docs/manual/reference/sdk/brief.md | 2 - docs/manual/reference/sdk/camera.md | 60 +- docs/manual/reference/sdk/color.md | 124 +- docs/manual/reference/sdk/dev_tools.md | 14 +- docs/manual/reference/sdk/feathers.md | 44 +- docs/manual/reference/sdk/gizmos.md | 18 +- docs/manual/reference/sdk/image.md | 26 +- docs/manual/reference/sdk/index.md | 4 +- docs/manual/reference/sdk/light.md | 50 +- docs/manual/reference/sdk/math.md | 32 +- docs/manual/reference/sdk/mesh.md | 173 +- docs/manual/reference/sdk/pbr.md | 286 +- docs/manual/reference/sdk/picking.md | 8 +- docs/manual/reference/sdk/post_process.md | 20 +- docs/manual/reference/sdk/raea.md | 573 +- docs/manual/reference/sdk/remote.md | 11 +- docs/manual/reference/sdk/sprite.md | 206 +- docs/manual/reference/sdk/state.md | 76 +- docs/manual/reference/sdk/text.md | 62 +- docs/manual/reference/sdk/time.md | 46 +- docs/manual/reference/sdk/transform.md | 24 +- docs/manual/reference/sdk/ui.md | 118 +- docs/manual/reference/sdk/video.md | 76 +- sdk/app/src/bevy/app.ts | 6 +- sdk/app/src/bevy/core.ts | 12 +- sdk/app/src/clock.tsx | 27 + sdk/app/src/machine/compiled.ts | 12 + sdk/app/src/machine/core.ts | 26 + sdk/asset/src/assets.ts | 3 + sdk/asset/src/glb.ts | 11 + sdk/audio/src/seedling.tsx | 1 + sdk/audio/src/song/core.ts | 54 + sdk/audio/src/song/plot.tsx | 4 + sdk/audio/src/song/song.ts | 3 + sdk/audio/src/speech.tsx | 1 + sdk/character/src/lint.ts | 7 + sdk/math/src/animate/components.tsx | 4 + sdk/math/src/animate/core.ts | 8 + sdk/math/src/animate/timelines.ts | 4 + sdk/math/src/interpolate.ts | 3 + sdk/math/src/spring.ts | 13 + sdk/physics/src/physics/bodies.tsx | 20 + sdk/physics/src/physics/core.tsx | 37 +- sdk/physics/src/physics/goo.tsx | 36 + sdk/render/src/3d/all.ts | 1 + sdk/render/src/3d/atlas.ts | 8 + sdk/render/src/3d/bevy.tsx | 19 +- sdk/render/src/3d/compute.tsx | 7 +- sdk/render/src/3d/core.tsx | 1 + sdk/render/src/3d/effects.tsx | 113 +- sdk/render/src/3d/grass.tsx | 11 + sdk/render/src/3d/instances.tsx | 9 + sdk/render/src/3d/look.tsx | 14 +- sdk/render/src/3d/materials.tsx | 1 + sdk/render/src/3d/model.tsx | 21 +- sdk/render/src/3d/phase.tsx | 13 +- sdk/render/src/3d/post.tsx | 4 + sdk/render/src/3d/shapes.tsx | 90 +- sdk/render/src/3d/sprite.tsx | 9 + sdk/render/src/3d/text.tsx | 28 + sdk/render/src/3d/three-shader.tsx | 6 + sdk/render/src/3d/volumetric.tsx | 102 + sdk/render/src/bevy3d.tsx | 3 +- sdk/render/src/bevy3d/all.ts | 1 + sdk/render/src/bevy3d/colors.ts | 8 +- sdk/render/src/bevy3d/colorspaces.ts | 28 +- sdk/render/src/bevy3d/core.tsx | 14 + sdk/render/src/bevy3d/extensions.tsx | 142 + sdk/render/src/bevy3d/feathers/color.tsx | 2 + sdk/render/src/bevy3d/feathers/controls.tsx | 7 +- sdk/render/src/bevy3d/feathers/display.tsx | 27 +- sdk/render/src/bevy3d/feathers/icons.ts | 9 +- sdk/render/src/bevy3d/feathers/listview.tsx | 1 + .../src/bevy3d/feathers/number-value.ts | 2 + sdk/render/src/bevy3d/feathers/select.tsx | 1 + sdk/render/src/bevy3d/feathers/slider.tsx | 1 + sdk/render/src/bevy3d/feathers/theme.tsx | 18 +- sdk/render/src/bevy3d/lights.tsx | 3 + sdk/render/src/bevy3d/material.tsx | 3 +- sdk/render/src/bevy3d/materials.tsx | 137 +- sdk/render/src/bevy3d/mesh2d.tsx | 29 +- sdk/render/src/bevy3d/okhsla.ts | 4 + sdk/render/src/bevy3d/procedural.tsx | 15 + sdk/render/src/bevy3d/text2d.tsx | 1 + sdk/render/src/bevy3d/ui-debug.tsx | 7 +- sdk/render/src/bevy3d/ui-edit.tsx | 1 + sdk/render/src/bevy3d/ui-font.ts | 2 + sdk/render/src/bevy3d/ui-image.tsx | 20 +- sdk/render/src/bevy3d/ui-material.tsx | 1 + sdk/render/src/bevy3d/ui-roots.tsx | 59 + sdk/render/src/bevy3d/ui-scroll.ts | 7 +- sdk/render/src/bevy3d/ui-texture.tsx | 9 +- sdk/render/src/bevy3d/ui-transform.ts | 9 +- sdk/render/src/bevy3d/ui.tsx | 50 +- sdk/render/src/daylight.tsx | 33 +- sdk/render/src/events3d.tsx | 16 + sdk/render/src/grow.ts | 7 + sdk/render/src/layers.tsx | 8 +- sdk/render/src/matchmove.tsx | 19 + sdk/render/src/paint.tsx | 15 + sdk/render/src/pick.ts | 4 + sdk/render/src/place.ts | 10 + sdk/render/src/screen.tsx | 2 + sdk/render/src/solid.ts | 11 + sdk/render/src/splat.tsx | 12 + sdk/video/src/input-region.tsx | 17 +- sdk/video/src/media.tsx | 11 + sdk/video/src/nudge.tsx | 2 + sdk/video/src/overlay.tsx | 9 +- sdk/video/src/panel.ts | 3 + sdk/video/src/region.tsx | 15 + sdk/video/src/registry.tsx | 15 + sdk/video/src/timeline.tsx | 29 +- tools/manual-ref.sh | 17 +- tools/manual-ref/bevy-docs.json | 4665 ++++++++++++++++- tools/manual-ref/bevy-docs.ts | 5 +- tools/manual-ref/sdk.ts | 57 +- 123 files changed, 7424 insertions(+), 2062 deletions(-) create mode 100644 sdk/render/src/3d/volumetric.tsx create mode 100644 sdk/render/src/bevy3d/extensions.tsx create mode 100644 sdk/render/src/bevy3d/ui-roots.tsx diff --git a/core/animate/src/spec.rs b/core/animate/src/spec.rs index fc2660d1..7497dced 100644 --- a/core/animate/src/spec.rs +++ b/core/animate/src/spec.rs @@ -33,6 +33,7 @@ pub struct Animation { pub freeze: Option, /// the frames per second its frames count; springs measure their settle time with it (0: the clock's) pub fps: f64, + /// the element's keyframed properties, one track each pub tracks: Vec, /// the local frame it's shown from, when it shows only for a window (mount="during"); before it, display none pub show_from: Option, @@ -45,7 +46,9 @@ pub struct Animation { #[cfg_attr(feature = "bevy", derive(bevy::prelude::Reflect), reflect(Default))] #[serde(default)] pub struct AnimTrack { + /// the property it keys: opacity, x, y, z, scale, rotate, width, height, blur, clip, a colour, `text`, or another number pub prop: String, + /// its keyframes in frame order pub keys: Vec, /// a length's unit: "px" (when empty) or "%" pub unit: String, @@ -55,6 +58,7 @@ pub struct AnimTrack { pub digits: u32, /// written before and after a `text` number (a counter's "$" and " pts") pub prefix: String, + /// written after a `text` number pub suffix: String, /// between a `text` number's thousands ("," writes 12,345); empty: none pub separator: String, @@ -65,7 +69,9 @@ pub struct AnimTrack { #[cfg_attr(feature = "bevy", derive(bevy::prelude::Reflect), reflect(Default))] #[serde(default)] pub struct AnimKey { + /// the local frame it's at pub at: f64, + /// a number property's value there pub value: f64, /// a colour property's value (CSS text); empty for numbers pub color: String, diff --git a/docs/manual/reference/sdk/3d.md b/docs/manual/reference/sdk/3d.md index bebdfc8c..b2b82c09 100644 --- a/docs/manual/reference/sdk/3d.md +++ b/docs/manual/reference/sdk/3d.md @@ -90,8 +90,8 @@ A Bevy resource (a plugin's settings: gravity), applied through the TypeRegistry | Prop | Type | What it does | | --- | --- | --- | -| `type` (required) | `string` | – | -| `value` (required) | `unknown` | – | +| `type` (required) | `string` | the resource's Rust type path, as the TypeRegistry names it | +| `value` (required) | `unknown` | its value as Bevy reflects it (JSON) | Used in: [shader_advanced/deferred_raymarch](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/deferred_raymarch.tsx). @@ -111,27 +111,27 @@ A rigid body inside : drawn where the simulation has it this frame. | Prop | Type | What it does | | --- | --- | --- | -| `name` (required) | `string` | – | +| `name` (required) | `string` | the body's name, unique in its : the bake keys its track by it | | `src` | `string` | a glTF's nodes as the body (drawn as a , its collider their hull) | -| `nodes` | `string[]` | – | +| `nodes` | `string[]` | the glTF nodes that make the body | | `shape` | `Shape` | "hull" (default for nodes), "box" (their bounds), "mesh" (exact triangles, fixed bodies only), or a shape | | `centre` | `Vec3` | where a given shape's centre stands at rest, world (a nodes' body: the middle of their bounds) | -| `fixed` | `boolean` | – | +| `fixed` | `boolean` | it never moves: a floor, a wall, a table | | `mass` | `number` | kg (else volume x density) | | `density` | `number` | kg/m³ (1000) | -| `friction` | `number` | – | -| `restitution` | `number` | – | -| `velocity` | `Vec3` | – | -| `angularVelocity` | `Vec3` | – | -| `linearDamping` | `number` | – | -| `angularDamping` | `number` | – | +| `friction` | `number` | 0 slides, 1 grips (0.5) | +| `restitution` | `number` | 0 lands dead, 1 bounces back fully (0.2) | +| `velocity` | `Vec3` | m/s at the start, world | +| `angularVelocity` | `Vec3` | radians a second at the start, world | +| `linearDamping` | `number` | how fast its motion bleeds off (0) | +| `angularDamping` | `number` | how fast its spin bleeds off (0.05) | | `release` | `number` | seconds: held where it is until then (a cup sits until it's knocked) | -| `impulses` | `Impulse[]` | – | +| `impulses` | `Impulse[]` | kicks at given seconds: an impulse, where it's applied, and a torque | | `path` | `(t: number) => { position: Vec3; quaternion: Quat }` | a kinematic mover: its rigid motion from rest at t seconds (see `about`); it pushes the others | | `material` | `PartMaterial` | drawn as the body's nodes are, or by its children (inside its motion: draw them where it stands at rest) | -| `glitch` | `Glitch \| ((t: number) => Glitch \| undefined)` | – | -| `castShadow` | `boolean` | – | -| `children` | `ReactNode` | – | +| `glitch` | `Glitch \| ((t: number) => Glitch \| undefined)` | how its part breaks up, or a function of seconds giving that | +| `castShadow` | `boolean` | it casts shadows | +| `children` | `ReactNode` | what draws the body, in place of its nodes | ### `BufferMesh` @@ -176,7 +176,7 @@ Also takes the props of [`Capsule3dProps`](#capsule3dprops) (`radius`, `half_len A compute over the frame, in the 3D beside the camera; several run in the order written, before the cameras draw. -Bevy: `raea_sys_compute::Computes`. +Rust: `raea_sys_compute::Computes`. Takes [`ComputeProps`](#computeprops)'s props. @@ -194,13 +194,7 @@ Also takes the props of [`ConeProps`](#coneprops) (`args`, `radius`, `height`). Bevy's Cuboid: `` is a Box of args [2, 1, 2]. -Bevy: `bevy_shape::Cuboid`. - -| Prop | Type | What it does | -| --- | --- | --- | -| `args` | `[number, number, number]` | – | - -Also takes the props of [`CuboidProps`](#cuboidprops) (`half_size`). +Also takes the props of [`CuboidProps`](#cuboidprops) (`half_size`); `BoxProps` (`args`). ### `Cylinder` @@ -210,8 +204,6 @@ Bevy: `bevy_shape::Cylinder`. Also takes the props of [`CylinderProps`](#cylinderprops) (`args`, `radius`, `half_height`). -Used in: [manual: turntable](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/turntable.tsx). - ### `Decal` A picture pressed onto whatever surface it lies across: a label on a jar, a stain on a counter, tiles on a wall, a @@ -228,7 +220,7 @@ Inside a Camera3d: its depth buffer copied each frame, after its prepass and bef image a Material samples (Bevy's shader_advanced/render_depth_to_texture, whose depth-only camera has Bevy's DepthPrepass, RenderTarget::None and Msaa off). -Bevy: `raea_sys_phase::DepthCopy`. +Rust: `raea_sys_phase::DepthCopy`. | Prop | Type | What it does | | --- | --- | --- | @@ -253,9 +245,9 @@ in a flat glowing `material`, so a fork "duplicates" along a line. | Prop | Type | What it does | | --- | --- | --- | -| `count` (required) | `number` | – | -| `step` (required) | `Vec3 \| ((k: number) => Vec3)` | – | -| `echo` | `PartMaterial` | – | +| `count` (required) | `number` | how many echoes trail the part | +| `step` (required) | `Vec3 \| ((k: number) => Vec3)` | metres between one echo and the next, or a function of the echo's number (1, 2,...) giving its offset | +| `echo` | `PartMaterial` | the echoes' material (the part's by default): a flat glowing one reads as copies | Also takes the props of [`PartProps`](#partprops). @@ -268,7 +260,7 @@ frame: ``. Needs the engine's tab | Prop | Type | What it does | | --- | --- | --- | -| `world` (required) | `{ scene(): unknown[] }` | – | +| `world` (required) | `{ scene(): unknown[] }` | the game's world at this frame: anything with \`scene()\` giving its entities | ### `Entity` @@ -282,14 +274,14 @@ hand-written element. | Prop | Type | What it does | | --- | --- | --- | | `name` | `string` | what an Entity field elsewhere names it by (a ChildOf's parent, an observer's target); unique in the scene | -| `position` | `Vec3` | – | +| `position` | `Vec3` | where it stands, metres (x, y, z) | | `rotation` | `Vec3` | Euler XYZ in radians | -| `scale` | `Vec3 \| number` | – | +| `scale` | `Vec3 \| number` | one number, or x, y and z | | `transform` | `{ translation?: Vec3; rotation?: [number, number, number, number]; scale?: Vec3 }` | Bevy's Transform (Transform.fromXyz(..).withRotation(..)), in place of position, rotation and scale: the entity is then a parent whose children (meshes, lights, models, other entities) move with it, as Bevy's ChildOf children do (the old Group) | | `pass` | `string` | with `transform`: the composition pass of every part inside that doesn't name its own (Mesh's `pass`) | | `children` | `ReactNode` | its Bevy components (, or the generated wrappers in raea/bevy-own); with `transform`, also the parts it carries | -Used in: [ui/widgets/viewport_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/viewport_node.tsx), [3d/3d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_shapes.tsx), [3d/atmospheric_fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/atmospheric_fog.tsx), [3d/3d_scene](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_scene.tsx), [3d/parenting](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/parenting.tsx), [stress_tests/many_foxes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/stress_tests/many_foxes.tsx), [camera/projection_zoom](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/camera/projection_zoom.tsx), [animation/animated_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/animated_transform.tsx), and 5 more. +Used in: [ui/widgets/viewport_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/viewport_node.tsx), [3d/3d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_shapes.tsx), [3d/atmospheric_fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/atmospheric_fog.tsx), [3d/3d_scene](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_scene.tsx), [3d/parenting](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/parenting.tsx), [stress_tests/many_foxes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/stress_tests/many_foxes.tsx), [camera/projection_zoom](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/camera/projection_zoom.tsx), [animation/animated_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/animated_transform.tsx), and 4 more. ### `Environment` @@ -358,7 +350,7 @@ Takes [`FogVolumeProps`](#fogvolumeprops)'s props. A full-screen pass over the scene camera's frame, beside the camera; several run in the order written. With a frame they run on its cells, before the look's composite. -Bevy: `raea_sys_framepass::FramePasses`. +Rust: `raea_sys_framepass::FramePasses`. Takes [`FramePassProps`](#framepassprops)'s props. @@ -370,7 +362,7 @@ Inside a Camera3d with Bevy's DepthPrepass and DeferredPrepass: your shader over deferred G-buffer after the deferred prepass (depth compared GreaterEqual), so Bevy's deferred lighting lights it as any surface, and into the shadow maps of the camera's lights (Bevy's shader_advanced/deferred_raymarch). -Bevy: `raea_sys_phase::GBufferPass`. +Rust: `raea_sys_phase::GBufferPass`. | Prop | Type | What it does | | --- | --- | --- | @@ -397,10 +389,10 @@ Objects melting into goo: the bake drawn by the frame (nothing before `from`). | Prop | Type | What it does | | --- | --- | --- | -| `name` | `string` | – | +| `name` | `string` | the entity's name, for picking and the inspector | | `seconds` (required) | `number` | how long, seconds, from `from` (a frame of the enclosing Sequence) | -| `from` | `number` | – | -| `objects` (required) | `GooObject[]` | – | +| `from` | `number` | the frame of the enclosing Sequence the bake starts at (0) | +| `objects` (required) | `GooObject[]` | what goes in: solids that melt and liquids that pour | | `colliders` | `{ box: { min: Vec3; max: Vec3 }; friction?: number }[]` | static boxes the goo lies on and runs off (world) | | `cups` | `GooCup[]` | hollow cylinders on a pose track (a mug lifted and tipped) that carry the goo and pour it (tools/goo's cups): radius inside, height foot to rim, base (the inside floor's height), wall, friction, and poses [t,...the cup's frame to world, 16 numbers column-major], t in seconds from the goo's start, its axis +y | | `surface` | `{ blur?: number; level?: number; flat?: number; maxTris?: number }` | the surface drawn round the particles: blur (grid nodes, 1), iso level (of the rest density, 0.33) and flat (the blur across over the blur up, 1); a wider, flatter blur and a lower level close a thin spill into one sheet. maxTris (120000): past it the grid coarsens, which drops a film one particle thick; a wide one needs more | @@ -410,12 +402,12 @@ Objects melting into goo: the bake drawn by the frame (nothing before `from`). | `fps` | `number` | the bake's own frame rate (the composition's by default): one bake shared by compositions at different rates | | `bounds` | `{ min: Vec3; max: Vec3 }` | the box it lives in: goo leaving it is gone | | `dx` | `number` | grid cell, metres (0.005): finer is slower and smoother | -| `seed` | `number` | – | -| `gravity` | `Vec3` | – | +| `seed` | `number` | the random seed the particles are placed with: the same seed bakes the same goo (0) | +| `gravity` | `Vec3` | gravity, m/s² (0, -9.81, 0) | | `roughness` | `number` | the surface: glossy, a little light through it | -| `clearcoat` | `number` | – | -| `subsurface` | `number` | – | -| `color` | `string` | – | +| `clearcoat` | `number` | 0..1 clear varnish over the surface | +| `subsurface` | `number` | 0..1 light let through the surface | +| `color` | `string` | the goo's colour where an object gives none | ### `Grade` @@ -432,7 +424,7 @@ A field of grass over `area`, made by the engine from the ground's functions (sa | Prop | Type | What it does | | --- | --- | --- | -| `name` | `string` | – | +| `name` | `string` | the entity's name, for picking, the inspector and world.* | | `area` (required) | `PlanBox` | the ground the field covers: a box on the plan (x, z, metres) | | `height` (required) | `(x: number, z: number) => number` | the ground's height at (x, z): the clumps stand on it, tilted to its slope | | `density` (required) | `number \| ((x: number, z: number) => number)` | clumps per square metre at (x, z) (0: bare) | @@ -440,14 +432,14 @@ A field of grass over `area`, made by the engine from the ground's functions (sa | `size` | `(x: number, z: number) => number` | a multiple of the clumps' size at (x, z) (1 without it) | | `tints` | `[string, string][]` | each patch's root and tip colours: ["#2c4a1a", "#5f8a2c"] | | `highlight` | `string` | the tips' highlight colour ("#f2e7a0") and how much of it each tip takes (0.22) | -| `highlightMix` | `number` | – | +| `highlightMix` | `number` | how much of the highlight each tip takes (0.22) | | `blades` | `number` | blades in a clump (14), their height in metres (0.3; each 0.55 to 1.3 times it), width range ([0.034, 0.05]) | -| `bladeHeight` | `number` | – | -| `width` | `[number, number]` | – | +| `bladeHeight` | `number` | their height in metres (0.3; each 0.55 to 1.3 times it) | +| `width` | `[number, number]` | a blade's width range, metres ([0.034, 0.05]) | | `spread` | `number` | how far from its clump's centre a blade stands (0.06 m), and how far it leans over its height ([0.2, 0.7]) | -| `lean` | `[number, number]` | – | +| `lean` | `[number, number]` | how far a blade leans over its height ([0.2, 0.7]) | | `scale` | `[number, number]` | each clump's scale, a random pick between these ([0.85, 1.35]), times `size` | -| `seed` | `number` | – | +| `seed` | `number` | which randomness places the clumps | | `resolution` | `number` | grid points a metre the functions are sampled at (2) | | `tile` | `number` | a tile's side in metres (4) | | `lod` | `GrassLod[]` | the steps of detail, nearest first (the engine's: every clump within 5 m, half of them in 8 blades to 14 m, a fifth in 5 blades beyond) | @@ -503,13 +495,13 @@ The mesh it's inside drawn again by your shader, in a phase of its own after the the colour target, with no depth test unless `depth`, back faces culled (Bevy's shader_advanced/custom_render_phase). It reads the mesh's colours at location 1 under VERTEX_COLORS when the mesh has them. -Bevy: `raea_sys_phase::MeshPass`. +Rust: `raea_sys_phase::MeshPass`. | Prop | Type | What it does | | --- | --- | --- | | `shader` (required) | `string` | the shader file, compiled as written: staticFile("shaders/x.wesl"). Its vertex input is the mesh's position at location 0 (a vec4 `compressed_position` under VERTEX_POSITIONS_COMPRESSED), its bind groups Bevy's mesh view (0) and mesh (2) | | `vertex` | `string` | its entry points (Bevy's default names) | -| `fragment` | `string` | – | +| `fragment` | `string` | the fragment entry point's name | | `depth` | `boolean` | whether it tests and writes the view's depth (GreaterEqual), as a mesh in Bevy's opaque phase does (Bevy's shader_advanced/specialized_mesh_pipeline); without, it draws over everything | Used in: [shader_advanced/specialized_mesh_pipeline](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/specialized_mesh_pipeline.tsx), [shader_advanced/custom_render_phase](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_render_phase.tsx). @@ -527,7 +519,7 @@ the view's colour and depth (compared GreaterEqual) after the main opaque pass ( shader_advanced/mesh_shader_intro). It needs a GPU with mesh shaders, as Apple silicon's Metal has; elsewhere it draws nothing and says so. -Bevy: `raea_sys_phase::MeshShaderPass`. +Rust: `raea_sys_phase::MeshShaderPass`. | Prop | Type | What it does | | --- | --- | --- | @@ -550,15 +542,15 @@ Bevy: `bevy_pbr::mesh_material::MeshMaterial3d child's maps take their own `sampler` | | `pass` | `string` | the composition pass it draws in ("scene" by default): a frame-wide effect told to skip a pass (, , , ) leaves its pixels as drawn, and gives one its own paint; a piece names at most three passes besides "scene"; keyed per frame | | `cloth` | `{ src: string; frame: number }` | a skinned model's own vertices replaced each frame by a baked cloth simulation (docs/cloth.md K2): `src` a.rseq of the model's vertices in its bind pose, in the glTF's order (raea/body tools/cloth.ts --bind), `frame` the one drawn (keyed per frame). The skin poses them, so its materials, alpha, morphs and bones are kept. | | `attach` | `{ to: string; bone: string }` | fixed to another model's bone (`to`: that model's name; `bone`: the node's name in its glTF, "Head"): it follows the bone's animated pose, and its position, rotation and scale are in the bone's space (a glTF's armature is often scaled, so a hat may need scale 0.01) | | `bones` | `Record` | a skinned model's joints placed where other models are, by name: `{ pelvis: "hero-pelvis",... }` puts the joint named pelvis wherever the model named hero-pelvis is each frame (its position and rotation; shrink it to hide it: scale 0.001, not 0, which takes the skin with it), so a ragdoll's bodies move one skin that bends at its joints rather than rigid pieces. The model's own placement stays at the origin. | -| `position` | `Vec3` | – | +| `position` | `Vec3` | where it stands, metres (x, y, z) | | `rotation` | `Vec3` | radians | -| `scale` | `number \| Vec3` | – | +| `scale` | `number \| Vec3` | one number, or x, y and z | | `allowOverlap` | `boolean` | it may pass through other parts on purpose (a blade into a body, a ghost through a wall): raea's clipping check leaves it out | | `posed` | `boolean` | set at an angle on purpose (a bowl knocked over, a mug on its side): `raea scene lint` doesn't call it tilted | | `animation` | `string \| number` | a clip to play: its name in the file, or its index | @@ -570,7 +562,7 @@ Bevy: `bevy_pbr::mesh_material::MeshMaterial3d \| number[]` | morph target (blend shape) weights, 0 to 1: by target name ({ smile: 0.8 }) or index ([0.8, 0]); up to 64. The names are fixed when the model is made: pass the same set every frame (0 for a target at rest) | | `time` | `number` | seconds into the clip (by default the Sequence's time: frame / fps); the clip loops unless loop={false} | -| `loop` | `boolean` | – | +| `loop` | `boolean` | false plays the clip once and holds its last pose | | `scene` | `number` | which of the file's scenes (0 by default) | | `look` | `"solid" \| "pixel" \| "site"` | how the model itself is drawn (the rest of the scene is unchanged): "solid" (its own surfaces, the default), "pixel" (pixel art: a cell per `pixelSize` frame pixels, outlined in `edgeColor`) or "site" (raea.io's grain: the cells' light ordered-dithered into the site's six greys). It may change from frame to frame. | | `flat` | `boolean` | its surfaces without light: shape and colour alone, like a drawing (the site look keeps the light: its grain is made of it) | @@ -580,7 +572,7 @@ Bevy: `bevy_pbr::mesh_material::MeshMaterial3d children: toon surfaces over the model's own materials (all of them, or one each by name); children: its materials (all, or one each by `material`) given the colour, texture or finish each gives, the rest kept | Used in: [3d/lightmaps](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/lightmaps.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx), [3d/atmospheric_fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/atmospheric_fog.tsx), [stress_tests/many_foxes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/stress_tests/many_foxes.tsx), [camera/projection_zoom](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/camera/projection_zoom.tsx), [animation/animated_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/animated_mesh.tsx), [gltf/gltf_skinned_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/gltf/gltf_skinned_mesh.tsx), [gltf/load_gltf](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/gltf/load_gltf.tsx), and 1 more. @@ -600,8 +592,6 @@ Takes [`MotionBlurProps`](#motionblurprops)'s props. Ink lines where the scene's depth steps or its surfaces turn, drawn before bloom and tone mapping; under a a cell wide (Return of the Obra Dinn's line). Put it inside the Canvas3D. -Bevy: `bevy_ui::Outline`. - Takes [`OutlineProps`](#outlineprops)'s props. ### `Part` @@ -610,30 +600,30 @@ A glTF's nodes drawn on their own, where they stood, moved by a rigid motion, gl | Prop | Type | What it does | | --- | --- | --- | -| `name` | `string` | – | +| `name` | `string` | the entity's name (the first node's by default) | | `src` (required) | `string` | the glTF (staticFile("x.glb")) and the nodes that make the part | -| `nodes` (required) | `string[]` | – | +| `nodes` (required) | `string[]` | the glTF nodes that make the part | | `position` | `Vec3` | a rigid motion from where it stands in the file (see `about`): position, and a quaternion [x, y, z, w] | -| `quaternion` | `Quat` | – | -| `scale` | `number` | – | -| `material` | `PartMaterial` | – | -| `glitch` | `Glitch` | – | -| `castShadow` | `boolean` | – | +| `quaternion` | `Quat` | its turn as a quaternion [x, y, z, w] (see `about`) | +| `scale` | `number` | a uniform scale (1) | +| `material` | `PartMaterial` | a material over the part's own (colour, glow, opacity) | +| `glitch` | `Glitch` | how the part breaks up this frame: explode, scramble, jitter, snap, smear | +| `castShadow` | `boolean` | it casts shadows | ### `PhaseItem` Your own pipeline drawing your own buffers in each camera's Opaque3d phase. -Bevy: `raea_sys_phase::PhaseItem`. +Rust: `raea_sys_phase::PhaseItem`. | Prop | Type | What it does | | --- | --- | --- | | `shader` (required) | `string` | the shader file, compiled as written: staticFile("shaders/x.wesl") | | `vertex` | `string` | its entry points (Bevy's default names) | -| `fragment` | `string` | – | +| `fragment` | `string` | the fragment entry point's name | | `stride` (required) | `number` | the vertex buffer: each vertex `stride` bytes, its 32-bit words in order (a u32 pad of 0 is a 0) | -| `attributes` (required) | `PhaseAttribute[]` | – | -| `words` (required) | `number[]` | – | +| `attributes` (required) | `PhaseAttribute[]` | the vertex buffer's attributes | +| `words` (required) | `number[]` | the vertex buffer's 32-bit words, every vertex's in order | | `indices` (required) | `number[]` | the index buffer (u32), drawn whole | | `depth` | `{ write?: boolean; compare?: "Never" \| "Less" \| "Equal" \| "LessEqual" \| "Greater" \| "No…` | its depth state: whether it writes depth, and its compare (Bevy's CompareFunction by name; Bevy's opaque default, Greater, when left out) | | `aabb` (required) | `{ center: [number, number, number]; half_extents: [number, number, number] }` | its bounds, so the camera sees it (Bevy's Aabb): a centre and half extents | @@ -649,11 +639,11 @@ fragments). Before `from` and after `seconds` they hold their first and last pos | Prop | Type | What it does | | --- | --- | --- | | `seconds` (required) | `number` | how long to simulate, seconds | -| `gravity` | `Vec3` | – | +| `gravity` | `Vec3` | m/s² (0, -9.81, 0) | | `substeps` | `number` | steps per frame (8) | | `colliders` | `{ min: Vec3; max: Vec3; friction?: number; restitution?: number }[]` | static boxes (world, metres): the floor, the table top | | `from` | `number` | the frame (of the enclosing Sequence) the simulation starts on (0); before it everything is at rest | -| `children` | `ReactNode` | – | +| `children` | `ReactNode` | the elements to simulate, and anything else to draw | ### `Plane3d` @@ -677,8 +667,8 @@ colour, texture or finish each gives, the rest of it kept (a run of cabinets pai | Prop | Type | What it does | | --- | --- | --- | -| `materials` (required) | `MeshStandardMaterialProps[]` | – | -| `children` | `ReactNode` | – | +| `materials` (required) | `MeshStandardMaterialProps[]` | the finishes, each a 's props, over every glTF material or the one its `material` names | +| `children` | `ReactNode` | the models refinished | ### `RichText` @@ -717,8 +707,8 @@ Bevy: `bevy_pbr::mesh_material::MeshMaterial3d keeps a page crisp under a paint look | Also takes the props of [`ScreenSource`](#screensource). @@ -729,7 +719,7 @@ The mesh it's inside drawn once per instance in one draw, by your shader, in the vertex buffer of your words stepped per instance (Bevy's shader_advanced/custom_shader_instancing). Its instances aren't in the mesh's bounds: give the mesh Bevy's NoFrustumCulling (). -Bevy: `raea_sys_phase::ShaderInstances`. +Rust: `raea_sys_phase::ShaderInstances`. | Prop | Type | What it does | | --- | --- | --- | @@ -790,8 +780,6 @@ Takes [`SpanProps`](#spanprops)'s props. ### `Sphere` -*From Bevy's `bevy_shape::Sphere`:* A sphere primitive, representing the set of all points some distance from the origin - Also takes the props of [`SphereProps`](#sphereprops) (`args`, `radius`, `ico`, `uv`). Used in: [3d/bloom_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/bloom_3d.tsx). @@ -883,8 +871,8 @@ for the depth buffer and flicker in stripes (z-fighting), stronger with `amount` | Prop | Type | What it does | | --- | --- | --- | -| `amount` (required) | `number` | – | -| `other` | `PartMaterial` | – | +| `amount` (required) | `number` | radians the second copy is turned (~0.002): more is stronger stripes | +| `other` | `PartMaterial` | the second copy's material | Also takes the props of [`PartProps`](#partprops). @@ -1154,13 +1142,12 @@ area and bounds. Offset, combine and move it, then extrude or revolve it into a | Member | What it does | | --- | --- | -| `new CrossSection(a: SectionAnswer)` | – | | `CrossSection.from(a: SectionAnswer): CrossSection` | From an engine answer (a slice, a projection, an operation). | | `CrossSection.of(polygons: Polygons): CrossSection` | Contours, overlaps merged and self-crossings resolved (Manifold's positive fill rule). | -| `.polygons: Polygons` | – | -| `.area: number` | – | -| `.contours: number` | – | -| `.bounds: { min: [number, number]; max: [number, number]; }` | – | +| `.polygons: Polygons` | its contours, each a list of [x, y] points: counter-clockwise solid, clockwise holes | +| `.area: number` | its area, m² | +| `.contours: number` | how many contours it has | +| `.bounds: { min: [number, number]; max: [number, number]; }` | its bounding box's low and high corners | | `.union(...others: CrossSection[]): CrossSection` | This and the others together. | | `.minus(...others: CrossSection[]): CrossSection` | This with the others cut away. | | `.intersect(...others: CrossSection[]): CrossSection` | Only where this and every other overlap. | @@ -1184,11 +1171,11 @@ A signed distance field (negative inside), as the text raea-core-sdf reads. Y is | Member | What it does | | --- | --- | -| `new Field(text: string)` | – | -| `.text: string` | – | -| `.move(x: number, y: number, z: number): Field` | – | +| `new Field(text: string)` | A field from its text, as raea-core-sdf reads it. | +| `.text: string` | the field as the text raea-core-sdf reads | +| `.move(x: number, y: number, z: number): Field` | The field moved by (x, y, z) metres. | | `.rotate(x: number, y: number, z: number): Field` | Degrees about x, then y, then z (as a Solid's rotate). | -| `.scale(s: number): Field` | – | +| `.scale(s: number): Field` | The field scaled by `s` about its origin. | | `.mirrorX(): Field` | Both sides: the field and its mirror across x = 0 (a body's left and right from one). | | `.round(r: number): Field` | Grown outward by r, every edge rounded by it. | | `.shell(t: number): Field` | Hollow: a skin 2t thick on the surface. | @@ -1201,8 +1188,8 @@ A handle to a native solid. Free it when done with many (or let the run end). | Member | What it does | | --- | --- | -| `new Solid(id: number, expr: string)` | – | -| `.id: number` | – | +| `new Solid(id: number, expr: string)` | A handle to native solid `id`, which `expr` rebuilds; the shape functions make these, rarely you. | +| `.id: number` | the native solid's handle | | `.expr: string` | the expression that rebuilds this solid (what a mesh row draws) | | `.union(...others: Solid[]): Solid` | This and the others together. | | `.minus(...others: Solid[]): Solid` | This with the others cut away. | @@ -1341,10 +1328,10 @@ type AnimGraphNode = | { clip: string | number; time?: number; weight?: number; | Field | Type | What it is | | --- | --- | --- | -| `fps` (required) | `number` | – | -| `frames` (required) | `number` | – | -| `file` (required) | `string` | – | -| `bodies` (required) | `Record` | – | +| `fps` (required) | `number` | the frame rate it was baked at | +| `frames` (required) | `number` | how many frames it holds | +| `file` (required) | `string` | the bake's file in the asset store | +| `bodies` (required) | `Record` | each body's track by name: positions and quaternions a frame, flat, and its rest centre | ### `BevyComponentProps` @@ -1357,7 +1344,7 @@ as bevy_light's ShadowFilteringMethod or bevy_pbr's ScreenSpaceReflections), app | Field | Type | What it is | | --- | --- | --- | -| `children` | `ReactNode` | – | +| `children` | `ReactNode` | Bevy components on it: , or a generated wrapper | | `layers` | `number[]` | a camera: the render layers it draws ([0] by default); a light: the layers it lights (Bevy's RenderLayers) | ### `BloomProps` @@ -1377,8 +1364,8 @@ The props of [`Body`](#body), tabled there. | Field | Type | What it is | | --- | --- | --- | -| `min` (required) | `Vec3` | – | -| `max` (required) | `Vec3` | – | +| `min` (required) | `Vec3` | the low corner | +| `max` (required) | `Vec3` | the high corner | ### `BufferMeshProps` @@ -1397,7 +1384,7 @@ The props of [`Body`](#body), tabled there. | --- | --- | --- | | `layered` | `boolean` | the 3D takes its place in the page's tree order instead of lying under the whole page: page elements before the Canvas3D (and the backgrounds of the elements holding it) are under the 3D, showing wherever it has nothing, and hidden by its parts; positioned elements after it are over it. The 3D's background is transparent. Put the Canvas3D straight in a full-frame AbsoluteFill. | | `clearColor` | `string` | only with `layered`: the 3D clears to this CSS colour instead of transparent, so its translucent parts blend over it in linear light, as Bevy's do over its ClearColor (a Bevy 2D scene's rgb(43, 44, 47)), not over the page in sRGB. The 3D then lies under the whole page, as Bevy's camera output lies under all its UI (a GlobalZIndex(-1) too). | -| `children` | `ReactNode` | – | +| `children` | `ReactNode` | the 3D scene: cameras, lights and parts | ### `Capsule3dProps` @@ -1405,15 +1392,15 @@ Bevy's Capsule3d: radius and half_length, the straight part's half (0.5 each by | Field | Type | What it is | | --- | --- | --- | -| `radius` | `number` | – | -| `half_length` | `number` | – | -| `args` | `[number, number]` | – | +| `radius` | `number` | metres (0.5) | +| `half_length` | `number` | half the straight part's length, metres (0.5) | +| `args` | `[number, number]` | [radius, length of the straight part] | ### `CapsuleProps` | Field | Type | What it is | | --- | --- | --- | -| `args` | `[number, number]` | – | +| `args` | `[number, number]` | [radius, length of the straight part] ([0.5, 1]) | ### `ComputeProps` @@ -1438,9 +1425,9 @@ A compute shader (raea-sys-compute). Its source has one `@compute` entry point a | Field | Type | What it is | | --- | --- | --- | -| `args` | `[number, number]` | – | -| `radius` | `number` | – | -| `height` | `number` | – | +| `args` | `[number, number]` | [radius, height] | +| `radius` | `number` | the base's radius, metres (0.5) | +| `height` | `number` | metres (1) | ### `CrtSettings` @@ -1470,7 +1457,7 @@ Bevy's Cuboid: half its size along each axis ([0.5, 0.5, 0.5], a 1 m cube, as Be | Field | Type | What it is | | --- | --- | --- | -| `half_size` | `[number, number, number]` | – | +| `half_size` | `[number, number, number]` | half its size along x, y and z, metres ([0.5, 0.5, 0.5]) | ### `CylinderProps` @@ -1478,27 +1465,27 @@ Bevy's Cuboid: half its size along each axis ([0.5, 0.5, 0.5], a 1 m cube, as Be | Field | Type | What it is | | --- | --- | --- | -| `args` | `[number, number, number]` | – | -| `radius` | `number` | – | -| `half_height` | `number` | – | +| `args` | `[number, number, number]` | [radius top, radius bottom, height], as three.js's args | +| `radius` | `number` | metres (0.5) | +| `half_height` | `number` | half its height, metres (0.5) | ### `DecalProps` | Field | Type | What it is | | --- | --- | --- | | `src` (required) | `string` | the picture pressed onto the surface: staticFile("label.png"); its clear parts show the surface through | -| `name` | `string` | – | -| `normalMap` | `string` | – | +| `name` | `string` | the entity's name, for picking, the inspector and world.* | +| `normalMap` | `string` | a normal map pressed with the picture: the label's relief | | `size` | `number \| [number, number]` | width by height in metres (a number: a square) | -| `position` | `Vec3` | – | +| `position` | `Vec3` | where it stands, metres (x, y, z) | | `normal` | `Vec3` | which way the surface faces at the decal (out of it; [0, 1, 0], a floor or counter, by default): turns the decal so the picture lies on it, upright on a wall, its top toward -z on a floor. Instead of rotation | | `spin` | `number` | a turn about the normal (radians) | | `rotation` | `Vec3` | radians, the decal's +y out of the surface (rather than normal) | | `color` | `string` | a tint times the picture (keyed: a stain darkening) | | `opacity` | `number` | 0 to 1 (keyed: a label fading in) | -| `roughness` | `number` | – | -| `metalness` | `number` | – | -| `unlit` | `boolean` | – | +| `roughness` | `number` | 0..1, smooth to matte | +| `metalness` | `number` | 0..1, a dielectric to a metal | +| `unlit` | `boolean` | drawn in its flat colour, without light or shade | | `fade` | `number` | how far off its plane (metres) it still lies on a surface, fading to nothing there (0.05 by default). Anything nearer the plane than this takes it, a cabinet's side or a fridge's as well as the wall: keep it small | ### `DepthCopyProps` @@ -1513,8 +1500,8 @@ The props of [`DepthCopy`](#depthcopy), tabled there. | `mode` | `"bokeh" \| "gaussian"` | "bokeh" (round, as a real lens; the default) or "gaussian" (soft, cheaper) | | `maxBlur` | `number` | the largest blur, in pixels of the frame (64 by default) | | `focal_distance` | `number` | Bevy's fields, as Bevy's DepthOfField component on a Camera3d (inside it), Bevy's defaults: the distance in focus (10; the camera's `focus`), the f-number (1), the largest blur in pixels (64), "Bokeh" or "Gaussian" | -| `aperture_f_stops` | `number` | – | -| `max_circle_of_confusion_diameter` | `number` | – | +| `aperture_f_stops` | `number` | the f-number (1): lower is a shallower focus | +| `max_circle_of_confusion_diameter` | `number` | the largest blur, in px (64) | ### `EntityProps` @@ -1578,8 +1565,6 @@ type FogColor = string | { red: number; green: number; blue: number; alpha: numb bevy_pbr's FogFalloff as it reflects; FogFalloff's constructors (raea/pbr) make one from a visibility distance -Bevy: `bevy_pbr::FogFalloff`. - ```ts type FogFalloff = | { Linear: { start: number; end: number } } | { Exponential: { density: number } } | { ExponentialSquared: { density: number } } | { Atmospheric: { extinction: [number, number, number]; inscattering: [number, number, number] } } ``` @@ -1590,7 +1575,7 @@ type FogFalloff = | { Linear: { start: number; end: number } } | { Exponential: | --- | --- | --- | | `color` | `FogColor` | what far things fade into: match the background | | `near` | `number` | linear fog from `near` to `far` (in the Canvas3D 5 and 20 by default; on the camera Bevy's 0 and 100) | -| `far` | `number` | – | +| `far` | `number` | where linear fog is full, from the camera (20 in the Canvas3D, 100 on a camera) | | `density` | `number` | or exponential fog of this density (0.05-0.3), instead of near and far | | `falloff` | `FogFalloff` | on the camera: Bevy's FogFalloff, in place of near, far and density (Bevy's default Linear 0 to 100) | | `directional_light_color` | `FogColor` | on the camera: the sun's colour in the fog looking towards it, its alpha its strength (Bevy's default none) | @@ -1653,10 +1638,10 @@ type GizmoColor = string | [number, number, number, number] | { red: number; gre | `color` | `GizmoColor \| GizmoColor[]` | one colour for every point, or one per point of `lines` (two per segment) then `strip`: "#rrggbb", Bevy's LinearRgba (above 1 for HDR, as bevy_gizmos takes it) or Srgba, or linear [r, g, b, a] | | `width` | `number` | line width in pixels (Bevy's default 2) | | `depthBias` | `number` | -1 always in front of geometry, 0 depth-tested as it is (Bevy's GizmoLineConfig and depth_bias) | -| `position` | `Vec3` | – | -| `rotation` | `Vec3` | – | -| `scale` | `Vec3 \| number` | – | -| `name` | `string` | – | +| `position` | `Vec3` | where it stands, metres (x, y, z) | +| `rotation` | `Vec3` | its rotation, Euler angles in radians (x, y, z) | +| `scale` | `Vec3 \| number` | its scale: one number, or x, y and z | +| `name` | `string` | the entity's name, for picking, the inspector and world.* | ### `Glitch` @@ -1677,11 +1662,11 @@ What a glyph is, for a 's `glyph` function. | --- | --- | --- | | `index` (required) | `number` | its place among the drawn glyphs (spaces aren't glyphs), from 0 | | `count` (required) | `number` | how many glyphs the block has | -| `char` (required) | `string` | – | +| `char` (required) | `string` | the character it draws | | `word` (required) | `number` | its word's place among the words, from 0, and how many there are | -| `words` (required) | `number` | – | +| `words` (required) | `number` | how many words the block has | | `inWord` (required) | `number` | its place in its word, and the word's glyph count | -| `wordLength` (required) | `number` | – | +| `wordLength` (required) | `number` | how many glyphs its word has | | `line` (required) | `number` | its line (by the newlines in the text), from 0 | | `span` (required) | `number` | its run: the it's in (0 for text outside any, counted in order) | @@ -1694,41 +1679,41 @@ multiplied into (scale, opacity) or replacing (color, visible) what the block's | --- | --- | --- | | `position` | `Vec3` | metres, from its place in the block | | `rotation` | `Vec3` | radians, XYZ | -| `scale` | `number \| Vec3` | – | -| `color` | `string` | – | -| `opacity` | `number` | – | -| `visible` | `boolean` | – | +| `scale` | `number \| Vec3` | multiplies its size: one number, or x, y and z | +| `color` | `string` | replaces its colour | +| `opacity` | `number` | multiplies its opacity, 0..1 | +| `visible` | `boolean` | false hides it this frame | ### `GooBake` | Field | Type | What it is | | --- | --- | --- | -| `file` (required) | `string` | – | -| `stats` (required) | `{ objects?: { name: string; hideFrame: number }[]; [k: string]: unknown }` | – | +| `file` (required) | `string` | the baked.rseq this goo plays | +| `stats` (required) | `{ objects?: { name: string; hideFrame: number }[]; [k: string]: unknown }` | what the bake measured, with each object's name and the frame its original model should go | ### `GooObject` | Field | Type | What it is | | --- | --- | --- | -| `name` (required) | `string` | – | +| `name` (required) | `string` | the object's name; the bake's stats list it, with the frame its original model should go | | `src` | `string` | a glTF's nodes (world space as they stand in it), moved by `transform` (column-major 4x4) if given; or, with no src, `cup` and `level`: a liquid filling one of the goo's cups to `level` metres above its foot | -| `nodes` | `string[]` | – | -| `cup` | `number` | – | -| `level` | `number` | – | -| `transform` | `number[]` | – | +| `nodes` | `string[]` | the glTF nodes it's made of (all of them when left out) | +| `cup` | `number` | with no src: the index of the cup in `cups` it fills | +| `level` | `number` | with no src: metres above the cup's foot it's filled to | +| `transform` | `number[]` | a column-major 4x4 that moves the glTF's nodes | | `liquid` | `"water" \| "coffee" \| "tea" \| "milk" \| "juice" \| "oil" \| "syrup" \| "honey"` | sph: what it is ("water" by default: coffee, tea, milk, juice, oil, syrup, honey set its colour, density and viscosity), and where it comes from if not a cup or a glTF (filled): a box of it, or an emitter pouring a round stream from `at` along `dir` (down) at `speed` m/s, `radius` m (6 mm) across, from `start` to `end` seconds | -| `block` | `{ min: Vec3; max: Vec3 }` | – | -| `emitter` | `{ at: Vec3; dir?: Vec3; radius?: number; speed?: number; start?: number; end?: number }` | – | +| `block` | `{ min: Vec3; max: Vec3 }` | sph: a box of liquid, world min and max corners | +| `emitter` | `{ at: Vec3; dir?: Vec3; radius?: number; speed?: number; start?: number; end?: number }` | sph: a round stream poured from `at` along `dir`, `radius` m across, at `speed` m/s, from `start` to `end` seconds | | `start` (required) | `number` | seconds from the goo's start when it begins to soften, and how long until it runs (mpm) | -| `melt` | `number` | – | +| `melt` | `number` | seconds from `start` until it runs (2) | | `stiffness` | `number` | of the solid (3e4) and the fluid it becomes (4) | -| `viscosity` | `number` | – | -| `density` | `number` | – | +| `viscosity` | `number` | how thick the fluid it becomes is (4) | +| `density` | `number` | its density, kg/m³ (1000) | | `cohesion` | `number` | the share of its pressure it keeps under tension (0.6): goo holds together in strands, a liquid (0.02) barely | | `residual` | `number` | the share of its shear stiffness a fluid keeps (0.12) and the strain it must pass to flow (0.005): 0 and 0 for a liquid | -| `yield` | `number` | – | +| `yield` | `number` | the strain a fluid must pass to flow (0.005; 0 for a liquid) | | `fill` | `"solid" \| "shell"` | "solid" fills its volume; "shell" a skin `thickness` thick (plates, petals) | -| `thickness` | `number` | – | +| `thickness` | `number` | with `fill: "shell"`: the skin's thickness, metres | | `color` | `string` | its goo's colour (else its texture's) | ### `GooProps` @@ -1742,9 +1727,9 @@ The props of [`Goo`](#goo), tabled there. | `temperature` | `number` | warmer (+) or cooler (-): a shift of the CIE x chromaticity, about -0.3 to 0.3 | | `tint` | `number` | magenta (+) or green (-) | | `saturation` | `number` | the whole frame's saturation after tone mapping (1 keeps it) | -| `shadows` | `GradeSection` | – | -| `midtones` | `GradeSection` | – | -| `highlights` | `GradeSection` | – | +| `shadows` | `GradeSection` | the grade on the shadows: saturation, contrast, gamma, gain, lift | +| `midtones` | `GradeSection` | the grade on the midtones | +| `highlights` | `GradeSection` | the grade on the highlights | | `vignette` | `number \| { intensity?: number; radius?: number; smoothness?: number; color?: string }` | the corners darkened: 0 none, 1 black; or {intensity, radius (0.75), smoothness (5), color} | | `aberration` | `number` | a lens's colour fringes at edges, as a fraction of the frame (0.005 subtle, 0.02 strong) | | `skip` | `string[]` | composition passes (a part's `pass`) the grade leaves as drawn: no fringes or vignette on them, and on an untonemapped camera (a paint Look's) no colour grading either | @@ -1767,11 +1752,11 @@ One step of detail: tiles nearer than `to` metres draw `keep` of their clumps (0 | Field | Type | What it is | | --- | --- | --- | -| `to` (required) | `number` | – | -| `keep` (required) | `number` | – | -| `blades` (required) | `number` | – | -| `segments` (required) | `number` | – | -| `widen` (required) | `number` | – | +| `to` (required) | `number` | tiles nearer than this many metres take this step | +| `keep` (required) | `number` | the share of their clumps they draw, 0 to 1 | +| `blades` (required) | `number` | how many of each clump's blades they draw | +| `segments` (required) | `number` | segments each blade is drawn in | +| `widen` (required) | `number` | how many times as wide each blade is drawn, to fill in for the ones left out | ### `GrassProps` @@ -1781,7 +1766,7 @@ The props of [`Grass`](#grass), tabled there. | Field | Type | What it is | | --- | --- | --- | -| `name` (required) | `string` | – | +| `name` (required) | `string` | the pickable it hit | | `distance` (required) | `number` | metres from the camera (from its near plane's point, for an orthographic one) along the ray | | `point` (required) | `Vec3` | where the ray first meets it, in world space | @@ -1790,12 +1775,12 @@ The props of [`Grass`](#grass), tabled there. | Field | Type | What it is | | --- | --- | --- | | `src` (required) | `string` | a picture in the media folder: staticFile("poster.png") | -| `name` | `string` | – | +| `name` | `string` | the entity's name, for picking and the inspector | | `width` | `number` | width in scene units (1 by default); height follows the picture unless given | -| `height` | `number` | – | -| `position` | `Vec3` | – | +| `height` | `number` | in scene units (follows the picture's shape by default) | +| `position` | `Vec3` | where its centre stands, metres (x, y, z) | | `rotation` | `Vec3` | radians | -| `scale` | `number \| Vec3` | – | +| `scale` | `number \| Vec3` | one number, or x, y and z | | `quaternion` | `[number, number, number, number]` | a turn as a quaternion [x, y, z, w], instead of `rotation` (a card turned to face a point) | | `shadow` | `boolean` | false: the card casts no shadow (a cursor or a UI floating in the scene); true by default | | `cutout` | `boolean` | the picture cut out at half alpha instead of blended: its clear parts are no surface at all (no fog on them, no sorting) and its shadow is the picture's shape, not the card's. For hard-edged pictures: a baked cloud, a sprite | @@ -1809,7 +1794,7 @@ The props of [`Grass`](#grass), tabled there. | `t` (required) | `number` | seconds from the simulation's start | | `impulse` | `Vec3` | N·s, world | | `at` | `Vec3` | where it's applied (world, metres): off the centre it spins the body too | -| `torque` | `Vec3` | – | +| `torque` | `Vec3` | an angular impulse, N·m·s, world | ### `Instance` @@ -1818,9 +1803,9 @@ copy together). Rotation in radians, XYZ order, as everywhere. | Field | Type | What it is | | --- | --- | --- | -| `position` (required) | `Vec3` | – | -| `rotation` | `Vec3` | – | -| `scale` | `number \| Vec3` | – | +| `position` (required) | `Vec3` | where this copy stands, metres, in the Instances' space | +| `rotation` | `Vec3` | its rotation, Euler angles in radians (x, y, z) | +| `scale` | `number \| Vec3` | its scale: one number, or x, y and z | ### `InstancesProps` @@ -1828,15 +1813,15 @@ copy together). Rotation in radians, XYZ order, as everywhere. | --- | --- | --- | | `src` | `string` | a glTF file drawn at every placement: staticFile("models/house.glb"). Without it, a geometry child (or `shape`) and a material child draw a mesh at every placement | | `at` (required) | `Instance[]` | where each copy stands. Fixed for the shot: the first frame's list is drawn on every frame (move, turn, scale, hide or recolour the whole set by the Instances' own props) | -| `name` | `string` | – | -| `position` | `Vec3` | – | +| `name` | `string` | the entity's name, for picking, the inspector and world.* | +| `position` | `Vec3` | where it stands, metres (x, y, z) | | `rotation` | `Vec3` | radians | -| `scale` | `number \| Vec3` | – | +| `scale` | `number \| Vec3` | its scale: one number, or x, y and z | | `scene` | `number` | of a glTF: which of its scenes (0 by default) | | `shape` | `string \| Solid` | a Manifold solid or its expression for the mesh form; wins over the geometry child | | `shadow` | `boolean` | false: the copies cast no shadow (true by default). Grass and flowers by the thousand usually want false | | `receiveShadow` | `boolean` | false: no shadow falls on the copies | -| `pass` | `string` | – | +| `pass` | `string` | the composition pass it draws in ("scene" by default) | | `children` | `ReactNode` | the mesh form: a geometry and a material (MeshStandardMaterial, MeshPhysicalMaterial or MeshBasicMaterial). The glTF form: MeshStandardMaterial children re-covering its materials, as on a Model | ### `Layout` @@ -1857,7 +1842,7 @@ type Layout = Record & { readonly found: PlaceFinding[]; readonl | Field | Type | What it is | | --- | --- | --- | | `k1` | `number` | Brown-Conrady: r' = r (1 + k1 r^2 + k2 r^4), r a share of the half-diagonal. Above 0 barrel, below 0 pincushion | -| `k2` | `number` | – | +| `k2` | `number` | the r^4 term of the distortion | | `zoom` | `number` | by default just enough for a barrel's corners to stay inside the picture (1 for pincushion) | | `edges` | `"clamp" \| "black"` | what shows where the lens looks past the picture: its edge pixels ("clamp", the default) or "black" | | `animate` | `Animate3d` | declared animation of its numbers (strength, fov, k1, k2, zoom) | @@ -1875,14 +1860,14 @@ shadow edge, strokes, saturation and wash; what it leaves out is the Look's. | Field | Type | What it is | | --- | --- | --- | -| `rag` | `number` | – | -| `grain` | `number` | – | +| `rag` | `number` | how far its edges wander, px (the Look's by default) | +| `grain` | `number` | its paper grain, 0 to 1 | | `palette` | `boolean` | false: its pixels aren't snapped to the palette | -| `bands` | `number` | – | -| `edge` | `number` | – | -| `stroke` | `number` | – | -| `saturate` | `number` | – | -| `wash` | `number` | – | +| `bands` | `number` | how many flat tones the light makes on its surfaces, 1-8 | +| `edge` | `number` | how far its cast shadows' edges tear, 0 to 0.5 | +| `stroke` | `number` | brush strokes on its surfaces, 0 to 1 | +| `saturate` | `number` | its colour past (above 1) or toward grey (below 1) its own | +| `wash` | `number` | its textures' colour taken as their patch average, 0 to 1 | ### `LookProps` @@ -1890,8 +1875,8 @@ shadow edge, strokes, saturation and wash; what it leaves out is the Look's. | Field | Type | What it is | | --- | --- | --- | -| `t` (required) | `number` | – | -| `position` (required) | `Vec3` | – | +| `t` (required) | `number` | seconds into the clip | +| `position` (required) | `Vec3` | where the camera is, in the solved world (metres) | | `quaternion` (required) | `[number, number, number, number]` | camera to world, [x, y, z, w]; the camera looks down its -Z with +Y up | | `solved` (required) | `boolean` | false: COLMAP didn't register this frame and its pose was interpolated | @@ -1901,7 +1886,7 @@ shadow edge, strokes, saturation and wash; what it leaves out is the Look's. | --- | --- | --- | | `src` (required) | `string` | the footage: staticFile("clip.mp4") | | `from` | `number` | where in the clip the shot starts, and how long it runs (seconds; 0 = to the end) | -| `seconds` | `number` | – | +| `seconds` | `number` | how long the shot runs, seconds (0: to the clip's end) | | `subject` | `[number, number, number, number]` | the subject to keep in front of the 3D and out of the solve: a box around it on the first frame, [x, y, w, h] in 0..1 of the frame (EdgeTAM tracks it from there) | | `height` | `number` | the camera's height over the ground in metres (1.6 by default: handheld) | | `fov` | `number` | the vertical field of view in degrees, for a shot without parallax (a tripod, a pan); a solve with structure finds its own | @@ -1919,24 +1904,24 @@ What `raea track` writes and draws from. | Field | Type | What it is | | --- | --- | --- | -| `mode` (required) | `"sfm" \| "rotation" \| "static"` | – | +| `mode` (required) | `"sfm" \| "rotation" \| "static"` | "sfm": a full solve with structure; "rotation": the camera only turns (too little parallax, or too few frames registered); "static": it doesn't move | | `width` (required) | `number` | the footage's size in pixels, and its frame rate | -| `height` (required) | `number` | – | -| `fps` (required) | `number` | – | -| `from` (required) | `number` | – | -| `seconds` (required) | `number` | – | -| `frames` (required) | `number` | – | +| `height` (required) | `number` | the footage's height in pixels | +| `fps` (required) | `number` | the footage's frame rate | +| `from` (required) | `number` | where in the clip the solve starts, seconds | +| `seconds` (required) | `number` | how long it runs, seconds | +| `frames` (required) | `number` | how many frames it solved | | `fov` (required) | `number` | vertical field of view, degrees; focal length in pixels; the lens's radial distortion | -| `focal` (required) | `number` | – | -| `k1` (required) | `number` | – | -| `registered` (required) | `number` | – | +| `focal` (required) | `number` | the focal length in pixels, at the footage's full size | +| `k1` (required) | `number` | the lens's radial distortion | +| `registered` (required) | `number` | how many frames COLMAP registered; the rest were interpolated | | `error` (required) | `number \| null` | mean reprojection error in pixels (null without structure) | -| `camera_height` (required) | `number` | – | -| `cameras` (required) | `MatchmoveCamera[]` | – | +| `camera_height` (required) | `number` | the camera's height over the ground, metres, that set the world's scale | +| `cameras` (required) | `MatchmoveCamera[]` | the camera a frame | | `points` (required) | `Vec3[]` | the sparse points, in the solved world | -| `ground` (required) | `{ y: number; normal: Vec3 }` | – | +| `ground` (required) | `{ y: number; normal: Vec3 }` | the ground plane: its height (0) and normal (+Y) | | `cut` (required) | `string \| null` | the subject's cut-outs, a path with %04d for the frame (1-based), or null | -| `notes` (required) | `string[]` | – | +| `notes` (required) | `string[]` | what the solver noticed: fallbacks, an assumed field of view, interpolated frames | ### `MatchmoveState` @@ -1944,10 +1929,10 @@ Each frame's state under a , for the 3D inside it. | Field | Type | What it is | | --- | --- | --- | -| `solve` (required) | `MatchmoveSolve` | – | +| `solve` (required) | `MatchmoveSolve` | the solve it draws from | | `index` (required) | `number` | the solve's frame shown now (0-based), and the clip's time | -| `time` (required) | `number` | – | -| `camera` (required) | `MatchmoveCamera` | – | +| `time` (required) | `number` | the clip's time at this frame, seconds | +| `camera` (required) | `MatchmoveCamera` | the solve's camera for this frame | | `project` (required) | `(p: Vec3) => [number, number, number]` | where a point of the solved world lands in the composition, in pixels ([x, y], and its distance in front of the camera; behind it when that's 0 or less) | ### `MeshAttribute` @@ -1966,27 +1951,27 @@ The props of [`MeshPass`](#meshpass), tabled there. | Field | Type | What it is | | --- | --- | --- | -| `name` | `string` | – | +| `name` | `string` | the entity's name, for picking and the inspector | | `src` (required) | `string` | a.rseq (tools/goo writes them; raea_render::meshseq) | | `frame` (required) | `number` | which of its frames (clamped) | -| `position` | `Vec3` | – | -| `rotation` | `Vec3` | – | -| `scale` | `number` | – | +| `position` | `Vec3` | where it stands, metres (x, y, z) | +| `rotation` | `Vec3` | its rotation, Euler angles in radians (x, y, z) | +| `scale` | `number` | a uniform scale | | `color` | `string` | multiplies the vertex colours | -| `roughness` | `number` | – | -| `metalness` | `number` | – | -| `clearcoat` | `number` | – | -| `clearcoatRoughness` | `number` | – | +| `roughness` | `number` | 0..1, smooth to matte | +| `metalness` | `number` | 0..1, a dielectric to a metal | +| `clearcoat` | `number` | 0..1 strength of a clear varnish layer over the surface | +| `clearcoatRoughness` | `number` | 0..1 roughness of that clear layer | | `reflectance` | `number` | 0..1 specular strength at normal incidence (0.5: 4%, a dielectric's) | | `subsurface` | `number` | 0..1 light let through (diffuse transmission): a jelly's glow | -| `thickness` | `number` | – | +| `thickness` | `number` | how thick the mesh is, metres, for the light let through | | `transmission` | `number` | 0..1 light let straight through and bent (a clear liquid: water, tea, juice), with its index of refraction (1.33 water) and, for a tinted one, the colour it takes after `attenuationDistance` metres through it. Screen space: it refracts what's on screen behind it, and one clear layer doesn't show another through it | -| `ior` | `number` | – | -| `attenuationColor` | `string` | – | -| `attenuationDistance` | `number` | – | -| `opacity` | `number` | – | +| `ior` | `number` | the index of refraction of what light passes through (1.33 water) | +| `attenuationColor` | `string` | the colour light takes after `attenuationDistance` metres through it | +| `attenuationDistance` | `number` | metres through it until light has taken `attenuationColor` | +| `opacity` | `number` | 0..1, see-through to solid | | `map` | `string` | a picture over its texture coordinates | -| `doubleSided` | `boolean` | – | +| `doubleSided` | `boolean` | draw the back faces too (an open shell, a petal) | ### `MeshShaderPassProps` @@ -2002,8 +1987,8 @@ Bevy: `bevy_render::mesh::allocator::MeshBufferSlice`. | Field | Type | What it is | | --- | --- | --- | -| `mesh` (required) | `string` | – | -| `slab` (required) | `"vertices" \| "indices"` | – | +| `mesh` (required) | `string` | the mesh's name | +| `slab` (required) | `"vertices" \| "indices"` | which of its buffers: vertices or indices | ### `ModelProps` @@ -2024,7 +2009,7 @@ type ModelScreens = Record | --- | --- | --- | | `shutterAngle` | `number` | the fraction of a frame the shutter is open (0.5 by default, a 180-degree shutter); above 1 smears further | | `samples` | `number` | samples each way per pixel (4 by default) | -| `animate` | `Animate3d` | – | +| `animate` | `Animate3d` | declared animation of its numbers | ### `OutlineProps` @@ -2041,22 +2026,22 @@ type ModelScreens = Record | Field | Type | What it is | | --- | --- | --- | -| `file` (required) | `string` | – | -| `centre` (required) | `Vec3` | – | -| `lo` (required) | `Vec3` | – | -| `hi` (required) | `Vec3` | – | -| `tris` (required) | `number` | – | +| `file` (required) | `string` | the part's own.glb in the asset store | +| `centre` (required) | `Vec3` | the middle of its bounds, metres, where it stands in the source file | +| `lo` (required) | `Vec3` | its bounds' low corner | +| `hi` (required) | `Vec3` | its bounds' high corner | +| `tris` (required) | `number` | how many triangles it has | ### `PartMaterial` | Field | Type | What it is | | --- | --- | --- | | `missing` | `boolean` | the magenta-and-black checker of a texture that didn't load | -| `color` | `string` | – | -| `emissive` | `string` | – | -| `opacity` | `number` | – | -| `roughness` | `number` | – | -| `unlit` | `boolean` | – | +| `color` | `string` | a colour over its own | +| `emissive` | `string` | the colour it glows with | +| `opacity` | `number` | 0..1, see-through to solid | +| `roughness` | `number` | 0..1, smooth to matte | +| `unlit` | `boolean` | drawn in its flat colour, without light or shade | ### `PartProps` @@ -2068,9 +2053,9 @@ A vertex attribute: Bevy's VertexFormat by name, its byte offset in a vertex and | Field | Type | What it is | | --- | --- | --- | -| `format` (required) | `"Float32" \| "Float32x2" \| "Float32x3" \| "Float32x4" \| "Uint32" \| "Uint32x2" \| "Uint32x3…` | – | -| `offset` (required) | `number` | – | -| `location` (required) | `number` | – | +| `format` (required) | `"Float32" \| "Float32x2" \| "Float32x3" \| "Float32x4" \| "Uint32" \| "Uint32x2" \| "Uint32x3…` | the attribute's VertexFormat, by name | +| `offset` (required) | `number` | its byte offset in a vertex | +| `location` (required) | `number` | its shader | ### `PhaseItemProps` @@ -2094,11 +2079,11 @@ The camera as a scene sets it: a PerspectiveCamera's props (fov in degrees, vert | Field | Type | What it is | | --- | --- | --- | -| `position` | `Vec3` | – | -| `lookAt` | `Vec3` | – | +| `position` | `Vec3` | where it stands, metres (x, y, z) | +| `lookAt` | `Vec3` | the point it faces | | `fov` | `number` | vertical field of view in degrees (50 by default); ignored when `height` is set | | `height` | `number` | an orthographic camera's view height in metres | -| `up` | `Vec3` | – | +| `up` | `Vec3` | which way is up for it (+Y) | ### `Place2dProps` @@ -2107,57 +2092,57 @@ pointer and drag handlers, called as a 3D part's are (2D parts are picked first, | Field | Type | What it is | | --- | --- | --- | -| `name` | `string` | – | -| `x` | `number` | – | -| `y` | `number` | – | +| `name` | `string` | the entity's name, for picking, the inspector and world.* | +| `x` | `number` | px from the frame's left edge to the part's centre | +| `y` | `number` | px from the frame's top edge to the part's centre, down positive | | `rotation` | `number` | radians, clockwise (as CSS rotate) | | `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) | | `scale` | `number \| [number, number]` | 1 by default; [x, y] to stretch | | `z` | `number` | draw order among the 2D parts: higher draws over lower (0 by default) | | `opacity` | `number` | 0 to 1 (1 by default) | -| `onClick` | `(e: Event3d) => void` | – | -| `onPointerDown` | `(e: Event3d) => void` | – | -| `onPointerUp` | `(e: Event3d) => void` | – | -| `onPointerOver` | `(e: Event3d) => void` | – | -| `onPointerOut` | `(e: Event3d) => void` | – | -| `onPointerEnter` | `(e: Event3d) => void` | – | -| `onPointerLeave` | `(e: Event3d) => void` | – | -| `onPointerMove` | `(e: Event3d) => void` | – | -| `onWheel` | `(e: Event3d) => void` | – | -| `onDragStart` | `(e: Event3d) => void` | – | -| `onDrag` | `(e: Event3d) => void` | – | -| `onDragEnd` | `(e: Event3d) => void` | – | -| `onDragEnter` | `(e: Event3d) => void` | – | -| `onDragOver` | `(e: Event3d) => void` | – | -| `onDragLeave` | `(e: Event3d) => void` | – | -| `onDrop` | `(e: Event3d) => void` | – | +| `onClick` | `(e: Event3d) => void` | a press and release over the part | +| `onPointerDown` | `(e: Event3d) => void` | a button pressed over the part | +| `onPointerUp` | `(e: Event3d) => void` | a button released over the part | +| `onPointerOver` | `(e: Event3d) => void` | the pointer came over the part (bubbles, as the DOM's) | +| `onPointerOut` | `(e: Event3d) => void` | the pointer left the part (bubbles) | +| `onPointerEnter` | `(e: Event3d) => void` | the pointer came over the part (doesn't bubble) | +| `onPointerLeave` | `(e: Event3d) => void` | the pointer left the part (doesn't bubble) | +| `onPointerMove` | `(e: Event3d) => void` | the pointer moved over the part | +| `onWheel` | `(e: Event3d) => void` | the wheel turned over the part (`deltaX`, `deltaY`) | +| `onDragStart` | `(e: Event3d) => void` | a drag began on the part pressed | +| `onDrag` | `(e: Event3d) => void` | the part pressed is being dragged, each frame it moves | +| `onDragEnd` | `(e: Event3d) => void` | the drag of the part pressed ended | +| `onDragEnter` | `(e: Event3d) => void` | a dragged part came over this one (`dragged` names it) | +| `onDragOver` | `(e: Event3d) => void` | a dragged part is over this one | +| `onDragLeave` | `(e: Event3d) => void` | a dragged part left this one | +| `onDrop` | `(e: Event3d) => void` | a dragged part was dropped on this one | ### `Placed` | Field | Type | What it is | | --- | --- | --- | -| `base` (required) | `V3` | – | -| `center` (required) | `V3` | – | -| `yaw` (required) | `number` | – | -| `size` (required) | `V3` | – | +| `base` (required) | `V3` | the centre of its bottom face | +| `center` (required) | `V3` | its middle, where a centred Cuboid goes | +| `yaw` (required) | `number` | its turn about y, radians (its front is +z before the turn) | +| `size` (required) | `V3` | its width, height and depth, metres | ### `PlaceFinding` | Field | Type | What it is | | --- | --- | --- | -| `part` (required) | `string` | – | -| `check` (required) | `string` | – | -| `level` (required) | `string` | – | -| `says` (required) | `string` | – | +| `part` (required) | `string` | the object it's about | +| `check` (required) | `string` | the rule that couldn't hold | +| `level` (required) | `string` | "ok", or how bad it is ("error" when the rule broke) | +| `says` (required) | `string` | what's wrong, in words | ### `PlaceObject` | Field | Type | What it is | | --- | --- | --- | -| `size` (required) | `V3` | – | +| `size` (required) | `V3` | its width, height and depth, metres | | `at` | `V3` | a start (or, with fixed, the place) for its bottom centre | | `yaw` | `number` | degrees | -| `fixed` | `boolean` | – | +| `fixed` | `boolean` | it stays at `at`: the rules move the others round it | ### `PlaceRule` @@ -2171,8 +2156,8 @@ A box on the plan (x, z, metres): the room SDK's Footprint, or any { min, max }. | Field | Type | What it is | | --- | --- | --- | -| `min` (required) | `[number, number]` | – | -| `max` (required) | `[number, number]` | – | +| `min` (required) | `[number, number]` | the low corner (x, z), metres | +| `max` (required) | `[number, number]` | the high corner (x, z), metres | ### `Plane3dProps` @@ -2182,15 +2167,15 @@ its two axes ([0.5, 0.5]), laid out as Bevy's PlaneMeshBuilder does: facing +Z i | Field | Type | What it is | | --- | --- | --- | -| `normal` | `Vec3` | – | -| `half_size` | `[number, number]` | – | +| `normal` | `Vec3` | the way it faces, along an axis (+Y by default, a floor) | +| `half_size` | `[number, number]` | half its extent along its two axes, metres ([0.5, 0.5]) | ### `PlateProps` | Field | Type | What it is | | --- | --- | --- | | `src` (required) | `string` | a video in the media folder: staticFile("clip.mp4") | -| `name` | `string` | – | +| `name` | `string` | the entity's name, for picking, the inspector and world.* | | `time` | `number` | the clip's time on this frame, in seconds (by default the Sequence's: frame / fps) | | `k1` | `number` | the lens's radial distortion (SIMPLE_RADIAL's k1, from a solve): the plate is drawn undistorted, so the footage's straight lines are straight where the 3D's are | @@ -2208,35 +2193,35 @@ type Polygons = [number, number][][] | --- | --- | --- | | `name` | `string` | what it's called across frames, and its glyphs' names over world.* (`${name}:${index}`) | | `pass` | `string` | the composition pass it draws in ("scene" by default): a frame-wide effect told to skip a pass (, , , ) leaves its pixels as drawn, and gives one its own paint; a piece names at most three passes besides "scene"; keyed per frame | -| `position` | `Vec3` | – | -| `rotation` | `Vec3` | – | -| `scale` | `number \| Vec3` | – | +| `position` | `Vec3` | where the block's origin is, metres (x, y, z) | +| `rotation` | `Vec3` | the block's rotation, radians (x, y, z) | +| `scale` | `number \| Vec3` | the block's scale: one number, or x, y and z | | `size` | `number` | the em in metres (0.5 by default) | -| `font` | `string` | – | -| `weight` | `number` | – | -| `italic` | `boolean` | – | +| `font` | `string` | a family (raea's bundled faces: Inter by default, Montserrat, Oswald, Playfair Display...; or one on this machine) | +| `weight` | `number` | 100..900 (700 by default) | +| `italic` | `boolean` | slanted (false by default) | | `color` | `string` | each glyph's colour unless its gives one | | `align` | `"left" \| "center" \| "right"` | where the origin is: the left edge, the middle (default) or the right edge of the lines; the block's middle vertically | | `lineHeight` | `number` | times the em (1.2 by default) | | `maxWidth` | `number` | wrapped at this width in metres (no wrapping by default) | -| `roughness` | `number` | – | -| `metalness` | `number` | – | -| `emissive` | `string` | – | -| `emissiveIntensity` | `number` | – | -| `unlit` | `boolean` | – | +| `roughness` | `number` | 0..1, smooth to matte | +| `metalness` | `number` | 0..1, a dielectric to a metal | +| `emissive` | `string` | the colour it glows with | +| `emissiveIntensity` | `number` | how strongly it glows (1 by default; 2-10 with bloom) | +| `unlit` | `boolean` | drawn in its flat colour, without light or shade | | `castShadow` | `boolean` | letter-shaped shadows (true by default) | -| `receiveShadow` | `boolean` | – | -| `layers` | `number[]` | – | +| `receiveShadow` | `boolean` | other things' shadows fall on it | +| `layers` | `number[]` | the render layers it's on ([0] by default): a camera draws only the layers it's given | | `enter` | `MoveLike` | each glyph's (or word's) entrance: a move's name, a move or several (rise, pop, slam, slide, fade... the 2D ones, their px read at 100 an em, their degrees as degrees), `each` frames apart from `at` | | `each` | `number` | frames between one glyph's (or word's) entrance and the next (2 by default) | | `by` | `"letter" \| "word"` | the entrance and exit staggered by letter (default) or by word | -| `at` | `number` | – | -| `exit` | `MoveLike` | – | -| `exitAt` | `number` | – | +| `at` | `number` | the local frame the first entrance starts (0) | +| `exit` | `MoveLike` | each glyph's (or word's) exit: a move or its name, played backwards from `exitAt` | +| `exitAt` | `number` | the local frame the first exit starts; an exit needs it | | `exitEach` | `number` | frames between exits (0: together) | | `reveal` | `number` | how many glyphs are shown, a typewriter's count: the next one fades in over its fraction | | `glyph` | `(g: GlyphInfo) => GlyphStyle` | each glyph's own motion this frame, from anything the frame gives (useCurrentFrame, spring, interpolate) | -| `children` | `ReactNode` | – | +| `children` | `ReactNode` | the text: strings and runs | ### `SamplerSpec` @@ -2301,9 +2286,9 @@ A cross-section of a solid at a height: its area, how many contours, and the con | Field | Type | What it is | | --- | --- | --- | -| `area` (required) | `number` | – | -| `contours` (required) | `number` | – | -| `polygons` (required) | `[number, number][][]` | – | +| `area` (required) | `number` | the section's area, m² | +| `contours` (required) | `number` | how many outlines it has | +| `polygons` (required) | `[number, number][][]` | the outlines, each a list of [x, y] points in the section's plane | ### `ShaderInstancesProps` @@ -2319,12 +2304,12 @@ The props of [`ShaderInstances`](#shaderinstances), tabled there. | `uniforms` | `Record` | up to 16: a number (f32), [x, y], [x, y, z], [x, y, z, w] or "#rrggbb" (a linear vec4) | | `textures` | `Record>` | up to 4: an asset path, a picture made in code ({ width, height, pixels }) or "render:NAME"; and one array, { layers: [picture,...] } or { src, layers: N }, read as texture_2d_array tex_NAME by layer | | `defs` | `ShaderDefs` | shader defs: each NAME a WESL condition for `@if(NAME)`, and a whole number also `constants::NAME` | -| `alpha` | `"opaque" \| "blend" \| "add" \| "premultiplied"` | – | -| `doubleSided` | `boolean` | – | -| `name` | `string` | – | -| `position` | `Vec3` | – | -| `rotation` | `Vec3` | – | -| `scale` | `Vec3 \| number` | – | +| `alpha` | `"opaque" \| "blend" \| "add" \| "premultiplied"` | how it blends: opaque, blend, add or premultiplied | +| `doubleSided` | `boolean` | draw the back faces too | +| `name` | `string` | the entity's name, for picking, the inspector and world.* | +| `position` | `Vec3` | where it stands, metres (x, y, z) | +| `rotation` | `Vec3` | its rotation, Euler angles in radians (x, y, z) | +| `scale` | `Vec3 \| number` | its scale: one number, or x, y and z | ### `ShadowsProps` @@ -2351,7 +2336,7 @@ type Shape = "hull" | "box" | "mesh" | { box: Vec3 } | { sphere: number } | { ca | --- | --- | --- | | `shape` | `"rect" \| "circle" \| "ellipse" \| "triangle" \| "polygon"` | a rect by default; a polygon has `sides` (5 by default) | | `size` | `[number, number]` | [width, height] in px ([100, 100] by default); a circle's and a polygon's diameter is the width | -| `sides` | `number` | – | +| `sides` | `number` | a polygon's number of sides (5) | | `color` | `string` | a CSS colour (white by default); with a texture, it tints it | | `srgb` | `[number, number, number]` | the colour as a Bevy Srgba's [r, g, b], unrounded, over `color` (a Mesh2d's ColorMaterial gives it) | | `texture` | `string \| { path: string; sampler: SamplerSpec }` | a picture on it, mapped by the mesh's UVs (Bevy's ColorMaterial texture), or one with its own sampler (Bevy's load_with_settings: { path, sampler: { wrap: "repeat" } }) | @@ -2360,30 +2345,30 @@ type Shape = "hull" | "box" | "mesh" | { box: Vec3 } | { sphere: number } | { ca | `vertex_colors` | `[number, number, number, number][]` | one linear [r, g, b, a] per vertex of the shape's mesh (Bevy's Mesh::ATTRIBUTE_COLOR): the material's colour and texture are multiplied by them. A rect has 4 (top right, top left, bottom left, bottom right), a triangle 3. | | `shader` | `Record` | its own Material2d in place of the ColorMaterial: the spec a in a Mesh2d makes; the shape's colour, texture and alpha_mode are then the material's to draw | | `primitive` | `Record` | one of Bevy's 2D primitives in place of `shape`, its reflected fields over Bevy's default: { primitive: "Capsule2d", radius: 25, half_length: 25 }; a 2D shape given `inner` (the same shape's fields) is Bevy's Ring, or given `ring: thickness` its to_ring (raea-sys-mesh primitive_mesh). A Mesh2d's primitive child makes it. | -| `name` | `string` | – | -| `x` | `number` | – | -| `y` | `number` | – | +| `name` | `string` | the entity's name, for picking, the inspector and world.* | +| `x` | `number` | px from the frame's left edge to the part's centre | +| `y` | `number` | px from the frame's top edge to the part's centre, down positive | | `rotation` | `number` | radians, clockwise (as CSS rotate) | | `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) | | `scale` | `number \| [number, number]` | 1 by default; [x, y] to stretch | | `z` | `number` | draw order among the 2D parts: higher draws over lower (0 by default) | | `opacity` | `number` | 0 to 1 (1 by default) | -| `onClick` | `(e: Event3d) => void` | – | -| `onPointerDown` | `(e: Event3d) => void` | – | -| `onPointerUp` | `(e: Event3d) => void` | – | -| `onPointerOver` | `(e: Event3d) => void` | – | -| `onPointerOut` | `(e: Event3d) => void` | – | -| `onPointerEnter` | `(e: Event3d) => void` | – | -| `onPointerLeave` | `(e: Event3d) => void` | – | -| `onPointerMove` | `(e: Event3d) => void` | – | -| `onWheel` | `(e: Event3d) => void` | – | -| `onDragStart` | `(e: Event3d) => void` | – | -| `onDrag` | `(e: Event3d) => void` | – | -| `onDragEnd` | `(e: Event3d) => void` | – | -| `onDragEnter` | `(e: Event3d) => void` | – | -| `onDragOver` | `(e: Event3d) => void` | – | -| `onDragLeave` | `(e: Event3d) => void` | – | -| `onDrop` | `(e: Event3d) => void` | – | +| `onClick` | `(e: Event3d) => void` | a press and release over the part | +| `onPointerDown` | `(e: Event3d) => void` | a button pressed over the part | +| `onPointerUp` | `(e: Event3d) => void` | a button released over the part | +| `onPointerOver` | `(e: Event3d) => void` | the pointer came over the part (bubbles, as the DOM's) | +| `onPointerOut` | `(e: Event3d) => void` | the pointer left the part (bubbles) | +| `onPointerEnter` | `(e: Event3d) => void` | the pointer came over the part (doesn't bubble) | +| `onPointerLeave` | `(e: Event3d) => void` | the pointer left the part (doesn't bubble) | +| `onPointerMove` | `(e: Event3d) => void` | the pointer moved over the part | +| `onWheel` | `(e: Event3d) => void` | the wheel turned over the part (`deltaX`, `deltaY`) | +| `onDragStart` | `(e: Event3d) => void` | a drag began on the part pressed | +| `onDrag` | `(e: Event3d) => void` | the part pressed is being dragged, each frame it moves | +| `onDragEnd` | `(e: Event3d) => void` | the drag of the part pressed ended | +| `onDragEnter` | `(e: Event3d) => void` | a dragged part came over this one (`dragged` names it) | +| `onDragOver` | `(e: Event3d) => void` | a dragged part is over this one | +| `onDragLeave` | `(e: Event3d) => void` | a dragged part left this one | +| `onDrop` | `(e: Event3d) => void` | a dragged part was dropped on this one | ### `SkyboxProps` @@ -2397,12 +2382,12 @@ type Shape = "hull" | "box" | "mesh" | { box: Vec3 } | { sphere: number } | { ca | Field | Type | What it is | | --- | --- | --- | -| `children` | `ReactNode` | – | +| `children` | `ReactNode` | the run's text | | `font` | `string` | a family (raea's bundled faces: Inter, Montserrat, Oswald, Playfair Display...; or one on this machine) | -| `weight` | `number` | – | -| `italic` | `boolean` | – | +| `weight` | `number` | 100..900 (the block's by default) | +| `italic` | `boolean` | slanted (the block's by default) | | `size` | `number` | times the block's size | -| `color` | `string` | – | +| `color` | `string` | the run's colour (the block's by default) | ### `SphereProps` @@ -2411,10 +2396,10 @@ subdivisions, or `ico` of them (Bevy's `.ico(n)`, 0 to 80), or a UV sphere of `u | Field | Type | What it is | | --- | --- | --- | -| `args` | `[number]` | – | -| `radius` | `number` | – | -| `ico` | `number` | – | -| `uv` | `[number, number]` | – | +| `args` | `[number]` | [radius], as three.js's args | +| `radius` | `number` | metres (0.5) | +| `ico` | `number` | an icosphere of this many subdivisions (5 by default; 0 to 80) | +| `uv` | `[number, number]` | a UV sphere instead: [sectors, stacks] | ### `SplatMorph` @@ -2430,18 +2415,18 @@ subdivisions, or `ico` of them (Bevy's `.ico(n)`, 0 to 80), or a UV sphere of `u | --- | --- | --- | | `name` | `string` | parts are matched by name across frames: name a splat that comes and goes | | `src` (required) | `string` | the splat file (staticFile("x.ply")): a 3DGS.ply (spherical harmonics up to degree 3), a.splat or a.spz. A `x.ply.json` beside it (raea splat train writes one) places it: +Y up, centred, metres | -| `position` | `Vec3` | – | +| `position` | `Vec3` | where it stands, metres (x, y, z) | | `rotation` | `Vec3` | radians, Euler XYZ | -| `scale` | `number \| Vec3` | – | +| `scale` | `number \| Vec3` | its scale: one number, or x, y and z | | `splatScale` | `number` | every gaussian's size times this (1 by default): below 1 the scene breaks into points | -| `opacity` | `number` | – | +| `opacity` | `number` | 0..1, multiplying every gaussian's | | `brightness` | `number` | grade: colour times brightness, saturation and contrast about mid grey, times tint | -| `saturation` | `number` | – | -| `contrast` | `number` | – | -| `tint` | `string` | – | +| `saturation` | `number` | 1 as trained; 0 grey, above 1 richer | +| `contrast` | `number` | 1 as trained; about mid grey | +| `tint` | `string` | a colour every gaussian's is multiplied by | | `reveal` | `number` | reveal 0..1: each splat scales in as a front passes it, from `revealFrom` (a point; the centre by default) outward, or along `revealAxis` (a plane sweeping through) when that's given | -| `revealFrom` | `Vec3` | – | -| `revealAxis` | `Vec3` | – | +| `revealFrom` | `Vec3` | the point the reveal grows outward from (the centre by default) | +| `revealAxis` | `Vec3` | a direction: the reveal sweeps a plane along it instead of growing from a point | | `revealSoft` | `number` | how wide the front is, as a share of the sweep (0.15) | | `revealGlow` | `number` | the front's glow (0 none, 1 bright), in `glowColor` | | `glowColor` | `string` | the colour of reveal and pulse glows (warm white) | @@ -2451,12 +2436,12 @@ subdivisions, or `ico` of them (Bevy's `.ico(n)`, 0 to 80), or a UV sphere of `u | `curl` | `number` | how much the wind curls (1) | | `spread` | `number` | the dust cloud's radius in metres (the splat's own size, before scale; 1.6 times its size by default) | | `explode` | `number` | explode 0..1: thrown out from the centre, falling and fading | -| `wave` | `SplatWave` | – | +| `wave` | `SplatWave` | a ripple running out through the splats: amplitude, wavelength and phase | | `twist` | `number` | radians a metre about the vertical through the centre | -| `morph` | `SplatMorph` | – | +| `morph` | `SplatMorph` | becomes another splat file: `to` and `amount` 0..1 | | `pulse` | `number` | a value the composition passes (a beat's envelope 0..1): bigger by pulseScale, brighter by pulseGlow | -| `pulseScale` | `number` | – | -| `pulseGlow` | `number` | – | +| `pulseScale` | `number` | how much bigger a full pulse makes it | +| `pulseGlow` | `number` | how much brighter a full pulse makes it | | `crop` | `number` | nothing past this many metres from the centre (trims a trained scene's floaters) | | `bands` | `number` | the light in this many flat bands (0 none); a paint or cartoon sets it | | `paint` | `number` | 0..1: the splats themselves painted (flat bands, grown into strokes with hard edges), for a painted shot in a timeline whose frame isn't paint | @@ -2476,43 +2461,43 @@ subdivisions, or `ico` of them (Bevy's `.ico(n)`, 0 to 80), or a UV sphere of `u | --- | --- | --- | | `src` (required) | `string` | a picture in the media folder: staticFile("hero.png"), or a "render:NAME" image a camera or a draws (a frame may switch it to another by name) | | `width` | `number` | size in px (the picture's, or one cell's, by default); one given, the other follows the picture's shape | -| `height` | `number` | – | +| `height` | `number` | in px; given alone, the width follows the picture's shape | | `grid` | `[number, number]` | a sprite sheet: the picture is `[columns, rows]` cells of equal size, read left to right, top to bottom | | `atlasPick` | `number` | one picture of a built atlas (TextureAtlasBuilder's sources.handle gives it with its src): its index in the atlas's list | | `frame` | `number` | with `grid`: which cell shows (0 is the top left); animate it to play the sheet: frame={Math.floor(f / 3)} | -| `flipX` | `boolean` | – | -| `flipY` | `boolean` | – | +| `flipX` | `boolean` | mirrored left to right | +| `flipY` | `boolean` | mirrored top to bottom | | `color` | `string` | a tint multiplied over the picture (white by default) | | `tileX` | `boolean` | Bevy's SpriteImageMode::Tiled: the picture repeats across the sprite's width (tileX) or height (tileY) instead of stretching to it, a tile every `tileStretch` x the picture's size (1 by default): a floor, a fence, a wall. Animate width and height to show more or fewer tiles | -| `tileY` | `boolean` | – | -| `tileStretch` | `number` | – | +| `tileY` | `boolean` | tile the picture down its height instead of stretching it | +| `tileStretch` | `number` | a tile every this many times the picture's size (1) | | `image_mode` | `SpriteImageMode` | Bevy's SpriteImageMode, as its reflected value: "Auto" (stretched to the size), { Scale: "FillCenter" } (and FillStart, FillEnd, FitCenter, FitStart, FitEnd: the picture kept to its shape, cropped or fitted), { Sliced: TextureSlicer } (nine-slice: border a number of px or { min_inset: [x, y], max_inset: [x, y] }; center_scale_mode and sides_scale_mode "Stretch" or { Tile: { stretch_value } }; max_corner_scale) or { Tiled: { tile_x, tile_y, stretch_value } }. Not with tileX or tileY | | `sampler` | `SamplerSpec` | the picture's sampler (Bevy's load_with_settings: { filter, mipmap, wrap, anisotropy }), Bevy's default (linear) otherwise; { filter: "nearest" } is pixel art as Bevy's ImagePlugin::default_nearest() draws it | | `children` | `ReactNode` | your own as its child: Bevy's SpriteMaterial, extending the sprite's own material (the shader reads the sprite's picture, tint and alpha with bevy_sprite_render::sprite_mesh::functions), its uniforms per frame | -| `name` | `string` | – | -| `x` | `number` | – | -| `y` | `number` | – | +| `name` | `string` | the entity's name, for picking, the inspector and world.* | +| `x` | `number` | px from the frame's left edge to the part's centre | +| `y` | `number` | px from the frame's top edge to the part's centre, down positive | | `rotation` | `number` | radians, clockwise (as CSS rotate) | | `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) | | `scale` | `number \| [number, number]` | 1 by default; [x, y] to stretch | | `z` | `number` | draw order among the 2D parts: higher draws over lower (0 by default) | | `opacity` | `number` | 0 to 1 (1 by default) | -| `onClick` | `(e: Event3d) => void` | – | -| `onPointerDown` | `(e: Event3d) => void` | – | -| `onPointerUp` | `(e: Event3d) => void` | – | -| `onPointerOver` | `(e: Event3d) => void` | – | -| `onPointerOut` | `(e: Event3d) => void` | – | -| `onPointerEnter` | `(e: Event3d) => void` | – | -| `onPointerLeave` | `(e: Event3d) => void` | – | -| `onPointerMove` | `(e: Event3d) => void` | – | -| `onWheel` | `(e: Event3d) => void` | – | -| `onDragStart` | `(e: Event3d) => void` | – | -| `onDrag` | `(e: Event3d) => void` | – | -| `onDragEnd` | `(e: Event3d) => void` | – | -| `onDragEnter` | `(e: Event3d) => void` | – | -| `onDragOver` | `(e: Event3d) => void` | – | -| `onDragLeave` | `(e: Event3d) => void` | – | -| `onDrop` | `(e: Event3d) => void` | – | +| `onClick` | `(e: Event3d) => void` | a press and release over the part | +| `onPointerDown` | `(e: Event3d) => void` | a button pressed over the part | +| `onPointerUp` | `(e: Event3d) => void` | a button released over the part | +| `onPointerOver` | `(e: Event3d) => void` | the pointer came over the part (bubbles, as the DOM's) | +| `onPointerOut` | `(e: Event3d) => void` | the pointer left the part (bubbles) | +| `onPointerEnter` | `(e: Event3d) => void` | the pointer came over the part (doesn't bubble) | +| `onPointerLeave` | `(e: Event3d) => void` | the pointer left the part (doesn't bubble) | +| `onPointerMove` | `(e: Event3d) => void` | the pointer moved over the part | +| `onWheel` | `(e: Event3d) => void` | the wheel turned over the part (`deltaX`, `deltaY`) | +| `onDragStart` | `(e: Event3d) => void` | a drag began on the part pressed | +| `onDrag` | `(e: Event3d) => void` | the part pressed is being dragged, each frame it moves | +| `onDragEnd` | `(e: Event3d) => void` | the drag of the part pressed ended | +| `onDragEnter` | `(e: Event3d) => void` | a dragged part came over this one (`dragged` names it) | +| `onDragOver` | `(e: Event3d) => void` | a dragged part is over this one | +| `onDragLeave` | `(e: Event3d) => void` | a dragged part left this one | +| `onDrop` | `(e: Event3d) => void` | a dragged part was dropped on this one | ### `SurfaceDrawProps` @@ -2536,18 +2521,18 @@ from the first frame. | `textures` | `Record` | up to 4: an asset path, a picture made in code ({ width, height, pixels }) or "render:NAME"; with a sampler, { src, sampler } (or a picture with its `sampler`). One more may be an array, read as texture_2d_array by layer: { layers: [picture,...] } (one size and format) or { src, layers: N } (N layers stacked top to bottom). A 's may also bind one binding_array>, a list of 1 to 16 pictures (Bevy's texture_binding_array; a GPU without texture binding arrays refuses it) | | `defs` | `ShaderDefs` | shader defs: each NAME a WESL condition for `@if(NAME)` (a number is true), and a whole number also `constants::NAME`; each set of defs compiles its own pipeline | | `own` | `OwnMaterialFields` | a 's own: what its Material methods give, and its storage buffers; set by only | -| `buffers` | `Record` | – | +| `buffers` | `Record` | the material's storage buffers by binding name; set by only | ### `Text3DProps` | Field | Type | What it is | | --- | --- | --- | | `children` | `string` | the words, extruded | -| `text` | `string` | – | +| `text` | `string` | the words, when they aren't its child (no quotes or backslashes) | | `size` | `number` | letter height in scene units (default 0.5) | | `depth` | `number` | extrusion depth (default 0.2) | -| `font` | `string` | – | -| `weight` | `number` | – | +| `font` | `string` | a family (Inter by default, or another of raea's bundled faces) | +| `weight` | `number` | 100..900 (800 by default) | ### `ThreeShaderMaterialProps` @@ -2558,12 +2543,12 @@ from the first frame. | `uniforms` | `Record` | each uniform's value this frame | | `textures` | `Record