@origingame/engine 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/origin-engine.d.ts +8 -5
- package/dist/web/origin-engine.js +39 -19
- package/dist/web/origin-engine_bg.wasm +0 -0
- package/dist/web/origin-engine_bg.wasm.d.ts +6 -5
- package/dist/web-publish/origin-engine-lanes.js +49 -29
- package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish/origin-engine.d.ts +8 -5
- package/dist/web-publish/origin-engine.js +39 -19
- package/dist/web-publish/origin-engine_bg.wasm +0 -0
- package/dist/web-publish/origin-engine_bg.wasm.d.ts +6 -5
- package/dist/web-publish-2d/origin-engine-lanes.js +49 -29
- package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine.d.ts +8 -5
- package/dist/web-publish-2d/origin-engine.js +39 -19
- package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +6 -5
- package/knowledge/looks/catalogue.json +123 -2
- package/knowledge/package.json +1 -1
- package/knowledge/scaffold/origin-engine.json +2 -2
- package/knowledge/scaffold/template/package.json +1 -1
- package/knowledge/scaffold/template/project.ogt +1 -1
- package/knowledge/scripts/validate.ts +69 -6
- package/knowledge/skills/og-audio/SKILL.md +31 -5
- package/knowledge/skills/og-build/SKILL.md +44 -4
- package/knowledge/skills/og-core/SKILL.md +4 -3
- package/knowledge/skills/og-feel/SKILL.md +9 -1
- package/knowledge/skills/og-game/SKILL.md +199 -16
- package/knowledge/skills/og-platform-sdk/SKILL.md +6 -0
- package/knowledge/skills/og-taste/SKILL.md +7 -0
- package/knowledge/skills/og-ui/SKILL.md +24 -0
- package/knowledge/wiki/ai.md +20 -20
- package/knowledge/wiki/anim.md +526 -60
- package/knowledge/wiki/atmosphere.md +13 -13
- package/knowledge/wiki/audio.md +160 -20
- package/knowledge/wiki/camera.md +13 -13
- package/knowledge/wiki/commands.md +11 -11
- package/knowledge/wiki/debug.md +13 -13
- package/knowledge/wiki/game.md +8 -8
- package/knowledge/wiki/i18n.md +7 -7
- package/knowledge/wiki/index.md +25 -1
- package/knowledge/wiki/input.md +47 -47
- package/knowledge/wiki/load.md +76 -50
- package/knowledge/wiki/math.md +102 -102
- package/knowledge/wiki/nav.md +34 -34
- package/knowledge/wiki/net.md +10 -10
- package/knowledge/wiki/path.md +14 -14
- package/knowledge/wiki/physics.md +111 -100
- package/knowledge/wiki/platform.md +44 -44
- package/knowledge/wiki/probe.md +86 -86
- package/knowledge/wiki/reflect.md +17 -17
- package/knowledge/wiki/render.md +245 -176
- package/knowledge/wiki/rng.md +14 -14
- package/knowledge/wiki/shapes.md +26 -26
- package/knowledge/wiki/stream.md +15 -15
- package/knowledge/wiki/system.md +8 -8
- package/knowledge/wiki/systems.md +2 -2
- package/knowledge/wiki/terrain.md +19 -19
- package/knowledge/wiki/tilemap.md +13 -13
- package/knowledge/wiki/time.md +4 -4
- package/knowledge/wiki/timeline.md +14 -14
- package/knowledge/wiki/transform.md +8 -8
- package/knowledge/wiki/tween.md +17 -17
- package/knowledge/wiki/ui.md +243 -243
- package/knowledge/wiki/video.md +5 -5
- package/knowledge/wiki/world.md +36 -36
- package/package.json +4 -4
- package/schema/api.schema.json +639 -11
- package/shell/page.ts +4 -0
- package/src/generated/abi.ts +3 -0
- package/src/index.ts +11 -0
- package/src/node/device.ts +5 -2
- package/src/node/polish.ts +34 -15
- package/src/node/run.ts +23 -6
- package/src/runtime.ts +1 -0
- package/src/web/gl-state.ts +907 -0
- package/src/web/worker.ts +6 -0
- package/types/bindings.json +823 -349
- package/types/index.d.ts +650 -15
package/schema/api.schema.json
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"bytes": "bytes",
|
|
18
18
|
"kg": "kilograms",
|
|
19
19
|
"newton": "newtons: the force that gives a kilogram one metre per second squared",
|
|
20
|
+
"newtonSecond": "newton-seconds: an impulse, the momentum that changes a kilogram's velocity by one metre per second",
|
|
20
21
|
"mps": "metres per second",
|
|
21
22
|
"mps2": "metres per second squared",
|
|
22
23
|
"radps": "radians per second",
|
|
@@ -1614,7 +1615,7 @@
|
|
|
1614
1615
|
},
|
|
1615
1616
|
{
|
|
1616
1617
|
"name": "reflect",
|
|
1617
|
-
"doc": "Reflection: components and resources are declared once with their field layout and metadata, and registered by name.\nThe inspector, Tune, the probe, scene text and the wiki read this one schema. Each column factory below makes one field.\nA field holds one value, or a list of at most a fixed number of one number type or handle: `list(u32(), 8)`, `list(Asset(), 4)` (the list factory below). A list is read as a frozen copy (`push` throws) and written whole (`chain.passes = [...chain.passes, h]`); one over its capacity is refused, never truncated. A few vectors are numbered fields (`p0` to `p7`, as og.CameraRail does); a list of things with fields of their own is an entity each, with its own component, looped over by a query (a ring of skid marks, the laps of a race); a long record (a lap's taped inputs) is text in `str` fields of at most 4,096 bytes each, chunked over entities. Keep none of it in module variables: they are not world state, so a snapshot, a replay and a hot reload lose them.\nA handle (an og.load answer, a texture, a sound, a geometry, a material, an entity) is a 64-bit number: keep it in a field of its own kind (`Asset()`, `Texture()`, `Sound()`, `Geometry()`, `Material()`, `Entity()
|
|
1618
|
+
"doc": "Reflection: components and resources are declared once with their field layout and metadata, and registered by name.\nThe inspector, Tune, the probe, scene text and the wiki read this one schema. Each column factory below makes one field.\nA field holds one value, or a list of at most a fixed number of one number type or handle: `list(u32(), 8)`, `list(Asset(), 4)` (the list factory below). A list is read as a frozen copy (`push` throws) and written whole (`chain.passes = [...chain.passes, h]`); one over its capacity is refused, never truncated. A few vectors are numbered fields (`p0` to `p7`, as og.CameraRail does); a list of things with fields of their own is an entity each, with its own component, looped over by a query (a ring of skid marks, the laps of a race); a long record (a lap's taped inputs) is text in `str` fields of at most 4,096 bytes each, chunked over entities. Keep none of it in module variables: they are not world state, so a snapshot, a replay and a hot reload lose them.\nA handle (an og.load answer, a texture, a sound, a geometry, a material, an entity) is a 64-bit number: keep it in a field of its own kind (`Asset()`, `Texture()`, `Sound()`, `Font()`, `Style()`, `Geometry()`, `Material()`, `Entity()`: every handle type of the API has its factory, named as the type), never cast to another kind, in a component or a resource. A `u32` field refuses one (handles pass 2^32: `4294967298 is not a u32`); an `f64` holds the number but loses its type.",
|
|
1618
1619
|
"place": "top",
|
|
1619
1620
|
"publish": true,
|
|
1620
1621
|
"types": [
|
|
@@ -2772,12 +2773,15 @@
|
|
|
2772
2773
|
"DofQuality",
|
|
2773
2774
|
"SpriteBlend",
|
|
2774
2775
|
"SpriteBlend",
|
|
2776
|
+
"SpriteFacing",
|
|
2777
|
+
"SpriteFacing",
|
|
2775
2778
|
"StripBlend",
|
|
2776
2779
|
"StripBlend",
|
|
2777
2780
|
"PostEffects",
|
|
2778
2781
|
"Palette",
|
|
2779
2782
|
"Look",
|
|
2780
2783
|
"Palette",
|
|
2784
|
+
"Look",
|
|
2781
2785
|
"DitherPattern",
|
|
2782
2786
|
"DitherPattern",
|
|
2783
2787
|
"StyliseSpace",
|
|
@@ -2809,6 +2813,7 @@
|
|
|
2809
2813
|
"ReflectionProbeMode",
|
|
2810
2814
|
"ReflectionProbe",
|
|
2811
2815
|
"Shader",
|
|
2816
|
+
"Shader",
|
|
2812
2817
|
"BufferGeometryDesc",
|
|
2813
2818
|
"GeometryInfo",
|
|
2814
2819
|
"CylinderGeometryDesc",
|
|
@@ -4375,6 +4380,8 @@
|
|
|
4375
4380
|
"TextureArray",
|
|
4376
4381
|
"Asset",
|
|
4377
4382
|
"Sound",
|
|
4383
|
+
"Font",
|
|
4384
|
+
"Style",
|
|
4378
4385
|
"LoadStatus",
|
|
4379
4386
|
"GltfDesc",
|
|
4380
4387
|
"GltfInfo",
|
|
@@ -5848,15 +5855,26 @@
|
|
|
5848
5855
|
"AnimationGraph",
|
|
5849
5856
|
"Blendshapes",
|
|
5850
5857
|
"IkChain",
|
|
5858
|
+
"LookAt",
|
|
5859
|
+
"JointLimit",
|
|
5860
|
+
"FootLock",
|
|
5861
|
+
"SpringSpace",
|
|
5862
|
+
"SpringSpace",
|
|
5863
|
+
"SpringBone",
|
|
5864
|
+
"SpringColliderShape",
|
|
5865
|
+
"SpringColliderShape",
|
|
5866
|
+
"SpringCollider",
|
|
5851
5867
|
"AnimationEvent",
|
|
5852
5868
|
"ClipInfo",
|
|
5853
5869
|
"Animation",
|
|
5854
5870
|
"GraphDesc",
|
|
5855
5871
|
"Rig",
|
|
5872
|
+
"Rig",
|
|
5856
5873
|
"HumanBone",
|
|
5857
5874
|
"Humanoid",
|
|
5858
5875
|
"HumanoidDesc",
|
|
5859
5876
|
"RetargetDesc",
|
|
5877
|
+
"MirrorDesc",
|
|
5860
5878
|
"FlipbookSheet",
|
|
5861
5879
|
"FlipbookSheet",
|
|
5862
5880
|
"FlipMode",
|
|
@@ -5919,7 +5937,7 @@
|
|
|
5919
5937
|
},
|
|
5920
5938
|
{
|
|
5921
5939
|
"name": "retarget",
|
|
5922
|
-
"doc": "A new clip for `target` from a clip of `source`: each animated humanoid bone turns as the source's does from its rest pose (after a rest correction, so a T-pose drives an A-pose and other bone frames agree), the target keeps its bone lengths, the hips travel the source's distance scaled by the leg ratio (root motion kept, hip height scaled), and with footIk the feet land where the source's do, scaled. Same name, duration and markers. The cook does the same for a model's `animation { library }` import setting; this is for clips chosen at run time.",
|
|
5940
|
+
"doc": "A new clip for `target` from a clip of `source`: each animated humanoid bone turns as the source's does from its rest pose (after a rest correction, so a T-pose drives an A-pose and other bone frames agree; fingers turn from their hand, so a hand pose holds whatever the arm does), the target keeps its bone lengths, the hips travel the source's distance scaled by the leg ratio (root motion kept, hip height scaled), and with footIk the feet land where the source's do, scaled, on the ground each rig's `footHeight` names (else its rest pose's foot heights). The target's twist bones (unmapped nodes named `twist`, or Rigify's `DEF-….001`, on an upper or lower arm or leg) take a share of their segment's twist by how far along it they sit. Same name, duration and markers. The cook does the same for a model's `animation { library }` import setting; this is for clips chosen at run time.",
|
|
5923
5941
|
"params": [
|
|
5924
5942
|
{
|
|
5925
5943
|
"name": "world",
|
|
@@ -5938,6 +5956,27 @@
|
|
|
5938
5956
|
"returnsDoc": "The new clip (what AnimationPlayer.clip takes). Refused for an unregistered clip, skeleton or rig, a skeleton without recognisable hips (name them in a `type rig` file), or a rig naming a missing node.",
|
|
5939
5957
|
"publish": true
|
|
5940
5958
|
},
|
|
5959
|
+
{
|
|
5960
|
+
"name": "mirror",
|
|
5961
|
+
"doc": "A new clip that plays `clip` on the other side: every frame reflected in the skeleton's x = 0 plane, each node taking its counterpart's motion (a left swing becomes the right's), rotations moved in model space so left and right bone frames need not mirror each other, root motion's sideways travel and turns flipped. Assumes a symmetric rest pose; a sided node without a counterpart keeps its rest pose. Same name, duration and markers (markers keep their names). Mirroring twice gives the clip back. A clip known ahead needs no call: a graph's `clip` line with `mirror true` plays it mirrored, and the cook's `animation { mirror \"<clip>\" }` writes the mirrored clip into the model.",
|
|
5962
|
+
"params": [
|
|
5963
|
+
{
|
|
5964
|
+
"name": "world",
|
|
5965
|
+
"type": "World",
|
|
5966
|
+
"optional": false,
|
|
5967
|
+
"doc": "The world whose animation owns the skeleton and the clip."
|
|
5968
|
+
},
|
|
5969
|
+
{
|
|
5970
|
+
"name": "desc",
|
|
5971
|
+
"type": "MirrorDesc",
|
|
5972
|
+
"optional": true,
|
|
5973
|
+
"doc": "The clip and its skeleton."
|
|
5974
|
+
}
|
|
5975
|
+
],
|
|
5976
|
+
"returns": "Result<ClipInfo>",
|
|
5977
|
+
"returnsDoc": "The new clip (what AnimationPlayer.clip takes). Refused for an unregistered clip or skeleton.",
|
|
5978
|
+
"publish": true
|
|
5979
|
+
},
|
|
5941
5980
|
{
|
|
5942
5981
|
"name": "clip",
|
|
5943
5982
|
"doc": "The index of a flipbook clip by name, for Flipbook.clip: `og.anim.clip(hero, \"walk_down\")`. -1 when the sheet has no such clip.",
|
|
@@ -6385,12 +6424,16 @@
|
|
|
6385
6424
|
},
|
|
6386
6425
|
{
|
|
6387
6426
|
"name": "audio",
|
|
6388
|
-
"doc": "Sound: inside the tick, the engine's og.audio system (after the game's systems and physics) turns AudioSource changes into a deterministic, time-stamped command stream; outside the tick the host's mixer renders it (an AudioWorklet on the web, the output device, a capture or a null sink natively).\nThe stream, not the PCM, is world state: snapshots, restore and the world hash cover it, and nothing a sink does reaches the world. Load sounds with og.load.sound; inserting a source plays it, setting `playing` false stops it, and a one-shot sets `playing` back to false when it ends.\nSpatial gain and pan are computed in the tick from the source's world transform relative to the first AudioListener's (three.js convention: the listener looks down -Z, +X is right; with none, the origin looking down -Z). A source, listener or zone on a child entity is placed at its og.Transform composed down og.Parent, as og.MatrixWorld is: a sound on a child is heard where its parent carries it, a listener under a camera rig hears from the rig.",
|
|
6427
|
+
"doc": "Sound: inside the tick, the engine's og.audio system (after the game's systems and physics) turns AudioSource changes into a deterministic, time-stamped command stream; outside the tick the host's mixer renders it (an AudioWorklet on the web, the output device, a capture or a null sink natively).\nThe stream, not the PCM, is world state: snapshots, restore and the world hash cover it, and nothing a sink does reaches the world. Load sounds with og.load.sound; inserting a source plays it, setting `playing` false stops it, and a one-shot sets `playing` back to false when it ends.\nSpatial gain and pan are computed in the tick from the source's world transform relative to the first AudioListener's (three.js convention: the listener looks down -Z, +X is right; with none, the origin looking down -Z). A source, listener or zone on a child entity is placed at its og.Transform composed down og.Parent, as og.MatrixWorld is: a sound on a child is heard where its parent carries it, a listener under a camera rig hears from the rig.\nPropagation, all in the tick and so in the stream: a spatial source or listener that moves shifts the pitch (Doppler, from their tick velocities: AudioSource.dopplerFactor, AudioListener.dopplerFactor, Audio.speedOfSound), a source with a cone is turned down away from its +Z (coneInnerAngle, coneOuterAngle, coneOuterGain, as three.js's setDirectionalCone), and a listener whose panningModel is hrtf places sources for headphones (interaural delay and head shadow) instead of the stereo panner.",
|
|
6389
6428
|
"place": "namespace",
|
|
6390
6429
|
"publish": true,
|
|
6391
6430
|
"types": [
|
|
6392
6431
|
"AudioBus",
|
|
6393
6432
|
"AudioBus",
|
|
6433
|
+
"PanningModel",
|
|
6434
|
+
"AudioResampler",
|
|
6435
|
+
"AudioResampler",
|
|
6436
|
+
"PanningModel",
|
|
6394
6437
|
"AudioSource",
|
|
6395
6438
|
"AudioListener",
|
|
6396
6439
|
"Audio",
|
|
@@ -6431,6 +6474,12 @@
|
|
|
6431
6474
|
"type": "u32",
|
|
6432
6475
|
"value": 4,
|
|
6433
6476
|
"doc": "SoundEnded.reason: more sources played than Audio.maxVoices and this one stood lowest (priority, then volume, then age)."
|
|
6477
|
+
},
|
|
6478
|
+
{
|
|
6479
|
+
"name": "SOUND_RETRIGGERED",
|
|
6480
|
+
"type": "u32",
|
|
6481
|
+
"value": 5,
|
|
6482
|
+
"doc": "SoundEnded.reason: AudioSource.retrigger started the sound again from the top; a new voice plays it."
|
|
6434
6483
|
}
|
|
6435
6484
|
],
|
|
6436
6485
|
"functions": [
|
|
@@ -15596,6 +15645,22 @@
|
|
|
15596
15645
|
"additive": "Added (light, fire, magic): order-independent within a layer."
|
|
15597
15646
|
}
|
|
15598
15647
|
},
|
|
15648
|
+
"SpriteFacing": {
|
|
15649
|
+
"x-og-kind": "enum",
|
|
15650
|
+
"x-og-module": "render",
|
|
15651
|
+
"description": "How a world sprite turns towards the camera that draws it: a billboard (three.js Sprite). Decided as a mode of og.Sprite and SpriteDesc rather than a component of its own: a billboard is the same quad, texture, region, flash, glow, blend, layer, drop shadow and texture array layer as any sprite, drawn by the same sprite batch and shader, which only stands its corners differently. The turn is computed on the GPU from each camera's own axes (the main camera, every og.CameraView and og.Mirror, every face of a reflection probe), so it never feeds back into the simulation and a snapshot holds only the mode. The sprite turns about its anchor (a nine-slice turns as one panel), `rotation` still turns it within its own plane, and its drop shadow is cast by the quad stood upright facing the sun, so it shows the whole shape from every camera. Within its layer a faced sprite without sortY draws back to front from the camera's eye (by view depth; a probe's six faces by distance from the probe), after the layer's drop shadows and before its unfaced sprites; and it is culled by its bounds (a sphere round the anchor through the farthest corner) against the camera's view. Sprites draw over the 3D scene after its transparent meshes and particles, depth tested and not depth writing, so a billboard behind a transparent mesh still draws over it.",
|
|
15652
|
+
"type": "string",
|
|
15653
|
+
"enum": [
|
|
15654
|
+
"none",
|
|
15655
|
+
"camera",
|
|
15656
|
+
"cameraY"
|
|
15657
|
+
],
|
|
15658
|
+
"x-og-variants": {
|
|
15659
|
+
"none": "In the world's xy plane facing +z, as every sprite before billboards.",
|
|
15660
|
+
"camera": "In the camera's view plane: its x along the camera's right, its y along its up, as particle billboards (smoke, glints, impostors seen from any side).",
|
|
15661
|
+
"cameraY": "Upright, turned about the world's y axis towards the camera: its y stays +y, its x the camera's right laid level. Trees, characters and props that must stand while the camera looks down on them."
|
|
15662
|
+
}
|
|
15663
|
+
},
|
|
15599
15664
|
"StripBlend": {
|
|
15600
15665
|
"x-og-kind": "enum",
|
|
15601
15666
|
"x-og-module": "render",
|
|
@@ -17225,7 +17290,7 @@
|
|
|
17225
17290
|
"SpriteDesc": {
|
|
17226
17291
|
"x-og-kind": "desc",
|
|
17227
17292
|
"x-og-module": "render",
|
|
17228
|
-
"description": "A textured or solid quad in the world's xy plane facing +z, drawn this frame only (immediate mode, as og.render.text): submit it every tick it should show. Sprites and text are sorted by layer and drawn over the 3D scene.",
|
|
17293
|
+
"description": "A textured or solid quad in the world's xy plane facing +z (or turned to the camera, `facing`), drawn this frame only (immediate mode, as og.render.text): submit it every tick it should show. Sprites and text are sorted by layer and drawn over the 3D scene.",
|
|
17229
17294
|
"type": "object",
|
|
17230
17295
|
"properties": {
|
|
17231
17296
|
"texture": {
|
|
@@ -17387,6 +17452,11 @@
|
|
|
17387
17452
|
"description": "As three.js Material.toneMapped: true draws the sprite into the lit scene, carried by exposure (auto exposure included), bloom and the tone curve like any surface. false keeps its colours as given: still placed in the world, depth tested and sorted with the other sprites, but shown unexposed and uncurved (clamped to 0 to 1), outside bloom and fog; the grade, vignette, grain and screen flash still apply. For world UI that must read the same at noon and at dusk: speech bubbles, name tags, markers. Alpha blending only: an additive sprite adds light and is always tone mapped.",
|
|
17388
17453
|
"default": true
|
|
17389
17454
|
},
|
|
17455
|
+
"facing": {
|
|
17456
|
+
"$ref": "#/$defs/SpriteFacing",
|
|
17457
|
+
"description": "A billboard: none keeps the quad in the world's xy plane; camera turns it into the view plane of each camera that draws it; cameraY stands it upright turned about y towards the camera (trees, characters). World sprites only (a screen sprite ignores it); see SpriteFacing for sorting, culling and its drop shadow.",
|
|
17458
|
+
"default": "none"
|
|
17459
|
+
},
|
|
17390
17460
|
"flipX": {
|
|
17391
17461
|
"type": "boolean",
|
|
17392
17462
|
"description": "Mirror the region left to right.",
|
|
@@ -17453,7 +17523,7 @@
|
|
|
17453
17523
|
"Sprite": {
|
|
17454
17524
|
"x-og-kind": "component",
|
|
17455
17525
|
"x-og-module": "render",
|
|
17456
|
-
"description": "A sprite drawn every frame at the entity's MatrixWorld (its xy and z, its rotation about z
|
|
17526
|
+
"description": "A sprite drawn every frame at the entity's MatrixWorld (its xy and z, its rotation about z, in the xy plane or turned to the camera by `facing`; its scale multiplies width and height, so squash and stretch is a tween of og.Transform.scale). With an og.Flipbook on the entity, the texture (or an `array true` sheet's texture array layer), region and anchor come from the flipbook's current frame.\nSorted with the immediate sprites and text by layer, then (sortY) by y, then texture: one draw per run of one texture. Tile layers draw before the sprites of their layer.",
|
|
17457
17527
|
"type": "object",
|
|
17458
17528
|
"properties": {
|
|
17459
17529
|
"texture": {
|
|
@@ -17542,6 +17612,11 @@
|
|
|
17542
17612
|
"description": "Within its layer, lower y draws in front: top-down characters, props and trees overlap by their feet.",
|
|
17543
17613
|
"default": false
|
|
17544
17614
|
},
|
|
17615
|
+
"facing": {
|
|
17616
|
+
"$ref": "#/$defs/SpriteFacing",
|
|
17617
|
+
"description": "A billboard (SpriteDesc.facing): none keeps the quad in the world's xy plane; camera turns it into each camera's view plane; cameraY stands it upright turned about y towards the camera, for trees and characters in a 3D set. Its afterimages face as it does; its blob shadow stays flat.",
|
|
17618
|
+
"default": "none"
|
|
17619
|
+
},
|
|
17545
17620
|
"flipX": {
|
|
17546
17621
|
"type": "boolean",
|
|
17547
17622
|
"description": "Mirror left to right (a character facing left).",
|
|
@@ -20863,7 +20938,7 @@
|
|
|
20863
20938
|
"CollisionStarted": {
|
|
20864
20939
|
"x-og-kind": "event",
|
|
20865
20940
|
"x-og-module": "physics",
|
|
20866
|
-
"description": "Two solid colliders started touching during the tick.",
|
|
20941
|
+
"description": "Two solid colliders started touching during the tick. Read in the tick after, when og.Velocity already holds the solver's answer (the bodies parting): how hard they met is `impulse` and `relativeVelocity`, taken in the step itself.",
|
|
20867
20942
|
"type": "object",
|
|
20868
20943
|
"properties": {
|
|
20869
20944
|
"a": {
|
|
@@ -20876,18 +20951,32 @@
|
|
|
20876
20951
|
},
|
|
20877
20952
|
"point": {
|
|
20878
20953
|
"$ref": "#/$defs/Vector3",
|
|
20879
|
-
"description": "The deepest contact point in world space (z is 0 in 2D)."
|
|
20954
|
+
"description": "The deepest contact point in world space (z is 0 in 2D).",
|
|
20955
|
+
"x-og-unit": "m"
|
|
20880
20956
|
},
|
|
20881
20957
|
"normal": {
|
|
20882
20958
|
"$ref": "#/$defs/Vector3",
|
|
20883
20959
|
"description": "The contact normal, from a towards b."
|
|
20960
|
+
},
|
|
20961
|
+
"impulse": {
|
|
20962
|
+
"type": "number",
|
|
20963
|
+
"description": "The normal impulse the solver gave the pair in the step that made the contact (every substep, every contact point), in newton-seconds: b took `impulse` along `normal`, a the same against it. Its momentum answer to the hit, at least 0; heavier and faster hits give more.",
|
|
20964
|
+
"minimum": 0,
|
|
20965
|
+
"x-og-unit": "newtonSecond"
|
|
20966
|
+
},
|
|
20967
|
+
"relativeVelocity": {
|
|
20968
|
+
"$ref": "#/$defs/Vector3",
|
|
20969
|
+
"description": "a's velocity relative to b at `point` as that step began, before the solver answered: each body's linear velocity plus its angular velocity crossed with the point's offset from its centre of mass (a static collider is still; z is 0 in 2D). Along `normal` it is the closing speed, positive while they approach: max(0, relativeVelocity · normal) is how hard they hit, in m/s.",
|
|
20970
|
+
"x-og-unit": "mps"
|
|
20884
20971
|
}
|
|
20885
20972
|
},
|
|
20886
20973
|
"required": [
|
|
20887
20974
|
"a",
|
|
20888
20975
|
"b",
|
|
20889
20976
|
"point",
|
|
20890
|
-
"normal"
|
|
20977
|
+
"normal",
|
|
20978
|
+
"impulse",
|
|
20979
|
+
"relativeVelocity"
|
|
20891
20980
|
],
|
|
20892
20981
|
"additionalProperties": false
|
|
20893
20982
|
},
|
|
@@ -24368,6 +24457,427 @@
|
|
|
24368
24457
|
},
|
|
24369
24458
|
"additionalProperties": false
|
|
24370
24459
|
},
|
|
24460
|
+
"LookAt": {
|
|
24461
|
+
"x-og-kind": "component",
|
|
24462
|
+
"x-og-module": "anim",
|
|
24463
|
+
"description": "An aim constraint on a skeleton, applied after its clips, graph and IK chains: `joint` turns so its `axis` points at `target` and its `upAxis` leans towards `up` (three.js Object3D.lookAt: +Z at the target, +Y up). The direction is held within maxYaw and maxPitch of the animated forward; with `bones` above 1 the joint's parents share the turn. Put it on its own entity (a head, the eyes, a turret's barrel); constraints apply in query order, and og.JointLimit clamps the joints it turns.",
|
|
24464
|
+
"type": "object",
|
|
24465
|
+
"properties": {
|
|
24466
|
+
"skeleton": {
|
|
24467
|
+
"$ref": "#/$defs/Entity",
|
|
24468
|
+
"description": "The entity with the og.Skeleton this constraint turns.",
|
|
24469
|
+
"default": 0
|
|
24470
|
+
},
|
|
24471
|
+
"joint": {
|
|
24472
|
+
"type": "integer",
|
|
24473
|
+
"minimum": 0,
|
|
24474
|
+
"maximum": 4294967295,
|
|
24475
|
+
"description": "The joint that aims (an index into the skin's joints): the head, an eye.",
|
|
24476
|
+
"default": 0,
|
|
24477
|
+
"minimum": 0
|
|
24478
|
+
},
|
|
24479
|
+
"bones": {
|
|
24480
|
+
"type": "integer",
|
|
24481
|
+
"minimum": 0,
|
|
24482
|
+
"maximum": 4294967295,
|
|
24483
|
+
"description": "How many joints share the turn: `joint` and its parents (3 spreads a look over neck, chest and spine), each parent taking an even share and `joint` the rest.",
|
|
24484
|
+
"default": 1,
|
|
24485
|
+
"minimum": 1,
|
|
24486
|
+
"maximum": 8
|
|
24487
|
+
},
|
|
24488
|
+
"target": {
|
|
24489
|
+
"$ref": "#/$defs/Vector3",
|
|
24490
|
+
"description": "The point to look at, in `space`.",
|
|
24491
|
+
"default": {
|
|
24492
|
+
"x": 0,
|
|
24493
|
+
"y": 0,
|
|
24494
|
+
"z": 0
|
|
24495
|
+
},
|
|
24496
|
+
"x-og-unit": "m"
|
|
24497
|
+
},
|
|
24498
|
+
"space": {
|
|
24499
|
+
"$ref": "#/$defs/IkSpace",
|
|
24500
|
+
"description": "What `target` and `up` are relative to: world (the frame the skeleton entity's og.Transform is in) or model.",
|
|
24501
|
+
"default": "world"
|
|
24502
|
+
},
|
|
24503
|
+
"axis": {
|
|
24504
|
+
"$ref": "#/$defs/Vector3",
|
|
24505
|
+
"description": "The joint's forward, in its own frame: the axis turned onto the target.",
|
|
24506
|
+
"default": {
|
|
24507
|
+
"x": 0,
|
|
24508
|
+
"y": 0,
|
|
24509
|
+
"z": 1
|
|
24510
|
+
}
|
|
24511
|
+
},
|
|
24512
|
+
"upAxis": {
|
|
24513
|
+
"$ref": "#/$defs/Vector3",
|
|
24514
|
+
"description": "The joint's up, in its own frame: yaw turns about it, pitch towards it, and it rolls towards `up`.",
|
|
24515
|
+
"default": {
|
|
24516
|
+
"x": 0,
|
|
24517
|
+
"y": 1,
|
|
24518
|
+
"z": 0
|
|
24519
|
+
}
|
|
24520
|
+
},
|
|
24521
|
+
"up": {
|
|
24522
|
+
"$ref": "#/$defs/Vector3",
|
|
24523
|
+
"description": "The up hint, a direction in `space` the joint's `upAxis` leans to (three.js Object3D.up); the zero vector keeps the animated roll.",
|
|
24524
|
+
"default": {
|
|
24525
|
+
"x": 0,
|
|
24526
|
+
"y": 1,
|
|
24527
|
+
"z": 0
|
|
24528
|
+
}
|
|
24529
|
+
},
|
|
24530
|
+
"maxYaw": {
|
|
24531
|
+
"type": "number",
|
|
24532
|
+
"description": "The largest turn about `upAxis`, left or right of the animated forward.",
|
|
24533
|
+
"default": 3.1416,
|
|
24534
|
+
"minimum": 0,
|
|
24535
|
+
"maximum": 3.1416,
|
|
24536
|
+
"x-og-unit": "rad",
|
|
24537
|
+
"x-og-tunable": true
|
|
24538
|
+
},
|
|
24539
|
+
"maxPitch": {
|
|
24540
|
+
"type": "number",
|
|
24541
|
+
"description": "The largest turn towards or away from `upAxis`, from the animated forward.",
|
|
24542
|
+
"default": 1.5708,
|
|
24543
|
+
"minimum": 0,
|
|
24544
|
+
"maximum": 1.5708,
|
|
24545
|
+
"x-og-unit": "rad",
|
|
24546
|
+
"x-og-tunable": true
|
|
24547
|
+
},
|
|
24548
|
+
"weight": {
|
|
24549
|
+
"type": "number",
|
|
24550
|
+
"description": "How much of the turn is applied (0 = the animated pose, 1 = aimed).",
|
|
24551
|
+
"default": 1,
|
|
24552
|
+
"minimum": 0,
|
|
24553
|
+
"maximum": 1,
|
|
24554
|
+
"x-og-tunable": true
|
|
24555
|
+
},
|
|
24556
|
+
"clamped": {
|
|
24557
|
+
"type": "boolean",
|
|
24558
|
+
"description": "Written: the target lay outside maxYaw or maxPitch, so the joint aims at the nearest direction inside them.",
|
|
24559
|
+
"default": false,
|
|
24560
|
+
"readOnly": true
|
|
24561
|
+
}
|
|
24562
|
+
},
|
|
24563
|
+
"additionalProperties": false
|
|
24564
|
+
},
|
|
24565
|
+
"JointLimit": {
|
|
24566
|
+
"x-og-kind": "component",
|
|
24567
|
+
"x-og-module": "anim",
|
|
24568
|
+
"description": "How far a joint may turn from its rest rotation when og.anim's solvers (og.IkChain, og.LookAt, og.FootLock) turn it: a swing of `axis` within a cone and a twist about it within a range. A hinge (a knee, an elbow) is `axis` along the hinge, `swing` 0 (or a little play) and the bend range as twistMin...twistMax. Put it on its own entity, one per joint; the animated pose itself is never clamped.",
|
|
24569
|
+
"type": "object",
|
|
24570
|
+
"properties": {
|
|
24571
|
+
"skeleton": {
|
|
24572
|
+
"$ref": "#/$defs/Entity",
|
|
24573
|
+
"description": "The entity with the og.Skeleton whose joint this limits.",
|
|
24574
|
+
"default": 0
|
|
24575
|
+
},
|
|
24576
|
+
"joint": {
|
|
24577
|
+
"type": "integer",
|
|
24578
|
+
"minimum": 0,
|
|
24579
|
+
"maximum": 4294967295,
|
|
24580
|
+
"description": "The limited joint (an index into the skin's joints).",
|
|
24581
|
+
"default": 0,
|
|
24582
|
+
"minimum": 0
|
|
24583
|
+
},
|
|
24584
|
+
"axis": {
|
|
24585
|
+
"$ref": "#/$defs/Vector3",
|
|
24586
|
+
"description": "The twist axis in the joint's rest frame: along the bone for a ball joint, along the hinge for a hinge.",
|
|
24587
|
+
"default": {
|
|
24588
|
+
"x": 0,
|
|
24589
|
+
"y": 1,
|
|
24590
|
+
"z": 0
|
|
24591
|
+
}
|
|
24592
|
+
},
|
|
24593
|
+
"swing": {
|
|
24594
|
+
"type": "number",
|
|
24595
|
+
"description": "The cone half-angle the axis may swing away from its rest direction (0 locks it: a hinge; pi is free).",
|
|
24596
|
+
"default": 3.1416,
|
|
24597
|
+
"minimum": 0,
|
|
24598
|
+
"maximum": 3.1416,
|
|
24599
|
+
"x-og-unit": "rad",
|
|
24600
|
+
"x-og-tunable": true
|
|
24601
|
+
},
|
|
24602
|
+
"twistMin": {
|
|
24603
|
+
"type": "number",
|
|
24604
|
+
"description": "The least twist about `axis` from rest (a hinge's bend one way).",
|
|
24605
|
+
"default": -3.1416,
|
|
24606
|
+
"minimum": -3.1416,
|
|
24607
|
+
"maximum": 3.1416,
|
|
24608
|
+
"x-og-unit": "rad",
|
|
24609
|
+
"x-og-tunable": true
|
|
24610
|
+
},
|
|
24611
|
+
"twistMax": {
|
|
24612
|
+
"type": "number",
|
|
24613
|
+
"description": "The most twist about `axis` from rest (a hinge's bend the other way).",
|
|
24614
|
+
"default": 3.1416,
|
|
24615
|
+
"minimum": -3.1416,
|
|
24616
|
+
"maximum": 3.1416,
|
|
24617
|
+
"x-og-unit": "rad",
|
|
24618
|
+
"x-og-tunable": true
|
|
24619
|
+
}
|
|
24620
|
+
},
|
|
24621
|
+
"additionalProperties": false
|
|
24622
|
+
},
|
|
24623
|
+
"FootLock": {
|
|
24624
|
+
"x-og-kind": "component",
|
|
24625
|
+
"x-og-module": "anim",
|
|
24626
|
+
"description": "Foot locking: while the playing clips plant `foot` (within 5 mm of its lowest in each clip, the notion retargeting uses, weighed across blends and cross-fades: planted when the planting clips hold at least half the pose), the foot stays where it touched the ground, through clip blends and root motion, its leg bent by two-bone IK and the foot keeping its animated orientation; when the clips lift it, the foot rejoins its animation over `release`. Put it on its own entity, one per foot; locks apply after root motion and before og.IkChain, in query order, and og.JointLimit clamps the leg. The lock is world state (the `og.anim` state block).",
|
|
24627
|
+
"type": "object",
|
|
24628
|
+
"properties": {
|
|
24629
|
+
"skeleton": {
|
|
24630
|
+
"$ref": "#/$defs/Entity",
|
|
24631
|
+
"description": "The entity with the og.Skeleton whose foot this holds.",
|
|
24632
|
+
"default": 0
|
|
24633
|
+
},
|
|
24634
|
+
"foot": {
|
|
24635
|
+
"type": "integer",
|
|
24636
|
+
"minimum": 0,
|
|
24637
|
+
"maximum": 4294967295,
|
|
24638
|
+
"description": "The foot joint (an index into the skin's joints); the two bones above it are the leg that bends.",
|
|
24639
|
+
"default": 0,
|
|
24640
|
+
"minimum": 0
|
|
24641
|
+
},
|
|
24642
|
+
"weight": {
|
|
24643
|
+
"type": "number",
|
|
24644
|
+
"description": "How much of the lock is applied (0 = the animated foot, 1 = held).",
|
|
24645
|
+
"default": 1,
|
|
24646
|
+
"minimum": 0,
|
|
24647
|
+
"maximum": 1,
|
|
24648
|
+
"x-og-tunable": true
|
|
24649
|
+
},
|
|
24650
|
+
"release": {
|
|
24651
|
+
"type": "number",
|
|
24652
|
+
"description": "Seconds the foot takes to rejoin its animation once lifted (0: at once).",
|
|
24653
|
+
"default": 0.15,
|
|
24654
|
+
"minimum": 0,
|
|
24655
|
+
"maximum": 2,
|
|
24656
|
+
"x-og-unit": "s",
|
|
24657
|
+
"x-og-tunable": true
|
|
24658
|
+
},
|
|
24659
|
+
"maxDistance": {
|
|
24660
|
+
"type": "number",
|
|
24661
|
+
"description": "Farther than this from where the animation puts the foot, the lock lets go (a leg cannot stretch).",
|
|
24662
|
+
"default": 0.5,
|
|
24663
|
+
"minimum": 0,
|
|
24664
|
+
"x-og-unit": "m",
|
|
24665
|
+
"x-og-tunable": true
|
|
24666
|
+
},
|
|
24667
|
+
"planted": {
|
|
24668
|
+
"type": "boolean",
|
|
24669
|
+
"description": "Written: the playing clips plant the foot this tick.",
|
|
24670
|
+
"default": false,
|
|
24671
|
+
"readOnly": true
|
|
24672
|
+
},
|
|
24673
|
+
"locked": {
|
|
24674
|
+
"type": "boolean",
|
|
24675
|
+
"description": "Written: the foot is held at its lock this tick.",
|
|
24676
|
+
"default": false,
|
|
24677
|
+
"readOnly": true
|
|
24678
|
+
}
|
|
24679
|
+
},
|
|
24680
|
+
"additionalProperties": false
|
|
24681
|
+
},
|
|
24682
|
+
"SpringSpace": {
|
|
24683
|
+
"x-og-kind": "enum",
|
|
24684
|
+
"x-og-module": "anim",
|
|
24685
|
+
"description": "Where a spring bone's tails move.",
|
|
24686
|
+
"type": "string",
|
|
24687
|
+
"enum": [
|
|
24688
|
+
"world",
|
|
24689
|
+
"model"
|
|
24690
|
+
],
|
|
24691
|
+
"x-og-variants": {
|
|
24692
|
+
"world": "The frame the skeleton entity's og.Transform is written in: the chain lags behind the entity's motion (walking, root motion, a jump).",
|
|
24693
|
+
"model": "The skeleton's model space: only the animation moves the chain (a teleport or a vehicle carrying the entity does not)."
|
|
24694
|
+
}
|
|
24695
|
+
},
|
|
24696
|
+
"SpringBone": {
|
|
24697
|
+
"x-og-kind": "component",
|
|
24698
|
+
"x-og-module": "anim",
|
|
24699
|
+
"description": "A spring (jiggle) bone chain, three-vrm's VRMSpringBone: `joint` and its `bones` - 1 parents swing after their parents' motion. Each joint's tail (the next joint of the chain; for the last joint its first child, or its parent bone continued at the same length) is a point pulled towards where the animated pose puts it by a damped spring (`frequency`, `damping`), under `gravity`, held at the bone's length, and the joint turns to point at it. Applied after og.IkChain and og.LookAt, top joint first; put it on its own entity (a tail, an ear, a strand of hair, a single jiggling node), one per chain. Deterministic under the fixed tick; the tails' positions and velocities are world state (the `og.anim` state block), so a restore continues a swing exactly. A changed chain (another skeleton, length or space) restarts at the animated pose.",
|
|
24700
|
+
"type": "object",
|
|
24701
|
+
"properties": {
|
|
24702
|
+
"skeleton": {
|
|
24703
|
+
"$ref": "#/$defs/Entity",
|
|
24704
|
+
"description": "The entity with the og.Skeleton whose joints this swings.",
|
|
24705
|
+
"default": 0
|
|
24706
|
+
},
|
|
24707
|
+
"joint": {
|
|
24708
|
+
"type": "integer",
|
|
24709
|
+
"minimum": 0,
|
|
24710
|
+
"maximum": 4294967295,
|
|
24711
|
+
"description": "The chain's last joint (an index into the skin's joints): the tip of a tail, an ear.",
|
|
24712
|
+
"default": 0,
|
|
24713
|
+
"minimum": 0
|
|
24714
|
+
},
|
|
24715
|
+
"bones": {
|
|
24716
|
+
"type": "integer",
|
|
24717
|
+
"minimum": 0,
|
|
24718
|
+
"maximum": 4294967295,
|
|
24719
|
+
"description": "How many joints swing: `joint` and its parents (1 is the joint alone).",
|
|
24720
|
+
"default": 1,
|
|
24721
|
+
"minimum": 1,
|
|
24722
|
+
"maximum": 16
|
|
24723
|
+
},
|
|
24724
|
+
"frequency": {
|
|
24725
|
+
"type": "number",
|
|
24726
|
+
"description": "How fast a tail springs back to its animated place: the spring's natural frequency (0: no spring, it only hangs and swings).",
|
|
24727
|
+
"default": 3,
|
|
24728
|
+
"minimum": 0,
|
|
24729
|
+
"maximum": 30,
|
|
24730
|
+
"x-og-unit": "hz",
|
|
24731
|
+
"x-og-tunable": true
|
|
24732
|
+
},
|
|
24733
|
+
"damping": {
|
|
24734
|
+
"type": "number",
|
|
24735
|
+
"description": "The damping ratio: 0 swings on, 1 settles without overshooting (critical damping).",
|
|
24736
|
+
"default": 0.3,
|
|
24737
|
+
"minimum": 0,
|
|
24738
|
+
"maximum": 2,
|
|
24739
|
+
"x-og-tunable": true
|
|
24740
|
+
},
|
|
24741
|
+
"tipFrequency": {
|
|
24742
|
+
"type": "number",
|
|
24743
|
+
"description": "The last joint's frequency as a multiple of `frequency`, the joints between in proportion along the chain (1: every joint alike; 0.25: the tip springs back four times slower than the top, a soft strand on a stiff root).",
|
|
24744
|
+
"default": 1,
|
|
24745
|
+
"minimum": 0,
|
|
24746
|
+
"maximum": 4,
|
|
24747
|
+
"x-og-tunable": true
|
|
24748
|
+
},
|
|
24749
|
+
"tipDamping": {
|
|
24750
|
+
"type": "number",
|
|
24751
|
+
"description": "The last joint's damping ratio as a multiple of `damping`, the joints between in proportion along the chain (1: every joint alike).",
|
|
24752
|
+
"default": 1,
|
|
24753
|
+
"minimum": 0,
|
|
24754
|
+
"maximum": 4,
|
|
24755
|
+
"x-og-tunable": true
|
|
24756
|
+
},
|
|
24757
|
+
"gravity": {
|
|
24758
|
+
"$ref": "#/$defs/Vector3",
|
|
24759
|
+
"description": "An acceleration on every tail, in `space` (three-vrm's gravityDir times gravityPower): (0, -9.8, 0) makes a chain droop.",
|
|
24760
|
+
"default": {
|
|
24761
|
+
"x": 0,
|
|
24762
|
+
"y": 0,
|
|
24763
|
+
"z": 0
|
|
24764
|
+
},
|
|
24765
|
+
"x-og-unit": "mps2"
|
|
24766
|
+
},
|
|
24767
|
+
"space": {
|
|
24768
|
+
"$ref": "#/$defs/SpringSpace",
|
|
24769
|
+
"description": "Where the tails move: world (the frame the skeleton entity's og.Transform is in, so the chain lags behind the entity's motion) or model (only the animation moves it).",
|
|
24770
|
+
"default": "world"
|
|
24771
|
+
},
|
|
24772
|
+
"weight": {
|
|
24773
|
+
"type": "number",
|
|
24774
|
+
"description": "How much of the swing is applied (0 = the animated pose, 1 = the spring's).",
|
|
24775
|
+
"default": 1,
|
|
24776
|
+
"minimum": 0,
|
|
24777
|
+
"maximum": 1,
|
|
24778
|
+
"x-og-tunable": true
|
|
24779
|
+
},
|
|
24780
|
+
"radius": {
|
|
24781
|
+
"type": "number",
|
|
24782
|
+
"description": "The tails' radius against og.SpringCollider (three-vrm's hitRadius): a tail stays this far outside every collider it meets (0: a point).",
|
|
24783
|
+
"default": 0,
|
|
24784
|
+
"minimum": 0,
|
|
24785
|
+
"x-og-unit": "m",
|
|
24786
|
+
"x-og-tunable": true
|
|
24787
|
+
},
|
|
24788
|
+
"colliders": {
|
|
24789
|
+
"type": "integer",
|
|
24790
|
+
"minimum": 0,
|
|
24791
|
+
"maximum": 4294967295,
|
|
24792
|
+
"description": "The og.SpringCollider layers the tails are pushed out of, as bits: a collider on the same skeleton counts when its `layers` meet these.",
|
|
24793
|
+
"default": 4294967295
|
|
24794
|
+
},
|
|
24795
|
+
"lag": {
|
|
24796
|
+
"type": "number",
|
|
24797
|
+
"description": "Written: the farthest a tail is from its animated place this tick.",
|
|
24798
|
+
"default": 0,
|
|
24799
|
+
"x-og-unit": "m",
|
|
24800
|
+
"readOnly": true
|
|
24801
|
+
}
|
|
24802
|
+
},
|
|
24803
|
+
"additionalProperties": false
|
|
24804
|
+
},
|
|
24805
|
+
"SpringColliderShape": {
|
|
24806
|
+
"x-og-kind": "enum",
|
|
24807
|
+
"x-og-module": "anim",
|
|
24808
|
+
"description": "The shape of a spring collider.",
|
|
24809
|
+
"type": "string",
|
|
24810
|
+
"enum": [
|
|
24811
|
+
"sphere",
|
|
24812
|
+
"capsule"
|
|
24813
|
+
],
|
|
24814
|
+
"x-og-variants": {
|
|
24815
|
+
"sphere": "A ball of `radius` about `offset`.",
|
|
24816
|
+
"capsule": "A capsule of `radius` about the segment from `offset` to `tail`."
|
|
24817
|
+
}
|
|
24818
|
+
},
|
|
24819
|
+
"SpringCollider": {
|
|
24820
|
+
"x-og-kind": "component",
|
|
24821
|
+
"x-og-module": "anim",
|
|
24822
|
+
"description": "A collider spring bones are kept out of, three-vrm's VRMSpringBoneCollider: a sphere or a capsule riding on a joint of a skeleton (a head, a chest, an upper arm), so hair, ears and tails do not swing through the body. Each tick, after a tail of an og.SpringBone of the same skeleton has stepped and before its joint turns, the tail is pushed out of every collider whose `layers` meet the spring's `colliders` (in query order) to `radius` plus the spring's `radius`, keeping its bone's length. Put it on its own entity, one per shape; colliders follow the pose as it is when a chain is swung, so one on a joint an earlier chain swung follows that swing.",
|
|
24823
|
+
"type": "object",
|
|
24824
|
+
"properties": {
|
|
24825
|
+
"skeleton": {
|
|
24826
|
+
"$ref": "#/$defs/Entity",
|
|
24827
|
+
"description": "The entity with the og.Skeleton whose spring bones this keeps out.",
|
|
24828
|
+
"default": 0
|
|
24829
|
+
},
|
|
24830
|
+
"joint": {
|
|
24831
|
+
"type": "integer",
|
|
24832
|
+
"minimum": 0,
|
|
24833
|
+
"maximum": 4294967295,
|
|
24834
|
+
"description": "The joint the collider rides on (an index into the skin's joints).",
|
|
24835
|
+
"default": 0,
|
|
24836
|
+
"minimum": 0
|
|
24837
|
+
},
|
|
24838
|
+
"shape": {
|
|
24839
|
+
"$ref": "#/$defs/SpringColliderShape",
|
|
24840
|
+
"description": "A sphere about `offset`, or a capsule from `offset` to `tail`.",
|
|
24841
|
+
"default": "sphere"
|
|
24842
|
+
},
|
|
24843
|
+
"offset": {
|
|
24844
|
+
"$ref": "#/$defs/Vector3",
|
|
24845
|
+
"description": "The sphere's centre, or the capsule's first end, in the joint's frame.",
|
|
24846
|
+
"default": {
|
|
24847
|
+
"x": 0,
|
|
24848
|
+
"y": 0,
|
|
24849
|
+
"z": 0
|
|
24850
|
+
},
|
|
24851
|
+
"x-og-unit": "m"
|
|
24852
|
+
},
|
|
24853
|
+
"tail": {
|
|
24854
|
+
"$ref": "#/$defs/Vector3",
|
|
24855
|
+
"description": "The capsule's other end, in the joint's frame (a sphere ignores it).",
|
|
24856
|
+
"default": {
|
|
24857
|
+
"x": 0,
|
|
24858
|
+
"y": 0,
|
|
24859
|
+
"z": 0
|
|
24860
|
+
},
|
|
24861
|
+
"x-og-unit": "m"
|
|
24862
|
+
},
|
|
24863
|
+
"radius": {
|
|
24864
|
+
"type": "number",
|
|
24865
|
+
"description": "The radius, in metres of the skeleton's model space (the joint's own scale does not apply).",
|
|
24866
|
+
"default": 0.1,
|
|
24867
|
+
"minimum": 0,
|
|
24868
|
+
"x-og-unit": "m",
|
|
24869
|
+
"x-og-tunable": true
|
|
24870
|
+
},
|
|
24871
|
+
"layers": {
|
|
24872
|
+
"type": "integer",
|
|
24873
|
+
"minimum": 0,
|
|
24874
|
+
"maximum": 4294967295,
|
|
24875
|
+
"description": "The layers this collider is on, as bits (a spring bone's `colliders` picks them).",
|
|
24876
|
+
"default": 1
|
|
24877
|
+
}
|
|
24878
|
+
},
|
|
24879
|
+
"additionalProperties": false
|
|
24880
|
+
},
|
|
24371
24881
|
"AnimationEvent": {
|
|
24372
24882
|
"x-og-kind": "event",
|
|
24373
24883
|
"x-og-module": "anim",
|
|
@@ -24514,7 +25024,7 @@
|
|
|
24514
25024
|
"Rig": {
|
|
24515
25025
|
"x-og-kind": "handle",
|
|
24516
25026
|
"x-og-module": "anim",
|
|
24517
|
-
"description": "A humanoid map from og.load.rig (a cooked `.ogt` of `type rig`): the naming scheme a skeleton's node names follow
|
|
25027
|
+
"description": "A humanoid map from og.load.rig (a cooked `.ogt` of `type rig`): the naming scheme a skeleton's node names follow, the standard bones it names outright and, with `footHeight`, how high its ankles stand above the ground.",
|
|
24518
25028
|
"type": "integer",
|
|
24519
25029
|
"minimum": 0
|
|
24520
25030
|
},
|
|
@@ -24526,7 +25036,7 @@
|
|
|
24526
25036
|
"properties": {
|
|
24527
25037
|
"bone": {
|
|
24528
25038
|
"type": "string",
|
|
24529
|
-
"description": "The standard bone: hips, spine, chest, upperChest, neck, head, then leftShoulder, leftUpperArm, leftLowerArm, leftHand, the right arm, leftUpperLeg, leftLowerLeg, leftFoot, leftToes and the right leg."
|
|
25039
|
+
"description": "The standard bone: hips, spine, chest, upperChest, neck, head, then leftShoulder, leftUpperArm, leftLowerArm, leftHand, the right arm, leftUpperLeg, leftLowerLeg, leftFoot, leftToes and the right leg, then each hand's fingers (VRM 1.0 names): leftThumbMetacarpal, leftThumbProximal, leftThumbDistal, leftIndexProximal, leftIndexIntermediate, leftIndexDistal, the same for Middle, Ring and Little, and the right hand's."
|
|
24530
25040
|
},
|
|
24531
25041
|
"node": {
|
|
24532
25042
|
"type": "string",
|
|
@@ -24621,6 +25131,25 @@
|
|
|
24621
25131
|
},
|
|
24622
25132
|
"additionalProperties": false
|
|
24623
25133
|
},
|
|
25134
|
+
"MirrorDesc": {
|
|
25135
|
+
"x-og-kind": "desc",
|
|
25136
|
+
"x-og-module": "anim",
|
|
25137
|
+
"description": "A clip to play on the other side of the skeleton it was made for.",
|
|
25138
|
+
"type": "object",
|
|
25139
|
+
"properties": {
|
|
25140
|
+
"clip": {
|
|
25141
|
+
"$ref": "#/$defs/ClipAsset",
|
|
25142
|
+
"description": "The clip, made for `skeleton`.",
|
|
25143
|
+
"default": 0
|
|
25144
|
+
},
|
|
25145
|
+
"skeleton": {
|
|
25146
|
+
"$ref": "#/$defs/SkeletonAsset",
|
|
25147
|
+
"description": "The skeleton the clip was made for (og.load.animation's `skeleton`); its left and right nodes are paired by name, the side tokens every rig naming scheme writes swapped (LeftArm and RightArm, thigh.L and thigh.R, J_Bip_L_ and J_Bip_R_, calf_l and calf_r).",
|
|
25148
|
+
"default": 0
|
|
25149
|
+
}
|
|
25150
|
+
},
|
|
25151
|
+
"additionalProperties": false
|
|
25152
|
+
},
|
|
24624
25153
|
"FlipbookSheet": {
|
|
24625
25154
|
"x-og-kind": "handle",
|
|
24626
25155
|
"x-og-module": "anim",
|
|
@@ -25791,6 +26320,34 @@
|
|
|
25791
26320
|
"ui": "Interface sounds."
|
|
25792
26321
|
}
|
|
25793
26322
|
},
|
|
26323
|
+
"PanningModel": {
|
|
26324
|
+
"x-og-kind": "enum",
|
|
26325
|
+
"x-og-module": "audio",
|
|
26326
|
+
"description": "How an AudioListener places spatial sources between the ears, as Web Audio's PannerNode.panningModel.",
|
|
26327
|
+
"type": "string",
|
|
26328
|
+
"enum": [
|
|
26329
|
+
"equalpower",
|
|
26330
|
+
"hrtf"
|
|
26331
|
+
],
|
|
26332
|
+
"x-og-variants": {
|
|
26333
|
+
"equalpower": "The stereo panner (Web Audio's equal-power law): for speakers.",
|
|
26334
|
+
"hrtf": "For headphones: a spherical-head model (Brown and Duda, 1998) that delays the far ear by the interaural time difference (up to 0.66 ms) and shadows its highs (up to -20 dB), so a source moves between the ears; front and back, up and down are not told apart (no pinna)."
|
|
26335
|
+
}
|
|
26336
|
+
},
|
|
26337
|
+
"AudioResampler": {
|
|
26338
|
+
"x-og-kind": "enum",
|
|
26339
|
+
"x-og-module": "audio",
|
|
26340
|
+
"description": "How the mixer resamples a voice whose pitch or sound rate differs from the output's.",
|
|
26341
|
+
"type": "string",
|
|
26342
|
+
"enum": [
|
|
26343
|
+
"linear",
|
|
26344
|
+
"sinc"
|
|
26345
|
+
],
|
|
26346
|
+
"x-og-variants": {
|
|
26347
|
+
"linear": "Linear interpolation: the engine's mix before round 4, cheaper, with duller highs (-3.4 dB at 15 kHz from 44.1 kHz) and images (-11.5 dB there).",
|
|
26348
|
+
"sinc": "A Kaiser-windowed sinc (beta 7, 16 taps, 2048 phases; widened up to 64 taps for a voice pitched up to 4x): flat to the highs, images below -70 dB."
|
|
26349
|
+
}
|
|
26350
|
+
},
|
|
25794
26351
|
"AudioSource": {
|
|
25795
26352
|
"x-og-kind": "component",
|
|
25796
26353
|
"x-og-module": "audio",
|
|
@@ -25937,6 +26494,50 @@
|
|
|
25937
26494
|
"maximum": 30,
|
|
25938
26495
|
"x-og-unit": "s",
|
|
25939
26496
|
"x-og-tunable": true
|
|
26497
|
+
},
|
|
26498
|
+
"dopplerFactor": {
|
|
26499
|
+
"type": "number",
|
|
26500
|
+
"description": "Doppler: how much a spatial source's and the listener's motion along the line between them shifts its pitch, from their tick velocities (world positions down og.Parent): pitch times (c - DF * vListener) / (c - DF * vSource), c being Audio.speedOfSound and DF this times AudioListener.dopplerFactor (OpenAL's model). 1 is physical, 0 is off. A jump at or past the speed of sound in a tick is a teleport and shifts nothing; DF * v is held within c/2, so the shift stays within a factor of 3.",
|
|
26501
|
+
"default": 1,
|
|
26502
|
+
"minimum": 0,
|
|
26503
|
+
"maximum": 10,
|
|
26504
|
+
"x-og-tunable": true
|
|
26505
|
+
},
|
|
26506
|
+
"coneInnerAngle": {
|
|
26507
|
+
"type": "number",
|
|
26508
|
+
"description": "Directivity, as three.js PositionalAudio.setDirectionalCone and Web Audio's PannerNode: a spatial source plays at full volume while the listener is within this full angle about the source's +Z (its world transform's, three.js's PositionalAudio orientation); 360 with coneOuterAngle 360 is omnidirectional.",
|
|
26509
|
+
"default": 360,
|
|
26510
|
+
"minimum": 0,
|
|
26511
|
+
"maximum": 360,
|
|
26512
|
+
"x-og-unit": "deg",
|
|
26513
|
+
"x-og-tunable": true
|
|
26514
|
+
},
|
|
26515
|
+
"coneOuterAngle": {
|
|
26516
|
+
"type": "number",
|
|
26517
|
+
"description": "Past this full angle about the source's +Z it plays at coneOuterGain; between coneInnerAngle and this the gain falls linearly with the angle.",
|
|
26518
|
+
"default": 360,
|
|
26519
|
+
"minimum": 0,
|
|
26520
|
+
"maximum": 360,
|
|
26521
|
+
"x-og-unit": "deg",
|
|
26522
|
+
"x-og-tunable": true
|
|
26523
|
+
},
|
|
26524
|
+
"coneOuterGain": {
|
|
26525
|
+
"type": "number",
|
|
26526
|
+
"description": "The gain outside coneOuterAngle.",
|
|
26527
|
+
"default": 0,
|
|
26528
|
+
"minimum": 0,
|
|
26529
|
+
"maximum": 1,
|
|
26530
|
+
"x-og-tunable": true
|
|
26531
|
+
},
|
|
26532
|
+
"virtualize": {
|
|
26533
|
+
"type": "boolean",
|
|
26534
|
+
"description": "Past Audio.maxVoices it goes virtual instead of being culled: silent, its playhead running on (a one-shot still ends on its tick), and heard again from where it would be, fading in, once it stands within the cap. Without it the source is culled (SOUND_CULLED, playing false).",
|
|
26535
|
+
"default": false
|
|
26536
|
+
},
|
|
26537
|
+
"retrigger": {
|
|
26538
|
+
"type": "boolean",
|
|
26539
|
+
"description": "Set true to start the sound again from the top (its startOffset, its startAt) this tick, playing or not, without a level change on `playing`: the voice playing ends (SOUND_RETRIGGERED) and a new one starts in the same tick. The engine sets it back to false and `playing` true.",
|
|
26540
|
+
"default": false
|
|
25940
26541
|
}
|
|
25941
26542
|
},
|
|
25942
26543
|
"additionalProperties": false
|
|
@@ -25954,6 +26555,19 @@
|
|
|
25954
26555
|
"minimum": 0,
|
|
25955
26556
|
"maximum": 4,
|
|
25956
26557
|
"x-og-tunable": true
|
|
26558
|
+
},
|
|
26559
|
+
"dopplerFactor": {
|
|
26560
|
+
"type": "number",
|
|
26561
|
+
"description": "Scales every spatial source's Doppler shift (AudioSource.dopplerFactor); 0 turns Doppler off for this listener.",
|
|
26562
|
+
"default": 1,
|
|
26563
|
+
"minimum": 0,
|
|
26564
|
+
"maximum": 10,
|
|
26565
|
+
"x-og-tunable": true
|
|
26566
|
+
},
|
|
26567
|
+
"panningModel": {
|
|
26568
|
+
"$ref": "#/$defs/PanningModel",
|
|
26569
|
+
"description": "How spatial sources are placed between the ears: equalpower (speakers) or hrtf (headphones). Non-spatial sources keep their pan either way; the stereo path is unchanged while it is equalpower.",
|
|
26570
|
+
"default": "equalpower"
|
|
25957
26571
|
}
|
|
25958
26572
|
},
|
|
25959
26573
|
"additionalProperties": false
|
|
@@ -26045,6 +26659,20 @@
|
|
|
26045
26659
|
"minimum": 0,
|
|
26046
26660
|
"x-og-unit": "s",
|
|
26047
26661
|
"readOnly": true
|
|
26662
|
+
},
|
|
26663
|
+
"speedOfSound": {
|
|
26664
|
+
"type": "number",
|
|
26665
|
+
"description": "The speed of sound Doppler shifts are computed against (AudioSource.dopplerFactor).",
|
|
26666
|
+
"default": 343.3,
|
|
26667
|
+
"minimum": 1,
|
|
26668
|
+
"maximum": 10000,
|
|
26669
|
+
"x-og-unit": "mps",
|
|
26670
|
+
"x-og-tunable": true
|
|
26671
|
+
},
|
|
26672
|
+
"resampler": {
|
|
26673
|
+
"$ref": "#/$defs/AudioResampler",
|
|
26674
|
+
"description": "How voices are resampled: sinc (the default) or linear, the mix before round 4, for a game that relies on its exact output. A sound at the output's rate played at pitch 1 is its own samples either way.",
|
|
26675
|
+
"default": "sinc"
|
|
26048
26676
|
}
|
|
26049
26677
|
},
|
|
26050
26678
|
"additionalProperties": false
|
|
@@ -26402,7 +27030,7 @@
|
|
|
26402
27030
|
"type": "integer",
|
|
26403
27031
|
"minimum": 0,
|
|
26404
27032
|
"maximum": 4294967295,
|
|
26405
|
-
"description": "Why: SOUND_FINISHED (0), SOUND_STOPPED (1), SOUND_REMOVED (2), SOUND_REPLACED (3)
|
|
27033
|
+
"description": "Why: SOUND_FINISHED (0), SOUND_STOPPED (1), SOUND_REMOVED (2), SOUND_REPLACED (3), SOUND_CULLED (4) or SOUND_RETRIGGERED (5)."
|
|
26406
27034
|
}
|
|
26407
27035
|
},
|
|
26408
27036
|
"required": [
|