@origingame/engine 0.3.0 → 0.4.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 +38 -2
- package/dist/web/origin-engine.js +250 -10
- package/dist/web/origin-engine_bg.wasm +0 -0
- package/dist/web/origin-engine_bg.wasm.d.ts +14 -2
- package/dist/web-publish/origin-engine-lanes.js +255 -34
- package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish/origin-engine.d.ts +39 -3
- package/dist/web-publish/origin-engine.js +253 -32
- package/dist/web-publish/origin-engine_bg.wasm +0 -0
- package/dist/web-publish/origin-engine_bg.wasm.d.ts +15 -3
- package/dist/web-publish-2d/origin-engine-lanes.js +253 -32
- package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine.d.ts +38 -2
- package/dist/web-publish-2d/origin-engine.js +250 -29
- package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +14 -2
- package/knowledge/README.md +2 -1
- package/knowledge/guides/three-to-og.md +393 -0
- package/knowledge/knowledge.json +2 -1
- package/knowledge/package.json +3 -2
- 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 +140 -21
- package/knowledge/skills/og-audio/SKILL.md +2 -2
- package/knowledge/skills/og-build/SKILL.md +22 -3
- package/knowledge/skills/og-core/SKILL.md +20 -5
- package/knowledge/skills/og-feel/SKILL.md +2 -2
- package/knowledge/skills/og-game/SKILL.md +481 -35
- package/knowledge/skills/og-i18n/SKILL.md +7 -7
- package/knowledge/skills/og-model/SKILL.md +374 -0
- package/knowledge/skills/og-platform-sdk/SKILL.md +1 -1
- package/knowledge/skills/og-ui/SKILL.md +15 -8
- package/knowledge/wiki/ai.md +20 -20
- package/knowledge/wiki/anim.md +63 -55
- package/knowledge/wiki/atmosphere.md +13 -13
- package/knowledge/wiki/audio.md +18 -18
- 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 +57 -3
- package/knowledge/wiki/input.md +47 -47
- package/knowledge/wiki/load.md +57 -57
- 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 +95 -95
- package/knowledge/wiki/platform.md +44 -44
- package/knowledge/wiki/probe.md +86 -86
- package/knowledge/wiki/reflect.md +16 -4
- package/knowledge/wiki/render.md +1168 -170
- package/knowledge/wiki/rng.md +14 -14
- package/knowledge/wiki/shapes.md +727 -0
- 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 +24 -20
- 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 +245 -269
- package/knowledge/wiki/video.md +5 -5
- package/knowledge/wiki/world.md +36 -36
- package/package.json +4 -4
- package/schema/api.schema.json +1834 -305
- package/shell/platform.ts +5 -0
- package/shell/player.ts +8 -2
- package/shell/transport.ts +6 -0
- package/src/generated/abi.ts +37 -1
- package/src/geom.ts +260 -0
- package/src/index.ts +8 -1
- package/src/node/playtest-run.ts +1 -0
- package/src/platform-local.ts +2 -0
- package/src/playtest.ts +8 -0
- package/src/runtime.ts +87 -6
- package/src/ui-kit/settings.ts +9 -0
- package/src/web/shell.ts +1 -1
- package/src/web/worker.ts +2 -2
- package/types/bindings.json +697 -402
- package/types/index.d.ts +1045 -127
package/schema/api.schema.json
CHANGED
|
@@ -1614,7 +1614,7 @@
|
|
|
1614
1614
|
},
|
|
1615
1615
|
{
|
|
1616
1616
|
"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
|
|
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()`, the factories of the API's handle types), 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
1618
|
"place": "top",
|
|
1619
1619
|
"publish": true,
|
|
1620
1620
|
"types": [
|
|
@@ -1629,7 +1629,8 @@
|
|
|
1629
1629
|
"Quaternion",
|
|
1630
1630
|
"Matrix4",
|
|
1631
1631
|
"Color",
|
|
1632
|
-
"str"
|
|
1632
|
+
"str",
|
|
1633
|
+
"list"
|
|
1633
1634
|
],
|
|
1634
1635
|
"consts": [],
|
|
1635
1636
|
"functions": [
|
|
@@ -2753,6 +2754,9 @@
|
|
|
2753
2754
|
"SpotLight",
|
|
2754
2755
|
"ToneMapping",
|
|
2755
2756
|
"ToneMapping",
|
|
2757
|
+
"GraphicsQuality",
|
|
2758
|
+
"QualityPreset",
|
|
2759
|
+
"QualityPreset",
|
|
2756
2760
|
"RenderSettings",
|
|
2757
2761
|
"Lut",
|
|
2758
2762
|
"EnvironmentMap",
|
|
@@ -2814,6 +2818,19 @@
|
|
|
2814
2818
|
"RingGeometryDesc",
|
|
2815
2819
|
"CircleGeometryDesc",
|
|
2816
2820
|
"TubeGeometryDesc",
|
|
2821
|
+
"ShapePoints",
|
|
2822
|
+
"ShapeGeometryDesc",
|
|
2823
|
+
"ExtrudeGeometryDesc",
|
|
2824
|
+
"LatheGeometryDesc",
|
|
2825
|
+
"PolyhedronGeometryDesc",
|
|
2826
|
+
"SolidGeometryDesc",
|
|
2827
|
+
"SweepKey",
|
|
2828
|
+
"SweepGeometryDesc",
|
|
2829
|
+
"MirrorAxis",
|
|
2830
|
+
"GeometryPart",
|
|
2831
|
+
"CsgOp",
|
|
2832
|
+
"CsgGeometryDesc",
|
|
2833
|
+
"MergeGeometriesDesc",
|
|
2817
2834
|
"LineMode",
|
|
2818
2835
|
"LineMode",
|
|
2819
2836
|
"LinesDesc",
|
|
@@ -3170,6 +3187,27 @@
|
|
|
3170
3187
|
"returnsDoc": "Refused for a look not loaded in this world, one in a streaming group that is not resident (the reason names it), or a resource the system did not declare.",
|
|
3171
3188
|
"publish": true
|
|
3172
3189
|
},
|
|
3190
|
+
{
|
|
3191
|
+
"name": "applyQuality",
|
|
3192
|
+
"doc": "Apply a graphics preset: write its row of RenderSettings' quality fields (the rest of RenderSettings keeps its values) and record it in RenderSettings.quality. The renderer reads those fields and nothing else, so what the probe and dump_world show of RenderSettings is what the next frame draws. The settings screen calls it when the player picks a preset (SettingsDesc.world); a game applies a saved preset itself at start. Inside a system, the system must declare RenderSettings among its writes. The rows:\n| Field | low | medium | high |\n|---|---|---|---|\n| rectShadows | false | true | true |\n| shadowedLights | 2 | 8 | 8 |\n| shadowMapScale | 0.5 | 1 | 2 |\n| volumetricFog | false | true | true |\n| softParticles | false | true | true |\n| screenSpaceReflections | false | true | true |\n| ambientOcclusion | false | true | true |\n| msaaSamples | 1 | 4 | 4 |\nMedium is every field's default, the frame drawn before any preset.",
|
|
3193
|
+
"params": [
|
|
3194
|
+
{
|
|
3195
|
+
"name": "world",
|
|
3196
|
+
"type": "World",
|
|
3197
|
+
"optional": false,
|
|
3198
|
+
"doc": "The world whose RenderSettings change."
|
|
3199
|
+
},
|
|
3200
|
+
{
|
|
3201
|
+
"name": "preset",
|
|
3202
|
+
"type": "GraphicsQuality",
|
|
3203
|
+
"optional": false,
|
|
3204
|
+
"doc": "The preset."
|
|
3205
|
+
}
|
|
3206
|
+
],
|
|
3207
|
+
"returns": "Result<Void>",
|
|
3208
|
+
"returnsDoc": "Refused for a world that is not alive, or inside a system that did not declare RenderSettings among its writes.",
|
|
3209
|
+
"publish": true
|
|
3210
|
+
},
|
|
3173
3211
|
{
|
|
3174
3212
|
"name": "look",
|
|
3175
3213
|
"doc": "The look last applied (by og.render.applyLook or GameDesc.look), as og.load.lookInfo describes it; null before any.",
|
|
@@ -3429,6 +3467,233 @@
|
|
|
3429
3467
|
"returnsDoc": "Refused for fewer than two points or a point that is not finite (without a path), or a path that is not alive.",
|
|
3430
3468
|
"publish": true
|
|
3431
3469
|
},
|
|
3470
|
+
{
|
|
3471
|
+
"name": "shapeGeometry",
|
|
3472
|
+
"doc": "Make a flat shape for og.Mesh (one-sided, as circleGeometry): an og.Shape with holes, or a points array. Physics can use it as a triangle-mesh Collider.mesh.",
|
|
3473
|
+
"params": [
|
|
3474
|
+
{
|
|
3475
|
+
"name": "world",
|
|
3476
|
+
"type": "World",
|
|
3477
|
+
"optional": false,
|
|
3478
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3479
|
+
},
|
|
3480
|
+
{
|
|
3481
|
+
"name": "desc",
|
|
3482
|
+
"type": "ShapeGeometryDesc",
|
|
3483
|
+
"optional": true,
|
|
3484
|
+
"doc": "The shapes and their tessellation."
|
|
3485
|
+
}
|
|
3486
|
+
],
|
|
3487
|
+
"returns": "Result<Geometry>",
|
|
3488
|
+
"returnsDoc": "Refused for a shape whose points are not finite or that triangulates to nothing.",
|
|
3489
|
+
"publish": true
|
|
3490
|
+
},
|
|
3491
|
+
{
|
|
3492
|
+
"name": "extrudeGeometry",
|
|
3493
|
+
"doc": "Make an extruded solid for og.Mesh: a three.js extrusion is a paste (`og.render.extrudeGeometry(world, { shapes: shape, depth: 0.2, bevelEnabled: true })`). Gears, signs, keys, logos, cookie cutters; along a path, a rail or a moulding.",
|
|
3494
|
+
"params": [
|
|
3495
|
+
{
|
|
3496
|
+
"name": "world",
|
|
3497
|
+
"type": "World",
|
|
3498
|
+
"optional": false,
|
|
3499
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3500
|
+
},
|
|
3501
|
+
{
|
|
3502
|
+
"name": "desc",
|
|
3503
|
+
"type": "ExtrudeGeometryDesc",
|
|
3504
|
+
"optional": true,
|
|
3505
|
+
"doc": "The shapes, depth, bevel and path."
|
|
3506
|
+
}
|
|
3507
|
+
],
|
|
3508
|
+
"returns": "Result<Geometry>",
|
|
3509
|
+
"returnsDoc": "Refused for a shape whose points are not finite or that triangulates to nothing, or an extrudePath that is not alive.",
|
|
3510
|
+
"publish": true
|
|
3511
|
+
},
|
|
3512
|
+
{
|
|
3513
|
+
"name": "latheGeometry",
|
|
3514
|
+
"doc": "Make a solid of revolution for og.Mesh: a profile turned round +Y.",
|
|
3515
|
+
"params": [
|
|
3516
|
+
{
|
|
3517
|
+
"name": "world",
|
|
3518
|
+
"type": "World",
|
|
3519
|
+
"optional": false,
|
|
3520
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3521
|
+
},
|
|
3522
|
+
{
|
|
3523
|
+
"name": "desc",
|
|
3524
|
+
"type": "LatheGeometryDesc",
|
|
3525
|
+
"optional": true,
|
|
3526
|
+
"doc": "The profile and the turn."
|
|
3527
|
+
}
|
|
3528
|
+
],
|
|
3529
|
+
"returns": "Result<Geometry>",
|
|
3530
|
+
"returnsDoc": "Refused for fewer than two points or one that is not finite.",
|
|
3531
|
+
"publish": true
|
|
3532
|
+
},
|
|
3533
|
+
{
|
|
3534
|
+
"name": "polyhedronGeometry",
|
|
3535
|
+
"doc": "Make a polyhedron from vertices and faces for og.Mesh, subdivided onto a sphere.",
|
|
3536
|
+
"params": [
|
|
3537
|
+
{
|
|
3538
|
+
"name": "world",
|
|
3539
|
+
"type": "World",
|
|
3540
|
+
"optional": false,
|
|
3541
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3542
|
+
},
|
|
3543
|
+
{
|
|
3544
|
+
"name": "desc",
|
|
3545
|
+
"type": "PolyhedronGeometryDesc",
|
|
3546
|
+
"optional": true,
|
|
3547
|
+
"doc": "The vertices, faces, radius and detail."
|
|
3548
|
+
}
|
|
3549
|
+
],
|
|
3550
|
+
"returns": "Result<Geometry>",
|
|
3551
|
+
"returnsDoc": "Refused for no faces, an index past the vertices, or a count that is not a multiple of three.",
|
|
3552
|
+
"publish": true
|
|
3553
|
+
},
|
|
3554
|
+
{
|
|
3555
|
+
"name": "icosahedronGeometry",
|
|
3556
|
+
"doc": "Make an icosahedron (twenty faces) for og.Mesh; with detail, a geodesic sphere.",
|
|
3557
|
+
"params": [
|
|
3558
|
+
{
|
|
3559
|
+
"name": "world",
|
|
3560
|
+
"type": "World",
|
|
3561
|
+
"optional": false,
|
|
3562
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3563
|
+
},
|
|
3564
|
+
{
|
|
3565
|
+
"name": "desc",
|
|
3566
|
+
"type": "SolidGeometryDesc",
|
|
3567
|
+
"optional": true,
|
|
3568
|
+
"doc": "Its radius and detail."
|
|
3569
|
+
}
|
|
3570
|
+
],
|
|
3571
|
+
"returns": "Result<Geometry>",
|
|
3572
|
+
"publish": true
|
|
3573
|
+
},
|
|
3574
|
+
{
|
|
3575
|
+
"name": "dodecahedronGeometry",
|
|
3576
|
+
"doc": "Make a dodecahedron (twelve pentagons, thirty-six triangles) for og.Mesh.",
|
|
3577
|
+
"params": [
|
|
3578
|
+
{
|
|
3579
|
+
"name": "world",
|
|
3580
|
+
"type": "World",
|
|
3581
|
+
"optional": false,
|
|
3582
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
"name": "desc",
|
|
3586
|
+
"type": "SolidGeometryDesc",
|
|
3587
|
+
"optional": true,
|
|
3588
|
+
"doc": "Its radius and detail."
|
|
3589
|
+
}
|
|
3590
|
+
],
|
|
3591
|
+
"returns": "Result<Geometry>",
|
|
3592
|
+
"publish": true
|
|
3593
|
+
},
|
|
3594
|
+
{
|
|
3595
|
+
"name": "octahedronGeometry",
|
|
3596
|
+
"doc": "Make an octahedron (eight faces) for og.Mesh.",
|
|
3597
|
+
"params": [
|
|
3598
|
+
{
|
|
3599
|
+
"name": "world",
|
|
3600
|
+
"type": "World",
|
|
3601
|
+
"optional": false,
|
|
3602
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3603
|
+
},
|
|
3604
|
+
{
|
|
3605
|
+
"name": "desc",
|
|
3606
|
+
"type": "SolidGeometryDesc",
|
|
3607
|
+
"optional": true,
|
|
3608
|
+
"doc": "Its radius and detail."
|
|
3609
|
+
}
|
|
3610
|
+
],
|
|
3611
|
+
"returns": "Result<Geometry>",
|
|
3612
|
+
"publish": true
|
|
3613
|
+
},
|
|
3614
|
+
{
|
|
3615
|
+
"name": "tetrahedronGeometry",
|
|
3616
|
+
"doc": "Make a tetrahedron (four faces) for og.Mesh.",
|
|
3617
|
+
"params": [
|
|
3618
|
+
{
|
|
3619
|
+
"name": "world",
|
|
3620
|
+
"type": "World",
|
|
3621
|
+
"optional": false,
|
|
3622
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3623
|
+
},
|
|
3624
|
+
{
|
|
3625
|
+
"name": "desc",
|
|
3626
|
+
"type": "SolidGeometryDesc",
|
|
3627
|
+
"optional": true,
|
|
3628
|
+
"doc": "Its radius and detail."
|
|
3629
|
+
}
|
|
3630
|
+
],
|
|
3631
|
+
"returns": "Result<Geometry>",
|
|
3632
|
+
"publish": true
|
|
3633
|
+
},
|
|
3634
|
+
{
|
|
3635
|
+
"name": "sweepGeometry",
|
|
3636
|
+
"doc": "Make a section swept along a path for og.Mesh, tapered and twisted by keys.",
|
|
3637
|
+
"params": [
|
|
3638
|
+
{
|
|
3639
|
+
"name": "world",
|
|
3640
|
+
"type": "World",
|
|
3641
|
+
"optional": false,
|
|
3642
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3643
|
+
},
|
|
3644
|
+
{
|
|
3645
|
+
"name": "desc",
|
|
3646
|
+
"type": "SweepGeometryDesc",
|
|
3647
|
+
"optional": true,
|
|
3648
|
+
"doc": "The section, path, keys and caps."
|
|
3649
|
+
}
|
|
3650
|
+
],
|
|
3651
|
+
"returns": "Result<Geometry>",
|
|
3652
|
+
"returnsDoc": "Refused for a path that is not alive, a section of fewer than three points or of no area, or a value that is not finite.",
|
|
3653
|
+
"publish": true
|
|
3654
|
+
},
|
|
3655
|
+
{
|
|
3656
|
+
"name": "csgGeometry",
|
|
3657
|
+
"doc": "Make the union, difference or intersection of two placed geometries for og.Mesh. Chain calls for more operands (a cube minus six spheres is six calls); each result is a geometry like any other.",
|
|
3658
|
+
"params": [
|
|
3659
|
+
{
|
|
3660
|
+
"name": "world",
|
|
3661
|
+
"type": "World",
|
|
3662
|
+
"optional": false,
|
|
3663
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3664
|
+
},
|
|
3665
|
+
{
|
|
3666
|
+
"name": "desc",
|
|
3667
|
+
"type": "CsgGeometryDesc",
|
|
3668
|
+
"optional": true,
|
|
3669
|
+
"doc": "The operation and its operands."
|
|
3670
|
+
}
|
|
3671
|
+
],
|
|
3672
|
+
"returns": "Result<Geometry>",
|
|
3673
|
+
"returnsDoc": "Refused for a dead geometry, a placement with a zero scale, or a position that is not finite.",
|
|
3674
|
+
"publish": true
|
|
3675
|
+
},
|
|
3676
|
+
{
|
|
3677
|
+
"name": "mergeGeometries",
|
|
3678
|
+
"doc": "Make one geometry of several placed ones for og.Mesh: one draw instead of many, mirrored halves, arrays.",
|
|
3679
|
+
"params": [
|
|
3680
|
+
{
|
|
3681
|
+
"name": "world",
|
|
3682
|
+
"type": "World",
|
|
3683
|
+
"optional": false,
|
|
3684
|
+
"doc": "The world whose renderer owns the geometry."
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
"name": "desc",
|
|
3688
|
+
"type": "MergeGeometriesDesc",
|
|
3689
|
+
"optional": true,
|
|
3690
|
+
"doc": "The parts and their placements."
|
|
3691
|
+
}
|
|
3692
|
+
],
|
|
3693
|
+
"returns": "Result<Geometry>",
|
|
3694
|
+
"returnsDoc": "Refused for no parts, a dead geometry, or a placement with a zero scale.",
|
|
3695
|
+
"publish": true
|
|
3696
|
+
},
|
|
3432
3697
|
{
|
|
3433
3698
|
"name": "lines",
|
|
3434
3699
|
"doc": "Draw lines this frame. Systems and commands may call it; the list is cleared at every tick, so submit them every tick they should show (og.Lines keeps a static set).",
|
|
@@ -3554,7 +3819,7 @@
|
|
|
3554
3819
|
},
|
|
3555
3820
|
{
|
|
3556
3821
|
"name": "postErrors",
|
|
3557
|
-
"doc": "The custom post passes PostEffects.
|
|
3822
|
+
"doc": "The custom post passes PostEffects.custom names that failed to compile on this device, each skipped (the frame draws as without it). The cook validates every pass for each back end, so this is a device's own refusal.",
|
|
3558
3823
|
"params": [
|
|
3559
3824
|
{
|
|
3560
3825
|
"name": "world",
|
|
@@ -3584,6 +3849,518 @@
|
|
|
3584
3849
|
"interfaces": [],
|
|
3585
3850
|
"callbacks": []
|
|
3586
3851
|
},
|
|
3852
|
+
{
|
|
3853
|
+
"name": "shapes",
|
|
3854
|
+
"doc": "Two-dimensional outlines in three.js's words: og.Shape and og.Path2 are three.js's Shape and Path, built by the same calls (moveTo, lineTo, quadraticCurveTo, bezierCurveTo, splineThru, arc, absarc, ellipse, absellipse, closePath) and flattened to points by getPoints, so a three.js outline is a paste. og.render.shapeGeometry, extrudeGeometry and sweepGeometry take them; only their points cross to the engine.\nThey are TypeScript values, not world state: make them in start or a command and let the geometry made from them be what the world keeps. Points come from basic arithmetic (no Math.sin), so they are the same on every host.\nA prop of these parts belongs in an asset: an `.ogt` of `type model` names each part's geometry by its og.render call (`extrudeGeometry { shape { absarc 0 0 1 0 6.283185307179586 false } depth 0.2 }`), its shapes as og.Shape's calls one a line with `hole { }` blocks, places parts as mergeGeometries does (`position`, `quaternion`, `scale`, `mirror`, or several `at { }` blocks: one mesh drawn instanced), gives each a `material` and hangs it from a named `pivot` (a node). og cook builds it into the model blob a glTF cooks to (levels of detail, raycast BVH, nodes), refuses it past project.ogt's triangle and vertex budgets, and og dev re-cooks it on an edit; og.load.gltf and a scene's `model` line take it as any model. The og-game skill §18 has a whole example.",
|
|
3855
|
+
"place": "root",
|
|
3856
|
+
"publish": true,
|
|
3857
|
+
"types": [],
|
|
3858
|
+
"consts": [],
|
|
3859
|
+
"values": [
|
|
3860
|
+
{
|
|
3861
|
+
"name": "Path2",
|
|
3862
|
+
"type": "Path2Class",
|
|
3863
|
+
"doc": "three.js's Path (named Path2 beside og.path's 3D paths): `new og.Path2().moveTo(0, 0).lineTo(1, 0)`."
|
|
3864
|
+
},
|
|
3865
|
+
{
|
|
3866
|
+
"name": "Shape",
|
|
3867
|
+
"type": "ShapeClass",
|
|
3868
|
+
"doc": "three.js's Shape: `const s = new og.Shape(); s.moveTo(0, 0).lineTo(1, 0).lineTo(0, 1); s.holes.push(hole)`."
|
|
3869
|
+
}
|
|
3870
|
+
],
|
|
3871
|
+
"functions": [],
|
|
3872
|
+
"interfaces": [
|
|
3873
|
+
{
|
|
3874
|
+
"name": "PathList",
|
|
3875
|
+
"doc": "A shape's holes, as three.js Shape.holes: an array; push a path to add a hole.",
|
|
3876
|
+
"members": [
|
|
3877
|
+
{
|
|
3878
|
+
"name": "length",
|
|
3879
|
+
"prop": "u32",
|
|
3880
|
+
"doc": "How many holes.",
|
|
3881
|
+
"publish": true
|
|
3882
|
+
},
|
|
3883
|
+
{
|
|
3884
|
+
"name": "push",
|
|
3885
|
+
"doc": "Add a hole (Array.push).",
|
|
3886
|
+
"params": [
|
|
3887
|
+
{
|
|
3888
|
+
"name": "path",
|
|
3889
|
+
"type": "Path2",
|
|
3890
|
+
"optional": false,
|
|
3891
|
+
"doc": "The hole's outline, either winding."
|
|
3892
|
+
}
|
|
3893
|
+
],
|
|
3894
|
+
"returns": "u32",
|
|
3895
|
+
"publish": true,
|
|
3896
|
+
"host": false
|
|
3897
|
+
}
|
|
3898
|
+
]
|
|
3899
|
+
},
|
|
3900
|
+
{
|
|
3901
|
+
"name": "Path2",
|
|
3902
|
+
"doc": "An outline of curves, as three.js Path: each call adds a curve from the current point (moveTo only moves it). Every method but getPoints returns the path, so calls chain.",
|
|
3903
|
+
"members": [
|
|
3904
|
+
{
|
|
3905
|
+
"name": "moveTo",
|
|
3906
|
+
"doc": "Move the current point without drawing, as three.js Path.moveTo.",
|
|
3907
|
+
"params": [
|
|
3908
|
+
{
|
|
3909
|
+
"name": "x",
|
|
3910
|
+
"type": "f32",
|
|
3911
|
+
"optional": false,
|
|
3912
|
+
"doc": "x."
|
|
3913
|
+
},
|
|
3914
|
+
{
|
|
3915
|
+
"name": "y",
|
|
3916
|
+
"type": "f32",
|
|
3917
|
+
"optional": false,
|
|
3918
|
+
"doc": "y."
|
|
3919
|
+
}
|
|
3920
|
+
],
|
|
3921
|
+
"returns": "This",
|
|
3922
|
+
"publish": true,
|
|
3923
|
+
"host": false
|
|
3924
|
+
},
|
|
3925
|
+
{
|
|
3926
|
+
"name": "lineTo",
|
|
3927
|
+
"doc": "A straight line to (x, y), as three.js Path.lineTo.",
|
|
3928
|
+
"params": [
|
|
3929
|
+
{
|
|
3930
|
+
"name": "x",
|
|
3931
|
+
"type": "f32",
|
|
3932
|
+
"optional": false,
|
|
3933
|
+
"doc": "x."
|
|
3934
|
+
},
|
|
3935
|
+
{
|
|
3936
|
+
"name": "y",
|
|
3937
|
+
"type": "f32",
|
|
3938
|
+
"optional": false,
|
|
3939
|
+
"doc": "y."
|
|
3940
|
+
}
|
|
3941
|
+
],
|
|
3942
|
+
"returns": "This",
|
|
3943
|
+
"publish": true,
|
|
3944
|
+
"host": false
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
"name": "quadraticCurveTo",
|
|
3948
|
+
"doc": "A quadratic Bézier curve through one control point to (x, y), as three.js Path.quadraticCurveTo.",
|
|
3949
|
+
"params": [
|
|
3950
|
+
{
|
|
3951
|
+
"name": "cpX",
|
|
3952
|
+
"type": "f32",
|
|
3953
|
+
"optional": false,
|
|
3954
|
+
"doc": "The control point's x."
|
|
3955
|
+
},
|
|
3956
|
+
{
|
|
3957
|
+
"name": "cpY",
|
|
3958
|
+
"type": "f32",
|
|
3959
|
+
"optional": false,
|
|
3960
|
+
"doc": "The control point's y."
|
|
3961
|
+
},
|
|
3962
|
+
{
|
|
3963
|
+
"name": "x",
|
|
3964
|
+
"type": "f32",
|
|
3965
|
+
"optional": false,
|
|
3966
|
+
"doc": "The end's x."
|
|
3967
|
+
},
|
|
3968
|
+
{
|
|
3969
|
+
"name": "y",
|
|
3970
|
+
"type": "f32",
|
|
3971
|
+
"optional": false,
|
|
3972
|
+
"doc": "The end's y."
|
|
3973
|
+
}
|
|
3974
|
+
],
|
|
3975
|
+
"returns": "This",
|
|
3976
|
+
"publish": true,
|
|
3977
|
+
"host": false
|
|
3978
|
+
},
|
|
3979
|
+
{
|
|
3980
|
+
"name": "bezierCurveTo",
|
|
3981
|
+
"doc": "A cubic Bézier curve through two control points to (x, y), as three.js Path.bezierCurveTo.",
|
|
3982
|
+
"params": [
|
|
3983
|
+
{
|
|
3984
|
+
"name": "cp1X",
|
|
3985
|
+
"type": "f32",
|
|
3986
|
+
"optional": false,
|
|
3987
|
+
"doc": "The first control point's x."
|
|
3988
|
+
},
|
|
3989
|
+
{
|
|
3990
|
+
"name": "cp1Y",
|
|
3991
|
+
"type": "f32",
|
|
3992
|
+
"optional": false,
|
|
3993
|
+
"doc": "The first control point's y."
|
|
3994
|
+
},
|
|
3995
|
+
{
|
|
3996
|
+
"name": "cp2X",
|
|
3997
|
+
"type": "f32",
|
|
3998
|
+
"optional": false,
|
|
3999
|
+
"doc": "The second control point's x."
|
|
4000
|
+
},
|
|
4001
|
+
{
|
|
4002
|
+
"name": "cp2Y",
|
|
4003
|
+
"type": "f32",
|
|
4004
|
+
"optional": false,
|
|
4005
|
+
"doc": "The second control point's y."
|
|
4006
|
+
},
|
|
4007
|
+
{
|
|
4008
|
+
"name": "x",
|
|
4009
|
+
"type": "f32",
|
|
4010
|
+
"optional": false,
|
|
4011
|
+
"doc": "The end's x."
|
|
4012
|
+
},
|
|
4013
|
+
{
|
|
4014
|
+
"name": "y",
|
|
4015
|
+
"type": "f32",
|
|
4016
|
+
"optional": false,
|
|
4017
|
+
"doc": "The end's y."
|
|
4018
|
+
}
|
|
4019
|
+
],
|
|
4020
|
+
"returns": "This",
|
|
4021
|
+
"publish": true,
|
|
4022
|
+
"host": false
|
|
4023
|
+
},
|
|
4024
|
+
{
|
|
4025
|
+
"name": "splineThru",
|
|
4026
|
+
"doc": "A Catmull-Rom spline from the current point through the points, as three.js Path.splineThru (a SplineCurve).",
|
|
4027
|
+
"params": [
|
|
4028
|
+
{
|
|
4029
|
+
"name": "points",
|
|
4030
|
+
"type": "List<Vector2>",
|
|
4031
|
+
"optional": false,
|
|
4032
|
+
"doc": "The points it passes through, in order."
|
|
4033
|
+
}
|
|
4034
|
+
],
|
|
4035
|
+
"returns": "This",
|
|
4036
|
+
"publish": true,
|
|
4037
|
+
"host": false
|
|
4038
|
+
},
|
|
4039
|
+
{
|
|
4040
|
+
"name": "arc",
|
|
4041
|
+
"doc": "A circular arc centred at (x, y) from the current point, as three.js Path.arc.",
|
|
4042
|
+
"params": [
|
|
4043
|
+
{
|
|
4044
|
+
"name": "x",
|
|
4045
|
+
"type": "f32",
|
|
4046
|
+
"optional": false,
|
|
4047
|
+
"doc": "The centre's x, from the current point."
|
|
4048
|
+
},
|
|
4049
|
+
{
|
|
4050
|
+
"name": "y",
|
|
4051
|
+
"type": "f32",
|
|
4052
|
+
"optional": false,
|
|
4053
|
+
"doc": "The centre's y, from the current point."
|
|
4054
|
+
},
|
|
4055
|
+
{
|
|
4056
|
+
"name": "radius",
|
|
4057
|
+
"type": "f32",
|
|
4058
|
+
"optional": false,
|
|
4059
|
+
"doc": "The radius."
|
|
4060
|
+
},
|
|
4061
|
+
{
|
|
4062
|
+
"name": "startAngle",
|
|
4063
|
+
"type": "f32",
|
|
4064
|
+
"optional": false,
|
|
4065
|
+
"doc": "Where it starts, from +x towards +y."
|
|
4066
|
+
},
|
|
4067
|
+
{
|
|
4068
|
+
"name": "endAngle",
|
|
4069
|
+
"type": "f32",
|
|
4070
|
+
"optional": false,
|
|
4071
|
+
"doc": "Where it ends."
|
|
4072
|
+
},
|
|
4073
|
+
{
|
|
4074
|
+
"name": "clockwise",
|
|
4075
|
+
"type": "bool",
|
|
4076
|
+
"optional": true,
|
|
4077
|
+
"default": false,
|
|
4078
|
+
"doc": "Go clockwise."
|
|
4079
|
+
}
|
|
4080
|
+
],
|
|
4081
|
+
"returns": "This",
|
|
4082
|
+
"publish": true,
|
|
4083
|
+
"host": false
|
|
4084
|
+
},
|
|
4085
|
+
{
|
|
4086
|
+
"name": "absarc",
|
|
4087
|
+
"doc": "A circular arc centred at (x, y), as three.js Path.absarc: a line joins it to the current point when they differ.",
|
|
4088
|
+
"params": [
|
|
4089
|
+
{
|
|
4090
|
+
"name": "x",
|
|
4091
|
+
"type": "f32",
|
|
4092
|
+
"optional": false,
|
|
4093
|
+
"doc": "The centre's x."
|
|
4094
|
+
},
|
|
4095
|
+
{
|
|
4096
|
+
"name": "y",
|
|
4097
|
+
"type": "f32",
|
|
4098
|
+
"optional": false,
|
|
4099
|
+
"doc": "The centre's y."
|
|
4100
|
+
},
|
|
4101
|
+
{
|
|
4102
|
+
"name": "radius",
|
|
4103
|
+
"type": "f32",
|
|
4104
|
+
"optional": false,
|
|
4105
|
+
"doc": "The radius."
|
|
4106
|
+
},
|
|
4107
|
+
{
|
|
4108
|
+
"name": "startAngle",
|
|
4109
|
+
"type": "f32",
|
|
4110
|
+
"optional": false,
|
|
4111
|
+
"doc": "Where it starts, from +x towards +y."
|
|
4112
|
+
},
|
|
4113
|
+
{
|
|
4114
|
+
"name": "endAngle",
|
|
4115
|
+
"type": "f32",
|
|
4116
|
+
"optional": false,
|
|
4117
|
+
"doc": "Where it ends."
|
|
4118
|
+
},
|
|
4119
|
+
{
|
|
4120
|
+
"name": "clockwise",
|
|
4121
|
+
"type": "bool",
|
|
4122
|
+
"optional": true,
|
|
4123
|
+
"default": false,
|
|
4124
|
+
"doc": "Go clockwise."
|
|
4125
|
+
}
|
|
4126
|
+
],
|
|
4127
|
+
"returns": "This",
|
|
4128
|
+
"publish": true,
|
|
4129
|
+
"host": false
|
|
4130
|
+
},
|
|
4131
|
+
{
|
|
4132
|
+
"name": "ellipse",
|
|
4133
|
+
"doc": "An elliptic arc centred at (x, y) from the current point, as three.js Path.ellipse.",
|
|
4134
|
+
"params": [
|
|
4135
|
+
{
|
|
4136
|
+
"name": "x",
|
|
4137
|
+
"type": "f32",
|
|
4138
|
+
"optional": false,
|
|
4139
|
+
"doc": "The centre's x, from the current point."
|
|
4140
|
+
},
|
|
4141
|
+
{
|
|
4142
|
+
"name": "y",
|
|
4143
|
+
"type": "f32",
|
|
4144
|
+
"optional": false,
|
|
4145
|
+
"doc": "The centre's y, from the current point."
|
|
4146
|
+
},
|
|
4147
|
+
{
|
|
4148
|
+
"name": "xRadius",
|
|
4149
|
+
"type": "f32",
|
|
4150
|
+
"optional": false,
|
|
4151
|
+
"doc": "The radius along x."
|
|
4152
|
+
},
|
|
4153
|
+
{
|
|
4154
|
+
"name": "yRadius",
|
|
4155
|
+
"type": "f32",
|
|
4156
|
+
"optional": false,
|
|
4157
|
+
"doc": "The radius along y."
|
|
4158
|
+
},
|
|
4159
|
+
{
|
|
4160
|
+
"name": "startAngle",
|
|
4161
|
+
"type": "f32",
|
|
4162
|
+
"optional": false,
|
|
4163
|
+
"doc": "Where it starts."
|
|
4164
|
+
},
|
|
4165
|
+
{
|
|
4166
|
+
"name": "endAngle",
|
|
4167
|
+
"type": "f32",
|
|
4168
|
+
"optional": false,
|
|
4169
|
+
"doc": "Where it ends."
|
|
4170
|
+
},
|
|
4171
|
+
{
|
|
4172
|
+
"name": "clockwise",
|
|
4173
|
+
"type": "bool",
|
|
4174
|
+
"optional": true,
|
|
4175
|
+
"default": false,
|
|
4176
|
+
"doc": "Go clockwise."
|
|
4177
|
+
},
|
|
4178
|
+
{
|
|
4179
|
+
"name": "rotation",
|
|
4180
|
+
"type": "f32",
|
|
4181
|
+
"optional": true,
|
|
4182
|
+
"default": 0,
|
|
4183
|
+
"doc": "The ellipse's turn round its centre."
|
|
4184
|
+
}
|
|
4185
|
+
],
|
|
4186
|
+
"returns": "This",
|
|
4187
|
+
"publish": true,
|
|
4188
|
+
"host": false
|
|
4189
|
+
},
|
|
4190
|
+
{
|
|
4191
|
+
"name": "absellipse",
|
|
4192
|
+
"doc": "An elliptic arc centred at (x, y), as three.js Path.absellipse.",
|
|
4193
|
+
"params": [
|
|
4194
|
+
{
|
|
4195
|
+
"name": "x",
|
|
4196
|
+
"type": "f32",
|
|
4197
|
+
"optional": false,
|
|
4198
|
+
"doc": "The centre's x."
|
|
4199
|
+
},
|
|
4200
|
+
{
|
|
4201
|
+
"name": "y",
|
|
4202
|
+
"type": "f32",
|
|
4203
|
+
"optional": false,
|
|
4204
|
+
"doc": "The centre's y."
|
|
4205
|
+
},
|
|
4206
|
+
{
|
|
4207
|
+
"name": "xRadius",
|
|
4208
|
+
"type": "f32",
|
|
4209
|
+
"optional": false,
|
|
4210
|
+
"doc": "The radius along x."
|
|
4211
|
+
},
|
|
4212
|
+
{
|
|
4213
|
+
"name": "yRadius",
|
|
4214
|
+
"type": "f32",
|
|
4215
|
+
"optional": false,
|
|
4216
|
+
"doc": "The radius along y."
|
|
4217
|
+
},
|
|
4218
|
+
{
|
|
4219
|
+
"name": "startAngle",
|
|
4220
|
+
"type": "f32",
|
|
4221
|
+
"optional": false,
|
|
4222
|
+
"doc": "Where it starts."
|
|
4223
|
+
},
|
|
4224
|
+
{
|
|
4225
|
+
"name": "endAngle",
|
|
4226
|
+
"type": "f32",
|
|
4227
|
+
"optional": false,
|
|
4228
|
+
"doc": "Where it ends."
|
|
4229
|
+
},
|
|
4230
|
+
{
|
|
4231
|
+
"name": "clockwise",
|
|
4232
|
+
"type": "bool",
|
|
4233
|
+
"optional": true,
|
|
4234
|
+
"default": false,
|
|
4235
|
+
"doc": "Go clockwise."
|
|
4236
|
+
},
|
|
4237
|
+
{
|
|
4238
|
+
"name": "rotation",
|
|
4239
|
+
"type": "f32",
|
|
4240
|
+
"optional": true,
|
|
4241
|
+
"default": 0,
|
|
4242
|
+
"doc": "The ellipse's turn round its centre."
|
|
4243
|
+
}
|
|
4244
|
+
],
|
|
4245
|
+
"returns": "This",
|
|
4246
|
+
"publish": true,
|
|
4247
|
+
"host": false
|
|
4248
|
+
},
|
|
4249
|
+
{
|
|
4250
|
+
"name": "setFromPoints",
|
|
4251
|
+
"doc": "Start at the first point and draw lines through the rest, as three.js Path.setFromPoints.",
|
|
4252
|
+
"params": [
|
|
4253
|
+
{
|
|
4254
|
+
"name": "points",
|
|
4255
|
+
"type": "List<Vector2>",
|
|
4256
|
+
"optional": false,
|
|
4257
|
+
"doc": "The points."
|
|
4258
|
+
}
|
|
4259
|
+
],
|
|
4260
|
+
"returns": "This",
|
|
4261
|
+
"publish": true,
|
|
4262
|
+
"host": false
|
|
4263
|
+
},
|
|
4264
|
+
{
|
|
4265
|
+
"name": "closePath",
|
|
4266
|
+
"doc": "A line back to the first point when the outline does not end there, as three.js CurvePath.closePath.",
|
|
4267
|
+
"params": [],
|
|
4268
|
+
"returns": "This",
|
|
4269
|
+
"publish": true,
|
|
4270
|
+
"host": false
|
|
4271
|
+
},
|
|
4272
|
+
{
|
|
4273
|
+
"name": "getPoints",
|
|
4274
|
+
"doc": "The outline as points, as three.js CurvePath.getPoints: each curve divided into `divisions` (an ellipse twice as many, a spline as many per point, a line one), repeated points dropped.",
|
|
4275
|
+
"params": [
|
|
4276
|
+
{
|
|
4277
|
+
"name": "divisions",
|
|
4278
|
+
"type": "u32",
|
|
4279
|
+
"optional": true,
|
|
4280
|
+
"default": 12,
|
|
4281
|
+
"doc": "Divisions per curve."
|
|
4282
|
+
}
|
|
4283
|
+
],
|
|
4284
|
+
"returns": "List<Vector2>",
|
|
4285
|
+
"publish": true,
|
|
4286
|
+
"host": false
|
|
4287
|
+
}
|
|
4288
|
+
]
|
|
4289
|
+
},
|
|
4290
|
+
{
|
|
4291
|
+
"name": "Shape",
|
|
4292
|
+
"doc": "An outline with holes, as three.js Shape.",
|
|
4293
|
+
"extends": "Path2",
|
|
4294
|
+
"members": [
|
|
4295
|
+
{
|
|
4296
|
+
"name": "holes",
|
|
4297
|
+
"prop": "PathList",
|
|
4298
|
+
"doc": "The holes: `shape.holes.push(hole)`.",
|
|
4299
|
+
"publish": true
|
|
4300
|
+
},
|
|
4301
|
+
{
|
|
4302
|
+
"name": "extractPoints",
|
|
4303
|
+
"doc": "The outline's and the holes' points, as three.js Shape.extractPoints.",
|
|
4304
|
+
"params": [
|
|
4305
|
+
{
|
|
4306
|
+
"name": "divisions",
|
|
4307
|
+
"type": "u32",
|
|
4308
|
+
"optional": true,
|
|
4309
|
+
"default": 12,
|
|
4310
|
+
"doc": "Divisions per curve."
|
|
4311
|
+
}
|
|
4312
|
+
],
|
|
4313
|
+
"returns": "ShapePoints",
|
|
4314
|
+
"publish": true,
|
|
4315
|
+
"host": false
|
|
4316
|
+
}
|
|
4317
|
+
]
|
|
4318
|
+
},
|
|
4319
|
+
{
|
|
4320
|
+
"name": "Path2Class",
|
|
4321
|
+
"doc": "og.Path2: `new og.Path2(points?)`.",
|
|
4322
|
+
"members": [
|
|
4323
|
+
{
|
|
4324
|
+
"name": "new",
|
|
4325
|
+
"doc": "A path, through the points when given (setFromPoints).",
|
|
4326
|
+
"params": [
|
|
4327
|
+
{
|
|
4328
|
+
"name": "points",
|
|
4329
|
+
"type": "Option<List<Vector2>>",
|
|
4330
|
+
"optional": true,
|
|
4331
|
+
"doc": "Points to start from."
|
|
4332
|
+
}
|
|
4333
|
+
],
|
|
4334
|
+
"returns": "Path2",
|
|
4335
|
+
"publish": true,
|
|
4336
|
+
"host": false
|
|
4337
|
+
}
|
|
4338
|
+
]
|
|
4339
|
+
},
|
|
4340
|
+
{
|
|
4341
|
+
"name": "ShapeClass",
|
|
4342
|
+
"doc": "og.Shape: `new og.Shape(points?)`.",
|
|
4343
|
+
"members": [
|
|
4344
|
+
{
|
|
4345
|
+
"name": "new",
|
|
4346
|
+
"doc": "A shape, through the points when given (setFromPoints).",
|
|
4347
|
+
"params": [
|
|
4348
|
+
{
|
|
4349
|
+
"name": "points",
|
|
4350
|
+
"type": "Option<List<Vector2>>",
|
|
4351
|
+
"optional": true,
|
|
4352
|
+
"doc": "Points to start from."
|
|
4353
|
+
}
|
|
4354
|
+
],
|
|
4355
|
+
"returns": "Shape",
|
|
4356
|
+
"publish": true,
|
|
4357
|
+
"host": false
|
|
4358
|
+
}
|
|
4359
|
+
]
|
|
4360
|
+
}
|
|
4361
|
+
],
|
|
4362
|
+
"callbacks": []
|
|
4363
|
+
},
|
|
3587
4364
|
{
|
|
3588
4365
|
"name": "load",
|
|
3589
4366
|
"doc": "Asset loading from cooked output: `og cook` turns assets/ into cooked/ (.ogb blobs and the manifest cooked/.cook.ogt), and the runtime reads only cooked/.\nPaths are asset ids: the path under assets/ (`models/ship.glb`, `scenes/main.ogt`); an `assets/` prefix is accepted. Every blob is checked against the manifest's type, schema version and cook stamp.\nThe game's bundle (`cooked`) is opened before the first tick and GameDesc.scene is spawned then. Loads from an open bundle complete at once on both hosts (the web host fetches the bundle's files before the engine starts); only og.load.bundle of another bundle can be pending, and it completes at a tick boundary.",
|
|
@@ -3670,7 +4447,7 @@
|
|
|
3670
4447
|
},
|
|
3671
4448
|
{
|
|
3672
4449
|
"name": "gltf",
|
|
3673
|
-
"doc": "Load a cooked glTF (.gltf or .glb), as three.js GLTFLoader.load: its meshes, materials and textures join the renderer once.\nA MagicaVoxel `.vox` cooks to a glTF and loads here too: greedy-meshed, flat-shaded, its palette as vertex colours, z-up turned y-up, each model about its centre (MagicaVoxel's pivot, with a scene graph or without). Its import settings (`models/hut.vox.ogt`, `type import`) size and place it: `model { voxScale 0.1 voxOrigin bottom }` is 0.1 m a voxel (default 1) and the lowest voxel on y = 0 (default `center`, the editor's origin). A `.vox` with frames (MagicaVoxel's animation) cooks to clips that swap the frames' models, played by og.AnimationPlayer as any skinned clip: `voxFps 8` (default 10) and `voxClip walk 0 3` (frames 0 to 3; default one clip `frames` of every frame).",
|
|
4450
|
+
"doc": "Load a cooked glTF (.gltf or .glb), as three.js GLTFLoader.load: its meshes, materials and textures join the renderer once.\nA MagicaVoxel `.vox` cooks to a glTF and loads here too: greedy-meshed, flat-shaded, its palette as vertex colours, z-up turned y-up, each model about its centre (MagicaVoxel's pivot, with a scene graph or without). Its import settings (`models/hut.vox.ogt`, `type import`) size and place it: `model { voxScale 0.1 voxOrigin bottom }` is 0.1 m a voxel (default 1) and the lowest voxel on y = 0 (default `center`, the editor's origin). A `.vox` with frames (MagicaVoxel's animation) cooks to clips that swap the frames' models, played by og.AnimationPlayer as any skinned clip: `voxFps 8` (default 10) and `voxClip walk 0 3` (frames 0 to 3; default one clip `frames` of the file's playback range, else of every frame); a node's `_loop` repeats its keys as the editor plays them.",
|
|
3674
4451
|
"params": [
|
|
3675
4452
|
{
|
|
3676
4453
|
"name": "world",
|
|
@@ -3862,7 +4639,7 @@
|
|
|
3862
4639
|
},
|
|
3863
4640
|
{
|
|
3864
4641
|
"name": "post",
|
|
3865
|
-
"doc": "A custom post pass for PostEffects.
|
|
4642
|
+
"doc": "A custom post pass for PostEffects.custom, from a cooked `.ogt` of `type post`: `code` or `source` (a `.wgsl` beside it) defining `fn post(f: PostInput, p: Params) -> vec4<f32>` and `param <name> float|vec2|vec3|vec4|color <default...>` lines (at most eight). The function reads previous(uv), scene_color(uv), depth(uv), normal(uv) and f.uv, f.pixel, f.size, f.time, and returns linear HDR colour (the og-game skill's Custom post passes section has the contract). The cook compiles it for every back end. Loaded once per path.",
|
|
3866
4643
|
"params": [
|
|
3867
4644
|
{
|
|
3868
4645
|
"name": "world",
|
|
@@ -6969,7 +7746,6 @@
|
|
|
6969
7746
|
"WipeSide",
|
|
6970
7747
|
"ScreenTransitionDesc",
|
|
6971
7748
|
"ScreenTransitionResult",
|
|
6972
|
-
"GraphicsQuality",
|
|
6973
7749
|
"MenuItem",
|
|
6974
7750
|
"MenuResult",
|
|
6975
7751
|
"MainMenuDesc",
|
|
@@ -9758,7 +10534,7 @@
|
|
|
9758
10534
|
},
|
|
9759
10535
|
{
|
|
9760
10536
|
"name": "terrain",
|
|
9761
|
-
"doc": "Terrain (phase 2): a height field over a rectangle, cooked by `og cook` from a `type terrain` .ogt (a 16-bit grey PNG or an EXR heightmap, an optional control map, up to four layered materials with slope and altitude rules, their maps separate textures or layers of two texture arrays: `layers` and `layerNormals` with each layer's `albedoLayer` and `normalLayer`, two sampled textures instead of up to eight) into tiles; drawn as a geometry clipmap around the camera (nested levels by distance, no cracks) that casts and receives shadows under the fog; collided with as a height field; baked into navmeshes by a navmesh file's `terrain` entry.\nLoad it with og.terrain.load, then place it: an og.Terrain on an entity draws it placed by the entity's world transform (centred on its position, turned and scaled with it), and an og.Collider of shape SHAPE_HEIGHTFIELD naming the TerrainInfo's geometry makes it solid. og.TerrainScatter grows grass, flowers or stones over a layer near the camera. og.terrain.sample answers the surface's height and normal anywhere (pass it the entity's position, quaternion and scale); og.terrain.edit raises, lowers, flattens, smooths or paints it at runtime, and og.terrain.setLayer retunes a layer. Edits are world state: a snapshot keeps them, the world hash covers them, and a restore brings the ground back as it was (rebuilt from the cook with the restored edits replayed, for the renderer, physics and sample alike).\nIts tiles stream (phase 3): the cook stores the field as a pyramid of tiles, each compressed on its own, and every frame the renderer keeps on the GPU only the tiles the camera's clipmap wants, within each terrain's tile budget (16 MiB by default), decoded off the frame (a worker thread natively, the browser's DecompressionStream on the Web) a few at a time, the most needed first; until a tile arrives its area draws from the coarser level that holds it, then fades in. Nothing a tick reads depends on which tiles are resident (collision and og.terrain.sample read the whole field), so a run's world hash is the same streamed or not. The probe's `terrain_stream:resident` decodes every wanted tile before each frame instead (`terrain_stream:stream[:<MiB>]` streams again, within that budget), and `dump_stream`'s `terrain` gives the tiles resident, waiting, decoding and cached.",
|
|
10537
|
+
"doc": "Terrain (phase 2): a height field over a rectangle, cooked by `og cook` from a `type terrain` .ogt (a 16-bit grey PNG or an EXR heightmap, an optional control map, up to four layered materials with slope and altitude rules, their maps separate textures or layers of two texture arrays: `layers` and `layerNormals` with each layer's `albedoLayer` and `normalLayer`, two sampled textures instead of up to eight) into tiles; drawn as a geometry clipmap around the camera (nested levels by distance, no cracks) that casts and receives shadows under the fog; collided with as a height field; baked into navmeshes by a navmesh file's `terrain` entry.\nLoad it with og.terrain.load, then place it: an og.Terrain on an entity draws it placed by the entity's world transform (centred on its position, turned and scaled with it), and an og.Collider of shape SHAPE_HEIGHTFIELD naming the TerrainInfo's geometry makes it solid. og.TerrainScatter grows grass, flowers or stones over a layer near the camera. og.terrain.sample answers the surface's height and normal anywhere (pass it the entity's position, quaternion and scale); og.terrain.edit raises, lowers, flattens, smooths or paints it at runtime, and og.terrain.setLayer retunes a layer. Terrain is 3D: the 2D profile's publish and lanes modules leave it out (RenderCapabilities.world3d is false), where every call here answers a refusal naming that field. Edits are world state: a snapshot keeps them, the world hash covers them, and a restore brings the ground back as it was (rebuilt from the cook with the restored edits replayed, for the renderer, physics and sample alike).\nIts tiles stream (phase 3): the cook stores the field as a pyramid of tiles, each compressed on its own, and every frame the renderer keeps on the GPU only the tiles the camera's clipmap wants, within each terrain's tile budget (16 MiB by default), decoded off the frame (a worker thread natively, the browser's DecompressionStream on the Web) a few at a time, the most needed first; until a tile arrives its area draws from the coarser level that holds it, then fades in. Nothing a tick reads depends on which tiles are resident (collision and og.terrain.sample read the whole field), so a run's world hash is the same streamed or not. The probe's `terrain_stream:resident` decodes every wanted tile before each frame instead (`terrain_stream:stream[:<MiB>]` streams again, within that budget), and `dump_stream`'s `terrain` gives the tiles resident, waiting, decoding and cached.",
|
|
9762
10538
|
"place": "namespace",
|
|
9763
10539
|
"publish": true,
|
|
9764
10540
|
"types": [
|
|
@@ -14521,10 +15297,44 @@
|
|
|
14521
15297
|
"none": "No curve: the exposed linear colour is clamped to 0..1, so 2D colours come out exactly as authored at exposure 1 (the same as toneMapped false)."
|
|
14522
15298
|
}
|
|
14523
15299
|
},
|
|
15300
|
+
"GraphicsQuality": {
|
|
15301
|
+
"x-og-kind": "enum",
|
|
15302
|
+
"x-og-module": "render",
|
|
15303
|
+
"description": "A graphics preset: a row of RenderSettings' quality fields that og.render.applyQuality writes (its doc has the table). The settings screen (og.ui.settingsScreen) offers the three.",
|
|
15304
|
+
"type": "string",
|
|
15305
|
+
"enum": [
|
|
15306
|
+
"medium",
|
|
15307
|
+
"low",
|
|
15308
|
+
"high"
|
|
15309
|
+
],
|
|
15310
|
+
"x-og-variants": {
|
|
15311
|
+
"medium": "The full frame: every quality field at its default.",
|
|
15312
|
+
"low": "The cheapest frame: no rect-light shadows, two shadowed lights, half-size shadow maps, plain fog, hard particles, no screen-space reflections or ambient occlusion, FXAA for MSAA.",
|
|
15313
|
+
"high": "The full frame with the shadow maps at twice their side."
|
|
15314
|
+
}
|
|
15315
|
+
},
|
|
15316
|
+
"QualityPreset": {
|
|
15317
|
+
"x-og-kind": "enum",
|
|
15318
|
+
"x-og-module": "render",
|
|
15319
|
+
"description": "The preset RenderSettings' quality fields were last written with (RenderSettings.quality).",
|
|
15320
|
+
"type": "string",
|
|
15321
|
+
"enum": [
|
|
15322
|
+
"none",
|
|
15323
|
+
"low",
|
|
15324
|
+
"medium",
|
|
15325
|
+
"high"
|
|
15326
|
+
],
|
|
15327
|
+
"x-og-variants": {
|
|
15328
|
+
"none": "No preset applied: the fields are their defaults or the game's own.",
|
|
15329
|
+
"low": "og.render.applyQuality(world, \"low\").",
|
|
15330
|
+
"medium": "og.render.applyQuality(world, \"medium\").",
|
|
15331
|
+
"high": "og.render.applyQuality(world, \"high\")."
|
|
15332
|
+
}
|
|
15333
|
+
},
|
|
14524
15334
|
"RenderSettings": {
|
|
14525
15335
|
"x-og-kind": "resource",
|
|
14526
15336
|
"x-og-module": "render",
|
|
14527
|
-
"description": "The frame's look after lighting: environment light, sky, bloom, exposure metering and tone mapping. Read after each tick; it never feeds back into the simulation. Camera.exposure is the manual exposure.",
|
|
15337
|
+
"description": "The frame's look after lighting: environment light, sky, bloom, exposure metering and tone mapping, and what the frame may cost: the quality fields (rectShadows to msaaSamples) that og.render.applyQuality sets from a graphics preset. Read after each tick; it never feeds back into the simulation. Camera.exposure is the manual exposure.",
|
|
14528
15338
|
"type": "object",
|
|
14529
15339
|
"properties": {
|
|
14530
15340
|
"environmentIntensity": {
|
|
@@ -14612,7 +15422,7 @@
|
|
|
14612
15422
|
},
|
|
14613
15423
|
"lodBias": {
|
|
14614
15424
|
"type": "number",
|
|
14615
|
-
"description": "A multiplier on every model's projected
|
|
15425
|
+
"description": "A multiplier on every model's projected level-of-detail error when its level is picked (og.Model.lodBias multiplies it again): a level is drawn while its error, measured by the cook against the full mesh, covers less than a pixel on the screen. 1 is the engine's choice, 2 keeps full meshes twice as far, 0.5 simplifies sooner; 0 draws every model at its full mesh.",
|
|
14616
15426
|
"default": 1,
|
|
14617
15427
|
"minimum": 0,
|
|
14618
15428
|
"maximum": 16,
|
|
@@ -14622,6 +15432,61 @@
|
|
|
14622
15432
|
"type": "boolean",
|
|
14623
15433
|
"description": "Draw the baked lighting of the scenes that have it (og bake lightmaps): static models with their lightmaps, everything else inside a LightVolume with its probes. False draws every scene as if unbaked, its ambient light from the sky or the environment map: to compare, or to see the realtime lights alone.",
|
|
14624
15434
|
"default": true
|
|
15435
|
+
},
|
|
15436
|
+
"quality": {
|
|
15437
|
+
"$ref": "#/$defs/QualityPreset",
|
|
15438
|
+
"description": "The graphics preset og.render.applyQuality last wrote into the quality fields below (rectShadows to msaaSamples), or none. A record for the settings screen and the probe: the renderer reads the fields, never this, so a field the game sets after the preset is drawn as set.",
|
|
15439
|
+
"default": "none"
|
|
15440
|
+
},
|
|
15441
|
+
"rectShadows": {
|
|
15442
|
+
"type": "boolean",
|
|
15443
|
+
"description": "Rect lights whose castShadow is on cast their soft shadows; false draws every rect light unshadowed, each keeping its castShadow for when this is on again. The low preset turns it off: a rect light's shadow is the costliest light in the frame.",
|
|
15444
|
+
"default": true
|
|
15445
|
+
},
|
|
15446
|
+
"shadowedLights": {
|
|
15447
|
+
"type": "integer",
|
|
15448
|
+
"minimum": 0,
|
|
15449
|
+
"maximum": 4294967295,
|
|
15450
|
+
"description": "At most this many point, spot and rect lights cast shadows in a frame, the brightest at the camera kept (RenderCapabilities.shadowedLights caps it); 0 casts none. The directional light's cascades are not counted.",
|
|
15451
|
+
"default": 8,
|
|
15452
|
+
"minimum": 0,
|
|
15453
|
+
"maximum": 8
|
|
15454
|
+
},
|
|
15455
|
+
"shadowMapScale": {
|
|
15456
|
+
"type": "number",
|
|
15457
|
+
"description": "The shadow maps at this fraction of their full side: the directional light's cascades (2048 texels by default) and the local lights' layers (512), each kept within 64 texels and the device's limit (4096 for the cascades). Changing it makes the maps again at the next frame; RenderCapabilities.shadowMapSize is the cascades' side drawn.",
|
|
15458
|
+
"default": 1,
|
|
15459
|
+
"minimum": 0.125,
|
|
15460
|
+
"maximum": 4
|
|
15461
|
+
},
|
|
15462
|
+
"volumetricFog": {
|
|
15463
|
+
"type": "boolean",
|
|
15464
|
+
"description": "An og.VolumetricFog is drawn lit, with its light shafts; false draws the same medium as plain distance and height fog.",
|
|
15465
|
+
"default": true
|
|
15466
|
+
},
|
|
15467
|
+
"softParticles": {
|
|
15468
|
+
"type": "boolean",
|
|
15469
|
+
"description": "Particles with a softDistance fade against the scene behind them; false draws them hard-edged and asks no depth prepass for them.",
|
|
15470
|
+
"default": true
|
|
15471
|
+
},
|
|
15472
|
+
"screenSpaceReflections": {
|
|
15473
|
+
"type": "boolean",
|
|
15474
|
+
"description": "PostEffects.ssr draws (on the full tier); false leaves smooth surfaces the reflection probes' and the environment's reflection. PostEffects keeps its settings either way.",
|
|
15475
|
+
"default": true
|
|
15476
|
+
},
|
|
15477
|
+
"ambientOcclusion": {
|
|
15478
|
+
"type": "boolean",
|
|
15479
|
+
"description": "PostEffects.ao darkens creases; false draws none. PostEffects keeps its settings either way.",
|
|
15480
|
+
"default": true
|
|
15481
|
+
},
|
|
15482
|
+
"msaaSamples": {
|
|
15483
|
+
"type": "integer",
|
|
15484
|
+
"minimum": 0,
|
|
15485
|
+
"maximum": 4294967295,
|
|
15486
|
+
"description": "Samples per pixel where the antialiasing multisamples (msaa, the WebGL2 tier's choice; RenderCapabilities.antialias): 4, or 1, which draws FXAA instead. TAA, FXAA and no antialiasing take one sample whatever it says. Changing it makes the multisampled targets and pipelines again at the next frame.",
|
|
15487
|
+
"default": 4,
|
|
15488
|
+
"minimum": 1,
|
|
15489
|
+
"maximum": 4
|
|
14625
15490
|
}
|
|
14626
15491
|
},
|
|
14627
15492
|
"additionalProperties": false
|
|
@@ -15107,45 +15972,14 @@
|
|
|
15107
15972
|
"maximum": 1,
|
|
15108
15973
|
"x-og-tunable": true
|
|
15109
15974
|
},
|
|
15110
|
-
"
|
|
15111
|
-
"
|
|
15112
|
-
"
|
|
15113
|
-
|
|
15114
|
-
|
|
15115
|
-
|
|
15116
|
-
"
|
|
15117
|
-
"
|
|
15118
|
-
"default": 0
|
|
15119
|
-
},
|
|
15120
|
-
"custom3": {
|
|
15121
|
-
"$ref": "#/$defs/Post",
|
|
15122
|
-
"description": "The third custom post pass.",
|
|
15123
|
-
"default": 0
|
|
15124
|
-
},
|
|
15125
|
-
"custom4": {
|
|
15126
|
-
"$ref": "#/$defs/Post",
|
|
15127
|
-
"description": "The fourth custom post pass.",
|
|
15128
|
-
"default": 0
|
|
15129
|
-
},
|
|
15130
|
-
"custom5": {
|
|
15131
|
-
"$ref": "#/$defs/Post",
|
|
15132
|
-
"description": "The fifth custom post pass.",
|
|
15133
|
-
"default": 0
|
|
15134
|
-
},
|
|
15135
|
-
"custom6": {
|
|
15136
|
-
"$ref": "#/$defs/Post",
|
|
15137
|
-
"description": "The sixth custom post pass.",
|
|
15138
|
-
"default": 0
|
|
15139
|
-
},
|
|
15140
|
-
"custom7": {
|
|
15141
|
-
"$ref": "#/$defs/Post",
|
|
15142
|
-
"description": "The seventh custom post pass.",
|
|
15143
|
-
"default": 0
|
|
15144
|
-
},
|
|
15145
|
-
"custom8": {
|
|
15146
|
-
"$ref": "#/$defs/Post",
|
|
15147
|
-
"description": "The eighth and last custom post pass, over every one before it.",
|
|
15148
|
-
"default": 0
|
|
15975
|
+
"custom": {
|
|
15976
|
+
"type": "array",
|
|
15977
|
+
"items": {
|
|
15978
|
+
"$ref": "#/$defs/Post"
|
|
15979
|
+
},
|
|
15980
|
+
"maxItems": 8,
|
|
15981
|
+
"description": "The custom post passes, in order (og.load.post, `type post` assets): at most RenderCapabilities.maxCustomPosts (8, og-render's MAX_CUSTOM_POSTS). Each runs over the one before it (the lit image for the first), after depth of field and motion blur and before exposure, bloom and the tone curve, and reads the lit image, depth and normals too (any pass turns the prepass on). Write the whole list: `post.custom = [grade, crt]`, `post.custom = []`; a look gives it on one line (`custom \"post/tint.ogt\" \"post/crt.ogt\"`). A 0 in it is skipped. Its parameters are set with og.render.setPostParam. A pass the device fails to compile is reported (og.render.postErrors) and skipped.",
|
|
15982
|
+
"default": []
|
|
15149
15983
|
}
|
|
15150
15984
|
},
|
|
15151
15985
|
"additionalProperties": false
|
|
@@ -17194,7 +18028,7 @@
|
|
|
17194
18028
|
"type": "integer",
|
|
17195
18029
|
"minimum": 0,
|
|
17196
18030
|
"maximum": 4294967295,
|
|
17197
|
-
"description": "The most custom post passes a frame runs: 8 on every tier, PostEffects.
|
|
18031
|
+
"description": "The most custom post passes a frame runs: 8 on every tier, PostEffects.custom's capacity."
|
|
17198
18032
|
},
|
|
17199
18033
|
"volumetricFog": {
|
|
17200
18034
|
"$ref": "#/$defs/VolumetricFog",
|
|
@@ -17214,7 +18048,17 @@
|
|
|
17214
18048
|
},
|
|
17215
18049
|
"gpuTimestamps": {
|
|
17216
18050
|
"type": "boolean",
|
|
17217
|
-
"description": "Whether the device times each render pass on the GPU (timestamp queries: Vulkan, Metal and D3D12 adapters that have them, WebGPU with `timestamp-query`; never WebGL2): ProbeTimings.gpuPasses and the trace's gpu thread are filled only where it is true."
|
|
18051
|
+
"description": "Whether the device times each render pass on the GPU (timestamp queries: Vulkan, Metal and D3D12 adapters that have them, WebGPU with `timestamp-query`; never WebGL2, and never in a publish build, which leaves the queries out): ProbeTimings.gpuPasses and the trace's gpu thread are filled only where it is true."
|
|
18052
|
+
},
|
|
18053
|
+
"spriteAnisotropy": {
|
|
18054
|
+
"type": "integer",
|
|
18055
|
+
"minimum": 0,
|
|
18056
|
+
"maximum": 4294967295,
|
|
18057
|
+
"description": "The anisotropic filtering of sprites and og.ui's images (text is not filtered anisotropically: its distance field would lose its edge): 16 where the device filters anisotropically (WebGPU, Vulkan, Metal, WebGL2 with EXT_texture_filter_anisotropic), 1 where it has none and on a software rasterizer (the vulkan-cpu tier: lavapipe's anisotropic filter softens even an image drawn 1:1), 0 without a renderer. Above 1, an image squeezed along one axis keeps the other axis's detail: a style's nine-slice middle squeezed into a short button keeps its outline as crisp as the corners. At 1 the squeezed piece reads a smaller mip level and blurs; og.ui bounds a middle's squeeze at twice its art, so the outline there is one mip level softer than the corners."
|
|
18058
|
+
},
|
|
18059
|
+
"world3d": {
|
|
18060
|
+
"type": "boolean",
|
|
18061
|
+
"description": "Whether the renderer draws the 3D world subsystems: terrain, planar water (og.Water), the 3D fluids, scattered copies and volumetric fog. False in the 2D profile's publish and lanes modules, which leave them out (a scene's are not drawn, og.terrain's calls and a SHAPE_HEIGHTFIELD collider answer a refusal naming this field, and `og build --publish` refuses a 2D project whose scenes hold og.Terrain, og.TerrainScatter, og.Water, og.WaterSurface or og.Fluid3D, by scene file and line); true in the 3D modules, the dev module and the native host."
|
|
17218
18062
|
}
|
|
17219
18063
|
},
|
|
17220
18064
|
"required": [
|
|
@@ -17235,7 +18079,9 @@
|
|
|
17235
18079
|
"volumetricFog",
|
|
17236
18080
|
"volumetricLights",
|
|
17237
18081
|
"maxLightCookies",
|
|
17238
|
-
"gpuTimestamps"
|
|
18082
|
+
"gpuTimestamps",
|
|
18083
|
+
"spriteAnisotropy",
|
|
18084
|
+
"world3d"
|
|
17239
18085
|
],
|
|
17240
18086
|
"additionalProperties": false
|
|
17241
18087
|
},
|
|
@@ -17431,149 +18277,718 @@
|
|
|
17431
18277
|
"type": "integer",
|
|
17432
18278
|
"minimum": 0,
|
|
17433
18279
|
"maximum": 4294967295,
|
|
17434
|
-
"description": "Vertices."
|
|
18280
|
+
"description": "Vertices."
|
|
18281
|
+
},
|
|
18282
|
+
"triangles": {
|
|
18283
|
+
"type": "integer",
|
|
18284
|
+
"minimum": 0,
|
|
18285
|
+
"maximum": 4294967295,
|
|
18286
|
+
"description": "Triangles."
|
|
18287
|
+
},
|
|
18288
|
+
"min": {
|
|
18289
|
+
"$ref": "#/$defs/Vector3",
|
|
18290
|
+
"description": "The bounds' least corner in the geometry's own space, as three.js boundingBox.min.",
|
|
18291
|
+
"x-og-unit": "m"
|
|
18292
|
+
},
|
|
18293
|
+
"max": {
|
|
18294
|
+
"$ref": "#/$defs/Vector3",
|
|
18295
|
+
"description": "The bounds' greatest corner.",
|
|
18296
|
+
"x-og-unit": "m"
|
|
18297
|
+
},
|
|
18298
|
+
"dynamic": {
|
|
18299
|
+
"type": "boolean",
|
|
18300
|
+
"description": "Whether og.render.updateGeometry may rewrite it."
|
|
18301
|
+
}
|
|
18302
|
+
},
|
|
18303
|
+
"required": [
|
|
18304
|
+
"vertices",
|
|
18305
|
+
"triangles",
|
|
18306
|
+
"min",
|
|
18307
|
+
"max",
|
|
18308
|
+
"dynamic"
|
|
18309
|
+
],
|
|
18310
|
+
"additionalProperties": false
|
|
18311
|
+
},
|
|
18312
|
+
"CylinderGeometryDesc": {
|
|
18313
|
+
"x-og-kind": "desc",
|
|
18314
|
+
"x-og-module": "render",
|
|
18315
|
+
"description": "A cylinder (or a truncated cone) along +Y centred at the origin, as three.js CylinderGeometry(radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength).",
|
|
18316
|
+
"type": "object",
|
|
18317
|
+
"properties": {
|
|
18318
|
+
"radiusTop": {
|
|
18319
|
+
"type": "number",
|
|
18320
|
+
"description": "The radius at the top.",
|
|
18321
|
+
"default": 1,
|
|
18322
|
+
"minimum": 0,
|
|
18323
|
+
"x-og-unit": "m"
|
|
18324
|
+
},
|
|
18325
|
+
"radiusBottom": {
|
|
18326
|
+
"type": "number",
|
|
18327
|
+
"description": "The radius at the bottom.",
|
|
18328
|
+
"default": 1,
|
|
18329
|
+
"minimum": 0,
|
|
18330
|
+
"x-og-unit": "m"
|
|
18331
|
+
},
|
|
18332
|
+
"height": {
|
|
18333
|
+
"type": "number",
|
|
18334
|
+
"description": "Its extent along y.",
|
|
18335
|
+
"default": 1,
|
|
18336
|
+
"minimum": 0,
|
|
18337
|
+
"x-og-unit": "m"
|
|
18338
|
+
},
|
|
18339
|
+
"radialSegments": {
|
|
18340
|
+
"type": "integer",
|
|
18341
|
+
"minimum": 0,
|
|
18342
|
+
"maximum": 4294967295,
|
|
18343
|
+
"description": "Segments around.",
|
|
18344
|
+
"default": 32,
|
|
18345
|
+
"minimum": 3
|
|
18346
|
+
},
|
|
18347
|
+
"heightSegments": {
|
|
18348
|
+
"type": "integer",
|
|
18349
|
+
"minimum": 0,
|
|
18350
|
+
"maximum": 4294967295,
|
|
18351
|
+
"description": "Rows along the height.",
|
|
18352
|
+
"default": 1,
|
|
18353
|
+
"minimum": 1
|
|
18354
|
+
},
|
|
18355
|
+
"openEnded": {
|
|
18356
|
+
"type": "boolean",
|
|
18357
|
+
"description": "Leave the ends open (no caps).",
|
|
18358
|
+
"default": false
|
|
18359
|
+
},
|
|
18360
|
+
"thetaStart": {
|
|
18361
|
+
"type": "number",
|
|
18362
|
+
"description": "Where the side starts around y, from +Z towards +X.",
|
|
18363
|
+
"default": 0,
|
|
18364
|
+
"x-og-unit": "rad"
|
|
18365
|
+
},
|
|
18366
|
+
"thetaLength": {
|
|
18367
|
+
"type": "number",
|
|
18368
|
+
"description": "How far around the side goes; 2 pi is whole.",
|
|
18369
|
+
"default": 6.283185307179586,
|
|
18370
|
+
"x-og-unit": "rad"
|
|
18371
|
+
}
|
|
18372
|
+
},
|
|
18373
|
+
"additionalProperties": false
|
|
18374
|
+
},
|
|
18375
|
+
"ConeGeometryDesc": {
|
|
18376
|
+
"x-og-kind": "desc",
|
|
18377
|
+
"x-og-module": "render",
|
|
18378
|
+
"description": "A cone along +Y centred at the origin, its tip up, as three.js ConeGeometry(radius, height, radialSegments, heightSegments, openEnded).",
|
|
18379
|
+
"type": "object",
|
|
18380
|
+
"properties": {
|
|
18381
|
+
"radius": {
|
|
18382
|
+
"type": "number",
|
|
18383
|
+
"description": "The base's radius.",
|
|
18384
|
+
"default": 1,
|
|
18385
|
+
"minimum": 0,
|
|
18386
|
+
"x-og-unit": "m"
|
|
18387
|
+
},
|
|
18388
|
+
"height": {
|
|
18389
|
+
"type": "number",
|
|
18390
|
+
"description": "Its extent along y.",
|
|
18391
|
+
"default": 1,
|
|
18392
|
+
"minimum": 0,
|
|
18393
|
+
"x-og-unit": "m"
|
|
18394
|
+
},
|
|
18395
|
+
"radialSegments": {
|
|
18396
|
+
"type": "integer",
|
|
18397
|
+
"minimum": 0,
|
|
18398
|
+
"maximum": 4294967295,
|
|
18399
|
+
"description": "Segments around.",
|
|
18400
|
+
"default": 32,
|
|
18401
|
+
"minimum": 3
|
|
18402
|
+
},
|
|
18403
|
+
"heightSegments": {
|
|
18404
|
+
"type": "integer",
|
|
18405
|
+
"minimum": 0,
|
|
18406
|
+
"maximum": 4294967295,
|
|
18407
|
+
"description": "Rows along the height.",
|
|
18408
|
+
"default": 1,
|
|
18409
|
+
"minimum": 1
|
|
18410
|
+
},
|
|
18411
|
+
"openEnded": {
|
|
18412
|
+
"type": "boolean",
|
|
18413
|
+
"description": "Leave the base open.",
|
|
18414
|
+
"default": false
|
|
18415
|
+
}
|
|
18416
|
+
},
|
|
18417
|
+
"additionalProperties": false
|
|
18418
|
+
},
|
|
18419
|
+
"CapsuleGeometryDesc": {
|
|
18420
|
+
"x-og-kind": "desc",
|
|
18421
|
+
"x-og-module": "render",
|
|
18422
|
+
"description": "A capsule along +Y centred at the origin, as three.js CapsuleGeometry(radius, height, capSegments, radialSegments, heightSegments): a cylinder of `height` between two hemispheres, `height + 2 radius` long in all (an og.Collider capsule of halfHeight height / 2 and that radius matches it).",
|
|
18423
|
+
"type": "object",
|
|
18424
|
+
"properties": {
|
|
18425
|
+
"radius": {
|
|
18426
|
+
"type": "number",
|
|
18427
|
+
"description": "The radius.",
|
|
18428
|
+
"default": 1,
|
|
18429
|
+
"minimum": 0,
|
|
18430
|
+
"x-og-unit": "m"
|
|
18431
|
+
},
|
|
18432
|
+
"height": {
|
|
18433
|
+
"type": "number",
|
|
18434
|
+
"description": "The straight middle's length.",
|
|
18435
|
+
"default": 1,
|
|
18436
|
+
"minimum": 0,
|
|
18437
|
+
"x-og-unit": "m"
|
|
18438
|
+
},
|
|
18439
|
+
"capSegments": {
|
|
18440
|
+
"type": "integer",
|
|
18441
|
+
"minimum": 0,
|
|
18442
|
+
"maximum": 4294967295,
|
|
18443
|
+
"description": "Rows in each hemisphere.",
|
|
18444
|
+
"default": 4,
|
|
18445
|
+
"minimum": 1
|
|
18446
|
+
},
|
|
18447
|
+
"radialSegments": {
|
|
18448
|
+
"type": "integer",
|
|
18449
|
+
"minimum": 0,
|
|
18450
|
+
"maximum": 4294967295,
|
|
18451
|
+
"description": "Segments around.",
|
|
18452
|
+
"default": 8,
|
|
18453
|
+
"minimum": 3
|
|
18454
|
+
},
|
|
18455
|
+
"heightSegments": {
|
|
18456
|
+
"type": "integer",
|
|
18457
|
+
"minimum": 0,
|
|
18458
|
+
"maximum": 4294967295,
|
|
18459
|
+
"description": "Rows along the middle.",
|
|
18460
|
+
"default": 1,
|
|
18461
|
+
"minimum": 1
|
|
18462
|
+
}
|
|
18463
|
+
},
|
|
18464
|
+
"additionalProperties": false
|
|
18465
|
+
},
|
|
18466
|
+
"TorusGeometryDesc": {
|
|
18467
|
+
"x-og-kind": "desc",
|
|
18468
|
+
"x-og-module": "render",
|
|
18469
|
+
"description": "A torus in the xy plane around +Z, as three.js TorusGeometry(radius, tube, radialSegments, tubularSegments, arc).",
|
|
18470
|
+
"type": "object",
|
|
18471
|
+
"properties": {
|
|
18472
|
+
"radius": {
|
|
18473
|
+
"type": "number",
|
|
18474
|
+
"description": "From the centre to the tube's centre.",
|
|
18475
|
+
"default": 1,
|
|
18476
|
+
"minimum": 0,
|
|
18477
|
+
"x-og-unit": "m"
|
|
18478
|
+
},
|
|
18479
|
+
"tube": {
|
|
18480
|
+
"type": "number",
|
|
18481
|
+
"description": "The tube's radius.",
|
|
18482
|
+
"default": 0.4,
|
|
18483
|
+
"minimum": 0,
|
|
18484
|
+
"x-og-unit": "m"
|
|
18485
|
+
},
|
|
18486
|
+
"radialSegments": {
|
|
18487
|
+
"type": "integer",
|
|
18488
|
+
"minimum": 0,
|
|
18489
|
+
"maximum": 4294967295,
|
|
18490
|
+
"description": "Segments around the tube.",
|
|
18491
|
+
"default": 12,
|
|
18492
|
+
"minimum": 2
|
|
18493
|
+
},
|
|
18494
|
+
"tubularSegments": {
|
|
18495
|
+
"type": "integer",
|
|
18496
|
+
"minimum": 0,
|
|
18497
|
+
"maximum": 4294967295,
|
|
18498
|
+
"description": "Segments around the ring.",
|
|
18499
|
+
"default": 48,
|
|
18500
|
+
"minimum": 3
|
|
18501
|
+
},
|
|
18502
|
+
"arc": {
|
|
18503
|
+
"type": "number",
|
|
18504
|
+
"description": "How far around the ring goes.",
|
|
18505
|
+
"default": 6.283185307179586,
|
|
18506
|
+
"x-og-unit": "rad"
|
|
18507
|
+
}
|
|
18508
|
+
},
|
|
18509
|
+
"additionalProperties": false
|
|
18510
|
+
},
|
|
18511
|
+
"RingGeometryDesc": {
|
|
18512
|
+
"x-og-kind": "desc",
|
|
18513
|
+
"x-og-module": "render",
|
|
18514
|
+
"description": "A flat ring in the xy plane facing +Z, as three.js RingGeometry(innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength).",
|
|
18515
|
+
"type": "object",
|
|
18516
|
+
"properties": {
|
|
18517
|
+
"innerRadius": {
|
|
18518
|
+
"type": "number",
|
|
18519
|
+
"description": "The hole's radius.",
|
|
18520
|
+
"default": 0.5,
|
|
18521
|
+
"minimum": 0,
|
|
18522
|
+
"x-og-unit": "m"
|
|
18523
|
+
},
|
|
18524
|
+
"outerRadius": {
|
|
18525
|
+
"type": "number",
|
|
18526
|
+
"description": "The ring's radius.",
|
|
18527
|
+
"default": 1,
|
|
18528
|
+
"minimum": 0,
|
|
18529
|
+
"x-og-unit": "m"
|
|
18530
|
+
},
|
|
18531
|
+
"thetaSegments": {
|
|
18532
|
+
"type": "integer",
|
|
18533
|
+
"minimum": 0,
|
|
18534
|
+
"maximum": 4294967295,
|
|
18535
|
+
"description": "Segments around.",
|
|
18536
|
+
"default": 32,
|
|
18537
|
+
"minimum": 3
|
|
18538
|
+
},
|
|
18539
|
+
"phiSegments": {
|
|
18540
|
+
"type": "integer",
|
|
18541
|
+
"minimum": 0,
|
|
18542
|
+
"maximum": 4294967295,
|
|
18543
|
+
"description": "Rings from the inside out.",
|
|
18544
|
+
"default": 1,
|
|
18545
|
+
"minimum": 1
|
|
18546
|
+
},
|
|
18547
|
+
"thetaStart": {
|
|
18548
|
+
"type": "number",
|
|
18549
|
+
"description": "Where it starts, from +X towards +Y.",
|
|
18550
|
+
"default": 0,
|
|
18551
|
+
"x-og-unit": "rad"
|
|
18552
|
+
},
|
|
18553
|
+
"thetaLength": {
|
|
18554
|
+
"type": "number",
|
|
18555
|
+
"description": "How far around it goes.",
|
|
18556
|
+
"default": 6.283185307179586,
|
|
18557
|
+
"x-og-unit": "rad"
|
|
18558
|
+
}
|
|
18559
|
+
},
|
|
18560
|
+
"additionalProperties": false
|
|
18561
|
+
},
|
|
18562
|
+
"CircleGeometryDesc": {
|
|
18563
|
+
"x-og-kind": "desc",
|
|
18564
|
+
"x-og-module": "render",
|
|
18565
|
+
"description": "A disc (or a sector) in the xy plane facing +Z, as three.js CircleGeometry(radius, segments, thetaStart, thetaLength): a 2D polygon's simplest shape.",
|
|
18566
|
+
"type": "object",
|
|
18567
|
+
"properties": {
|
|
18568
|
+
"radius": {
|
|
18569
|
+
"type": "number",
|
|
18570
|
+
"description": "The radius.",
|
|
18571
|
+
"default": 1,
|
|
18572
|
+
"minimum": 0,
|
|
18573
|
+
"x-og-unit": "m"
|
|
18574
|
+
},
|
|
18575
|
+
"segments": {
|
|
18576
|
+
"type": "integer",
|
|
18577
|
+
"minimum": 0,
|
|
18578
|
+
"maximum": 4294967295,
|
|
18579
|
+
"description": "Segments around.",
|
|
18580
|
+
"default": 32,
|
|
18581
|
+
"minimum": 3
|
|
18582
|
+
},
|
|
18583
|
+
"thetaStart": {
|
|
18584
|
+
"type": "number",
|
|
18585
|
+
"description": "Where it starts, from +X towards +Y.",
|
|
18586
|
+
"default": 0,
|
|
18587
|
+
"x-og-unit": "rad"
|
|
18588
|
+
},
|
|
18589
|
+
"thetaLength": {
|
|
18590
|
+
"type": "number",
|
|
18591
|
+
"description": "How far around it goes.",
|
|
18592
|
+
"default": 6.283185307179586,
|
|
18593
|
+
"x-og-unit": "rad"
|
|
18594
|
+
}
|
|
18595
|
+
},
|
|
18596
|
+
"additionalProperties": false
|
|
18597
|
+
},
|
|
18598
|
+
"TubeGeometryDesc": {
|
|
18599
|
+
"x-og-kind": "desc",
|
|
18600
|
+
"x-og-module": "render",
|
|
18601
|
+
"description": "A tube along a curve, as three.js TubeGeometry(curve, tubularSegments, radius, radialSegments, closed): its rings are evenly spaced along the curve's length (three.js getPointAt), u runs along it, v around. The curve is `path` when set (an og.path, whatever its kind, followed exactly: a scene's or a timeline's path becomes a tube), otherwise new CatmullRomCurve3(points, closed, 'centripetal') through `points`, which may come from anywhere: a rope's points, a spline a tool made.",
|
|
18602
|
+
"type": "object",
|
|
18603
|
+
"properties": {
|
|
18604
|
+
"points": {
|
|
18605
|
+
"type": "array",
|
|
18606
|
+
"items": {
|
|
18607
|
+
"$ref": "#/$defs/Vector3"
|
|
18608
|
+
},
|
|
18609
|
+
"description": "The points the curve passes through, in order (at least two), when `path` is 0.",
|
|
18610
|
+
"default": [],
|
|
18611
|
+
"x-og-unit": "m"
|
|
18612
|
+
},
|
|
18613
|
+
"path": {
|
|
18614
|
+
"$ref": "#/$defs/Path",
|
|
18615
|
+
"description": "A path (og.path.create, or a scene's `path` by og.path.find) the tube follows instead of the points: its own curve, kind and closed flag (`closed` is the path's then). 0 uses the points.",
|
|
18616
|
+
"default": 0
|
|
18617
|
+
},
|
|
18618
|
+
"tubularSegments": {
|
|
18619
|
+
"type": "integer",
|
|
18620
|
+
"minimum": 0,
|
|
18621
|
+
"maximum": 4294967295,
|
|
18622
|
+
"description": "Segments along the tube.",
|
|
18623
|
+
"default": 64,
|
|
18624
|
+
"minimum": 1
|
|
18625
|
+
},
|
|
18626
|
+
"radius": {
|
|
18627
|
+
"type": "number",
|
|
18628
|
+
"description": "The tube's radius.",
|
|
18629
|
+
"default": 1,
|
|
18630
|
+
"minimum": 0,
|
|
18631
|
+
"x-og-unit": "m"
|
|
18632
|
+
},
|
|
18633
|
+
"radialSegments": {
|
|
18634
|
+
"type": "integer",
|
|
18635
|
+
"minimum": 0,
|
|
18636
|
+
"maximum": 4294967295,
|
|
18637
|
+
"description": "Segments around it.",
|
|
18638
|
+
"default": 8,
|
|
18639
|
+
"minimum": 3
|
|
18640
|
+
},
|
|
18641
|
+
"closed": {
|
|
18642
|
+
"type": "boolean",
|
|
18643
|
+
"description": "Join the last point back to the first.",
|
|
18644
|
+
"default": false
|
|
18645
|
+
}
|
|
18646
|
+
},
|
|
18647
|
+
"additionalProperties": false
|
|
18648
|
+
},
|
|
18649
|
+
"ShapePoints": {
|
|
18650
|
+
"x-og-kind": "struct",
|
|
18651
|
+
"x-og-module": "render",
|
|
18652
|
+
"description": "A shape as points, what og.Shape.extractPoints returns and what shapeGeometry, extrudeGeometry and sweepGeometry read: the outline, then each hole. A repeated closing point is dropped, as three.js drops it.",
|
|
18653
|
+
"type": "object",
|
|
18654
|
+
"properties": {
|
|
18655
|
+
"shape": {
|
|
18656
|
+
"type": "array",
|
|
18657
|
+
"items": {
|
|
18658
|
+
"$ref": "#/$defs/Vector2"
|
|
18659
|
+
},
|
|
18660
|
+
"description": "The outline's points, in order."
|
|
18661
|
+
},
|
|
18662
|
+
"holes": {
|
|
18663
|
+
"type": "array",
|
|
18664
|
+
"items": {
|
|
18665
|
+
"type": "array",
|
|
18666
|
+
"items": {
|
|
18667
|
+
"$ref": "#/$defs/Vector2"
|
|
18668
|
+
}
|
|
18669
|
+
},
|
|
18670
|
+
"description": "Each hole's points, in order."
|
|
18671
|
+
}
|
|
18672
|
+
},
|
|
18673
|
+
"required": [
|
|
18674
|
+
"shape",
|
|
18675
|
+
"holes"
|
|
18676
|
+
],
|
|
18677
|
+
"additionalProperties": false
|
|
18678
|
+
},
|
|
18679
|
+
"ShapeGeometryDesc": {
|
|
18680
|
+
"x-og-kind": "desc",
|
|
18681
|
+
"x-og-module": "render",
|
|
18682
|
+
"description": "A flat shape with holes in the xy plane facing +Z, as three.js ShapeGeometry(shapes, curveSegments): triangulated by earcut (three.js's own port), the outline made clockwise and the holes counter-clockwise first, so its vertices and triangles are three.js's for the same shape. uvs are world x and y (v flipped to run down the image).",
|
|
18683
|
+
"type": "object",
|
|
18684
|
+
"properties": {
|
|
18685
|
+
"shapes": {
|
|
18686
|
+
"anyOf": [
|
|
18687
|
+
{
|
|
18688
|
+
"anyOf": [
|
|
18689
|
+
{
|
|
18690
|
+
"x-og-type": "Path2"
|
|
18691
|
+
},
|
|
18692
|
+
{
|
|
18693
|
+
"anyOf": [
|
|
18694
|
+
{
|
|
18695
|
+
"type": "array",
|
|
18696
|
+
"items": {
|
|
18697
|
+
"x-og-type": "Path2"
|
|
18698
|
+
}
|
|
18699
|
+
},
|
|
18700
|
+
{
|
|
18701
|
+
"type": "array",
|
|
18702
|
+
"items": {
|
|
18703
|
+
"$ref": "#/$defs/Vector2"
|
|
18704
|
+
}
|
|
18705
|
+
}
|
|
18706
|
+
]
|
|
18707
|
+
}
|
|
18708
|
+
]
|
|
18709
|
+
},
|
|
18710
|
+
{
|
|
18711
|
+
"type": "null"
|
|
18712
|
+
}
|
|
18713
|
+
],
|
|
18714
|
+
"description": "One og.Shape (an og.Path2 is a shape without holes), a list of them, or the outline's points. Without it, three.js's default triangle (0, 0.5), (-0.5, -0.5), (0.5, -0.5).",
|
|
18715
|
+
"default": null
|
|
18716
|
+
},
|
|
18717
|
+
"curveSegments": {
|
|
18718
|
+
"type": "integer",
|
|
18719
|
+
"minimum": 0,
|
|
18720
|
+
"maximum": 4294967295,
|
|
18721
|
+
"description": "Points per curve when an og.Shape's curves are flattened (three.js extractPoints(curveSegments); an ellipse takes twice as many, a spline as many per point).",
|
|
18722
|
+
"default": 12,
|
|
18723
|
+
"minimum": 1
|
|
18724
|
+
},
|
|
18725
|
+
"uvRepeat": {
|
|
18726
|
+
"$ref": "#/$defs/Vector2",
|
|
18727
|
+
"description": "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping).",
|
|
18728
|
+
"default": {
|
|
18729
|
+
"x": 1,
|
|
18730
|
+
"y": 1
|
|
18731
|
+
}
|
|
18732
|
+
},
|
|
18733
|
+
"physics": {
|
|
18734
|
+
"type": "boolean",
|
|
18735
|
+
"description": "Register it as a physics mesh too (BufferGeometryDesc.physics).",
|
|
18736
|
+
"default": true
|
|
18737
|
+
},
|
|
18738
|
+
"dynamic": {
|
|
18739
|
+
"type": "boolean",
|
|
18740
|
+
"description": "Whether og.render.updateGeometry may rewrite it later (BufferGeometryDesc.dynamic).",
|
|
18741
|
+
"default": false
|
|
18742
|
+
}
|
|
18743
|
+
},
|
|
18744
|
+
"additionalProperties": false
|
|
18745
|
+
},
|
|
18746
|
+
"ExtrudeGeometryDesc": {
|
|
18747
|
+
"x-og-kind": "desc",
|
|
18748
|
+
"x-og-module": "render",
|
|
18749
|
+
"description": "Shapes pushed along +Z, or along a path, as three.js ExtrudeGeometry(shapes, options) with its option names and defaults: a closed solid, its lids from earcut and its walls ring by ring, rounded by a bevel of bevelSegments rings at each face. Unindexed as three.js's (every triangle its own vertices, flat normals), three.js's vertex order and counts; uvs from three.js's WorldUVGenerator (v flipped to run down the image).",
|
|
18750
|
+
"type": "object",
|
|
18751
|
+
"properties": {
|
|
18752
|
+
"shapes": {
|
|
18753
|
+
"anyOf": [
|
|
18754
|
+
{
|
|
18755
|
+
"anyOf": [
|
|
18756
|
+
{
|
|
18757
|
+
"x-og-type": "Path2"
|
|
18758
|
+
},
|
|
18759
|
+
{
|
|
18760
|
+
"anyOf": [
|
|
18761
|
+
{
|
|
18762
|
+
"type": "array",
|
|
18763
|
+
"items": {
|
|
18764
|
+
"x-og-type": "Path2"
|
|
18765
|
+
}
|
|
18766
|
+
},
|
|
18767
|
+
{
|
|
18768
|
+
"type": "array",
|
|
18769
|
+
"items": {
|
|
18770
|
+
"$ref": "#/$defs/Vector2"
|
|
18771
|
+
}
|
|
18772
|
+
}
|
|
18773
|
+
]
|
|
18774
|
+
}
|
|
18775
|
+
]
|
|
18776
|
+
},
|
|
18777
|
+
{
|
|
18778
|
+
"type": "null"
|
|
18779
|
+
}
|
|
18780
|
+
],
|
|
18781
|
+
"description": "One og.Shape, a list of them, or the outline's points. Without it, three.js's default square of side 1.",
|
|
18782
|
+
"default": null
|
|
18783
|
+
},
|
|
18784
|
+
"depth": {
|
|
18785
|
+
"type": "number",
|
|
18786
|
+
"description": "How far the shape is pushed along +Z (without extrudePath).",
|
|
18787
|
+
"default": 1,
|
|
18788
|
+
"minimum": 0,
|
|
18789
|
+
"x-og-unit": "m"
|
|
18790
|
+
},
|
|
18791
|
+
"steps": {
|
|
18792
|
+
"type": "integer",
|
|
18793
|
+
"minimum": 0,
|
|
18794
|
+
"maximum": 4294967295,
|
|
18795
|
+
"description": "Rings along the depth or the path.",
|
|
18796
|
+
"default": 1,
|
|
18797
|
+
"minimum": 1
|
|
18798
|
+
},
|
|
18799
|
+
"bevelEnabled": {
|
|
18800
|
+
"type": "boolean",
|
|
18801
|
+
"description": "Round the edges of both faces.",
|
|
18802
|
+
"default": true
|
|
18803
|
+
},
|
|
18804
|
+
"bevelThickness": {
|
|
18805
|
+
"type": "number",
|
|
18806
|
+
"description": "How far the bevel reaches beyond each face, along z.",
|
|
18807
|
+
"default": 0.2,
|
|
18808
|
+
"minimum": 0,
|
|
18809
|
+
"x-og-unit": "m"
|
|
18810
|
+
},
|
|
18811
|
+
"bevelSize": {
|
|
18812
|
+
"anyOf": [
|
|
18813
|
+
{
|
|
18814
|
+
"type": "number"
|
|
18815
|
+
},
|
|
18816
|
+
{
|
|
18817
|
+
"type": "null"
|
|
18818
|
+
}
|
|
18819
|
+
],
|
|
18820
|
+
"description": "How far the bevel reaches out from the outline. Null or unset, bevelThickness - 0.1, as three.js derives it (0.1 at the default thickness, 0 at a thickness of 0.1).",
|
|
18821
|
+
"default": null,
|
|
18822
|
+
"x-og-unit": "m"
|
|
18823
|
+
},
|
|
18824
|
+
"bevelOffset": {
|
|
18825
|
+
"type": "number",
|
|
18826
|
+
"description": "How far the bevel starts out from the outline.",
|
|
18827
|
+
"default": 0,
|
|
18828
|
+
"x-og-unit": "m"
|
|
18829
|
+
},
|
|
18830
|
+
"bevelSegments": {
|
|
18831
|
+
"type": "integer",
|
|
18832
|
+
"minimum": 0,
|
|
18833
|
+
"maximum": 4294967295,
|
|
18834
|
+
"description": "Rings in each bevel.",
|
|
18835
|
+
"default": 3,
|
|
18836
|
+
"minimum": 1
|
|
17435
18837
|
},
|
|
17436
|
-
"
|
|
18838
|
+
"curveSegments": {
|
|
17437
18839
|
"type": "integer",
|
|
17438
18840
|
"minimum": 0,
|
|
17439
18841
|
"maximum": 4294967295,
|
|
17440
|
-
"description": "
|
|
18842
|
+
"description": "Points per curve when an og.Shape's curves are flattened.",
|
|
18843
|
+
"default": 12,
|
|
18844
|
+
"minimum": 1
|
|
17441
18845
|
},
|
|
17442
|
-
"
|
|
17443
|
-
"$ref": "#/$defs/
|
|
17444
|
-
"description": "
|
|
17445
|
-
"
|
|
18846
|
+
"extrudePath": {
|
|
18847
|
+
"$ref": "#/$defs/Path",
|
|
18848
|
+
"description": "A path (og.path.create or og.path.find) to extrude along instead of +Z: the shape's x along the path's normal and y along its binormal (three.js's Frenet frames), steps rings evenly spaced along it. A path turns the bevel off, as three.js. 0 extrudes along +Z.",
|
|
18849
|
+
"default": 0
|
|
17446
18850
|
},
|
|
17447
|
-
"
|
|
17448
|
-
"$ref": "#/$defs/
|
|
17449
|
-
"description": "
|
|
17450
|
-
"
|
|
18851
|
+
"uvRepeat": {
|
|
18852
|
+
"$ref": "#/$defs/Vector2",
|
|
18853
|
+
"description": "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping).",
|
|
18854
|
+
"default": {
|
|
18855
|
+
"x": 1,
|
|
18856
|
+
"y": 1
|
|
18857
|
+
}
|
|
18858
|
+
},
|
|
18859
|
+
"physics": {
|
|
18860
|
+
"type": "boolean",
|
|
18861
|
+
"description": "Register it as a physics mesh too.",
|
|
18862
|
+
"default": true
|
|
17451
18863
|
},
|
|
17452
18864
|
"dynamic": {
|
|
17453
18865
|
"type": "boolean",
|
|
17454
|
-
"description": "Whether og.render.updateGeometry may rewrite it."
|
|
18866
|
+
"description": "Whether og.render.updateGeometry may rewrite it later.",
|
|
18867
|
+
"default": false
|
|
17455
18868
|
}
|
|
17456
18869
|
},
|
|
17457
|
-
"required": [
|
|
17458
|
-
"vertices",
|
|
17459
|
-
"triangles",
|
|
17460
|
-
"min",
|
|
17461
|
-
"max",
|
|
17462
|
-
"dynamic"
|
|
17463
|
-
],
|
|
17464
18870
|
"additionalProperties": false
|
|
17465
18871
|
},
|
|
17466
|
-
"
|
|
18872
|
+
"LatheGeometryDesc": {
|
|
17467
18873
|
"x-og-kind": "desc",
|
|
17468
18874
|
"x-og-module": "render",
|
|
17469
|
-
"description": "A
|
|
18875
|
+
"description": "A profile turned round +Y, as three.js LatheGeometry(points, segments, phiStart, phiLength): vases, bottles, columns, wheels. three.js's vertices, indices and smooth normals; u round the axis, v along the profile (flipped to run down the image). A whole turn's seam meets exactly.",
|
|
17470
18876
|
"type": "object",
|
|
17471
18877
|
"properties": {
|
|
17472
|
-
"
|
|
17473
|
-
"type": "
|
|
17474
|
-
"
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
"
|
|
17478
|
-
|
|
17479
|
-
"radiusBottom": {
|
|
17480
|
-
"type": "number",
|
|
17481
|
-
"description": "The radius at the bottom.",
|
|
17482
|
-
"default": 1,
|
|
17483
|
-
"minimum": 0,
|
|
17484
|
-
"x-og-unit": "m"
|
|
17485
|
-
},
|
|
17486
|
-
"height": {
|
|
17487
|
-
"type": "number",
|
|
17488
|
-
"description": "Its extent along y.",
|
|
17489
|
-
"default": 1,
|
|
17490
|
-
"minimum": 0,
|
|
18878
|
+
"points": {
|
|
18879
|
+
"type": "array",
|
|
18880
|
+
"items": {
|
|
18881
|
+
"$ref": "#/$defs/Vector2"
|
|
18882
|
+
},
|
|
18883
|
+
"description": "The profile, x the distance from the axis and y the height, in order (at least two). Without it, three.js's default (0, -0.5), (0.5, 0), (0, 0.5).",
|
|
18884
|
+
"default": [],
|
|
17491
18885
|
"x-og-unit": "m"
|
|
17492
18886
|
},
|
|
17493
|
-
"
|
|
17494
|
-
"type": "integer",
|
|
17495
|
-
"minimum": 0,
|
|
17496
|
-
"maximum": 4294967295,
|
|
17497
|
-
"description": "Segments around.",
|
|
17498
|
-
"default": 32,
|
|
17499
|
-
"minimum": 3
|
|
17500
|
-
},
|
|
17501
|
-
"heightSegments": {
|
|
18887
|
+
"segments": {
|
|
17502
18888
|
"type": "integer",
|
|
17503
18889
|
"minimum": 0,
|
|
17504
18890
|
"maximum": 4294967295,
|
|
17505
|
-
"description": "
|
|
17506
|
-
"default":
|
|
18891
|
+
"description": "Segments round the axis.",
|
|
18892
|
+
"default": 12,
|
|
17507
18893
|
"minimum": 1
|
|
17508
18894
|
},
|
|
17509
|
-
"
|
|
17510
|
-
"type": "boolean",
|
|
17511
|
-
"description": "Leave the ends open (no caps).",
|
|
17512
|
-
"default": false
|
|
17513
|
-
},
|
|
17514
|
-
"thetaStart": {
|
|
18895
|
+
"phiStart": {
|
|
17515
18896
|
"type": "number",
|
|
17516
|
-
"description": "Where the
|
|
18897
|
+
"description": "Where the turn starts, from +Z towards +X.",
|
|
17517
18898
|
"default": 0,
|
|
17518
18899
|
"x-og-unit": "rad"
|
|
17519
18900
|
},
|
|
17520
|
-
"
|
|
18901
|
+
"phiLength": {
|
|
17521
18902
|
"type": "number",
|
|
17522
|
-
"description": "How far
|
|
18903
|
+
"description": "How far it turns; 2 pi is whole (clamped to it).",
|
|
17523
18904
|
"default": 6.283185307179586,
|
|
17524
18905
|
"x-og-unit": "rad"
|
|
18906
|
+
},
|
|
18907
|
+
"uvRepeat": {
|
|
18908
|
+
"$ref": "#/$defs/Vector2",
|
|
18909
|
+
"description": "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping).",
|
|
18910
|
+
"default": {
|
|
18911
|
+
"x": 1,
|
|
18912
|
+
"y": 1
|
|
18913
|
+
}
|
|
18914
|
+
},
|
|
18915
|
+
"physics": {
|
|
18916
|
+
"type": "boolean",
|
|
18917
|
+
"description": "Register it as a physics mesh too.",
|
|
18918
|
+
"default": true
|
|
18919
|
+
},
|
|
18920
|
+
"dynamic": {
|
|
18921
|
+
"type": "boolean",
|
|
18922
|
+
"description": "Whether og.render.updateGeometry may rewrite it later.",
|
|
18923
|
+
"default": false
|
|
17525
18924
|
}
|
|
17526
18925
|
},
|
|
17527
18926
|
"additionalProperties": false
|
|
17528
18927
|
},
|
|
17529
|
-
"
|
|
18928
|
+
"PolyhedronGeometryDesc": {
|
|
17530
18929
|
"x-og-kind": "desc",
|
|
17531
18930
|
"x-og-module": "render",
|
|
17532
|
-
"description": "A
|
|
18931
|
+
"description": "A polyhedron from vertices and faces, every face subdivided `detail` times and every vertex pushed onto the sphere of `radius`, as three.js PolyhedronGeometry(vertices, indices, radius, detail): unindexed, flat normals at detail 0 and the sphere's above, three.js's spherical uvs.",
|
|
17533
18932
|
"type": "object",
|
|
17534
18933
|
"properties": {
|
|
17535
|
-
"
|
|
17536
|
-
"type": "
|
|
17537
|
-
"
|
|
17538
|
-
|
|
17539
|
-
|
|
17540
|
-
"
|
|
18934
|
+
"vertices": {
|
|
18935
|
+
"type": "array",
|
|
18936
|
+
"items": {
|
|
18937
|
+
"type": "number"
|
|
18938
|
+
},
|
|
18939
|
+
"description": "The corners, x y z each (three.js's flat array).",
|
|
18940
|
+
"default": []
|
|
17541
18941
|
},
|
|
17542
|
-
"
|
|
18942
|
+
"indices": {
|
|
18943
|
+
"type": "array",
|
|
18944
|
+
"items": {
|
|
18945
|
+
"type": "integer",
|
|
18946
|
+
"minimum": 0,
|
|
18947
|
+
"maximum": 4294967295
|
|
18948
|
+
},
|
|
18949
|
+
"description": "The faces, three corner indices each, counter-clockwise seen from outside.",
|
|
18950
|
+
"default": []
|
|
18951
|
+
},
|
|
18952
|
+
"radius": {
|
|
17543
18953
|
"type": "number",
|
|
17544
|
-
"description": "
|
|
18954
|
+
"description": "The sphere the vertices are pushed onto.",
|
|
17545
18955
|
"default": 1,
|
|
17546
18956
|
"minimum": 0,
|
|
17547
18957
|
"x-og-unit": "m"
|
|
17548
18958
|
},
|
|
17549
|
-
"
|
|
18959
|
+
"detail": {
|
|
17550
18960
|
"type": "integer",
|
|
17551
18961
|
"minimum": 0,
|
|
17552
18962
|
"maximum": 4294967295,
|
|
17553
|
-
"description": "
|
|
17554
|
-
"default":
|
|
17555
|
-
"
|
|
18963
|
+
"description": "Subdivisions of each face: (detail + 1)² triangles a face.",
|
|
18964
|
+
"default": 0,
|
|
18965
|
+
"maximum": 64
|
|
17556
18966
|
},
|
|
17557
|
-
"
|
|
17558
|
-
"
|
|
17559
|
-
"
|
|
17560
|
-
"
|
|
17561
|
-
|
|
17562
|
-
|
|
17563
|
-
|
|
18967
|
+
"uvRepeat": {
|
|
18968
|
+
"$ref": "#/$defs/Vector2",
|
|
18969
|
+
"description": "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping).",
|
|
18970
|
+
"default": {
|
|
18971
|
+
"x": 1,
|
|
18972
|
+
"y": 1
|
|
18973
|
+
}
|
|
17564
18974
|
},
|
|
17565
|
-
"
|
|
18975
|
+
"physics": {
|
|
17566
18976
|
"type": "boolean",
|
|
17567
|
-
"description": "
|
|
18977
|
+
"description": "Register it as a physics mesh too.",
|
|
18978
|
+
"default": true
|
|
18979
|
+
},
|
|
18980
|
+
"dynamic": {
|
|
18981
|
+
"type": "boolean",
|
|
18982
|
+
"description": "Whether og.render.updateGeometry may rewrite it later.",
|
|
17568
18983
|
"default": false
|
|
17569
18984
|
}
|
|
17570
18985
|
},
|
|
17571
18986
|
"additionalProperties": false
|
|
17572
18987
|
},
|
|
17573
|
-
"
|
|
18988
|
+
"SolidGeometryDesc": {
|
|
17574
18989
|
"x-og-kind": "desc",
|
|
17575
18990
|
"x-og-module": "render",
|
|
17576
|
-
"description": "A
|
|
18991
|
+
"description": "A regular solid, as three.js IcosahedronGeometry, DodecahedronGeometry, OctahedronGeometry and TetrahedronGeometry(radius, detail): PolyhedronGeometryDesc with the solid's own vertices and faces. An icosahedron at detail 2 or more is a sphere with even triangles.",
|
|
17577
18992
|
"type": "object",
|
|
17578
18993
|
"properties": {
|
|
17579
18994
|
"radius": {
|
|
@@ -17583,218 +18998,302 @@
|
|
|
17583
18998
|
"minimum": 0,
|
|
17584
18999
|
"x-og-unit": "m"
|
|
17585
19000
|
},
|
|
17586
|
-
"
|
|
17587
|
-
"type": "number",
|
|
17588
|
-
"description": "The straight middle's length.",
|
|
17589
|
-
"default": 1,
|
|
17590
|
-
"minimum": 0,
|
|
17591
|
-
"x-og-unit": "m"
|
|
17592
|
-
},
|
|
17593
|
-
"capSegments": {
|
|
19001
|
+
"detail": {
|
|
17594
19002
|
"type": "integer",
|
|
17595
19003
|
"minimum": 0,
|
|
17596
19004
|
"maximum": 4294967295,
|
|
17597
|
-
"description": "
|
|
17598
|
-
"default":
|
|
17599
|
-
"
|
|
19005
|
+
"description": "Subdivisions of each face.",
|
|
19006
|
+
"default": 0,
|
|
19007
|
+
"maximum": 64
|
|
17600
19008
|
},
|
|
17601
|
-
"
|
|
17602
|
-
"
|
|
17603
|
-
"
|
|
17604
|
-
"
|
|
17605
|
-
|
|
17606
|
-
|
|
17607
|
-
|
|
19009
|
+
"uvRepeat": {
|
|
19010
|
+
"$ref": "#/$defs/Vector2",
|
|
19011
|
+
"description": "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping).",
|
|
19012
|
+
"default": {
|
|
19013
|
+
"x": 1,
|
|
19014
|
+
"y": 1
|
|
19015
|
+
}
|
|
17608
19016
|
},
|
|
17609
|
-
"
|
|
17610
|
-
"type": "
|
|
17611
|
-
"
|
|
17612
|
-
"
|
|
17613
|
-
|
|
17614
|
-
|
|
17615
|
-
"
|
|
19017
|
+
"physics": {
|
|
19018
|
+
"type": "boolean",
|
|
19019
|
+
"description": "Register it as a physics mesh too.",
|
|
19020
|
+
"default": true
|
|
19021
|
+
},
|
|
19022
|
+
"dynamic": {
|
|
19023
|
+
"type": "boolean",
|
|
19024
|
+
"description": "Whether og.render.updateGeometry may rewrite it later.",
|
|
19025
|
+
"default": false
|
|
17616
19026
|
}
|
|
17617
19027
|
},
|
|
17618
19028
|
"additionalProperties": false
|
|
17619
19029
|
},
|
|
17620
|
-
"
|
|
17621
|
-
"x-og-kind": "
|
|
19030
|
+
"SweepKey": {
|
|
19031
|
+
"x-og-kind": "struct",
|
|
17622
19032
|
"x-og-module": "render",
|
|
17623
|
-
"description": "A
|
|
19033
|
+
"description": "A value at a fraction of a sweep's path: linear between keys, held before the first and past the last.",
|
|
17624
19034
|
"type": "object",
|
|
17625
19035
|
"properties": {
|
|
17626
|
-
"
|
|
19036
|
+
"t": {
|
|
17627
19037
|
"type": "number",
|
|
17628
|
-
"description": "
|
|
17629
|
-
"
|
|
17630
|
-
"minimum": 0,
|
|
17631
|
-
"x-og-unit": "m"
|
|
19038
|
+
"description": "The fraction of the path's length, 0 to 1.",
|
|
19039
|
+
"x-og-unit": "ratio"
|
|
17632
19040
|
},
|
|
17633
|
-
"
|
|
19041
|
+
"value": {
|
|
17634
19042
|
"type": "number",
|
|
17635
|
-
"description": "The
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
|
|
19043
|
+
"description": "The value there."
|
|
19044
|
+
}
|
|
19045
|
+
},
|
|
19046
|
+
"required": [
|
|
19047
|
+
"t",
|
|
19048
|
+
"value"
|
|
19049
|
+
],
|
|
19050
|
+
"additionalProperties": false
|
|
19051
|
+
},
|
|
19052
|
+
"SweepGeometryDesc": {
|
|
19053
|
+
"x-og-kind": "desc",
|
|
19054
|
+
"x-og-module": "render",
|
|
19055
|
+
"description": "A section swept along a path, scaled and twisted over it: horns, tusks, handles, blades, tapered pipes, twisted columns (img2threejs's tapered sweep; three.js has no class for it). The section's x lies along the path's normal and y along its binormal (three.js's Frenet frames), rings evenly spaced along the path's length; u runs along the path, v round the section (flipped to run down the image), the sides smooth. An open path's ends are capped.",
|
|
19056
|
+
"type": "object",
|
|
19057
|
+
"properties": {
|
|
19058
|
+
"section": {
|
|
19059
|
+
"anyOf": [
|
|
19060
|
+
{
|
|
19061
|
+
"anyOf": [
|
|
19062
|
+
{
|
|
19063
|
+
"x-og-type": "Path2"
|
|
19064
|
+
},
|
|
19065
|
+
{
|
|
19066
|
+
"type": "array",
|
|
19067
|
+
"items": {
|
|
19068
|
+
"$ref": "#/$defs/Vector2"
|
|
19069
|
+
}
|
|
19070
|
+
}
|
|
19071
|
+
]
|
|
19072
|
+
},
|
|
19073
|
+
{
|
|
19074
|
+
"type": "null"
|
|
19075
|
+
}
|
|
19076
|
+
],
|
|
19077
|
+
"description": "The section's outline: an og.Shape or og.Path2 (flattened by curveSegments; holes are not swept) or its points, at least three, either winding.",
|
|
19078
|
+
"default": null
|
|
17639
19079
|
},
|
|
17640
|
-
"
|
|
19080
|
+
"path": {
|
|
19081
|
+
"$ref": "#/$defs/Path",
|
|
19082
|
+
"description": "The path (og.path.create or og.path.find).",
|
|
19083
|
+
"default": 0
|
|
19084
|
+
},
|
|
19085
|
+
"steps": {
|
|
17641
19086
|
"type": "integer",
|
|
17642
19087
|
"minimum": 0,
|
|
17643
19088
|
"maximum": 4294967295,
|
|
17644
|
-
"description": "
|
|
17645
|
-
"default":
|
|
17646
|
-
"minimum":
|
|
19089
|
+
"description": "Rings along the path, less one.",
|
|
19090
|
+
"default": 64,
|
|
19091
|
+
"minimum": 1
|
|
17647
19092
|
},
|
|
17648
|
-
"
|
|
19093
|
+
"scale": {
|
|
19094
|
+
"type": "array",
|
|
19095
|
+
"items": {
|
|
19096
|
+
"$ref": "#/$defs/SweepKey"
|
|
19097
|
+
},
|
|
19098
|
+
"description": "The section's scale over the path (none: 1 throughout). A horn: [{ t: 0, value: 1 }, { t: 1, value: 0.05 }].",
|
|
19099
|
+
"default": []
|
|
19100
|
+
},
|
|
19101
|
+
"twist": {
|
|
19102
|
+
"type": "array",
|
|
19103
|
+
"items": {
|
|
19104
|
+
"$ref": "#/$defs/SweepKey"
|
|
19105
|
+
},
|
|
19106
|
+
"description": "The section's turn round the path over its length, in radians (none: 0).",
|
|
19107
|
+
"default": []
|
|
19108
|
+
},
|
|
19109
|
+
"caps": {
|
|
19110
|
+
"type": "boolean",
|
|
19111
|
+
"description": "Close the ends of an open path.",
|
|
19112
|
+
"default": true
|
|
19113
|
+
},
|
|
19114
|
+
"curveSegments": {
|
|
17649
19115
|
"type": "integer",
|
|
17650
19116
|
"minimum": 0,
|
|
17651
19117
|
"maximum": 4294967295,
|
|
17652
|
-
"description": "
|
|
17653
|
-
"default":
|
|
17654
|
-
"minimum":
|
|
19118
|
+
"description": "Points per curve when an og.Shape section is flattened.",
|
|
19119
|
+
"default": 12,
|
|
19120
|
+
"minimum": 1
|
|
17655
19121
|
},
|
|
17656
|
-
"
|
|
17657
|
-
"
|
|
17658
|
-
"description": "How
|
|
17659
|
-
"default":
|
|
17660
|
-
|
|
19122
|
+
"uvRepeat": {
|
|
19123
|
+
"$ref": "#/$defs/Vector2",
|
|
19124
|
+
"description": "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping).",
|
|
19125
|
+
"default": {
|
|
19126
|
+
"x": 1,
|
|
19127
|
+
"y": 1
|
|
19128
|
+
}
|
|
19129
|
+
},
|
|
19130
|
+
"physics": {
|
|
19131
|
+
"type": "boolean",
|
|
19132
|
+
"description": "Register it as a physics mesh too.",
|
|
19133
|
+
"default": true
|
|
19134
|
+
},
|
|
19135
|
+
"dynamic": {
|
|
19136
|
+
"type": "boolean",
|
|
19137
|
+
"description": "Whether og.render.updateGeometry may rewrite it later.",
|
|
19138
|
+
"default": false
|
|
17661
19139
|
}
|
|
17662
19140
|
},
|
|
17663
19141
|
"additionalProperties": false
|
|
17664
19142
|
},
|
|
17665
|
-
"
|
|
19143
|
+
"MirrorAxis": {
|
|
19144
|
+
"x-og-kind": "enum",
|
|
19145
|
+
"x-og-module": "render",
|
|
19146
|
+
"description": "The world axis a part is mirrored along, after its placement.",
|
|
19147
|
+
"type": "string",
|
|
19148
|
+
"enum": [
|
|
19149
|
+
"none",
|
|
19150
|
+
"x",
|
|
19151
|
+
"y",
|
|
19152
|
+
"z"
|
|
19153
|
+
],
|
|
19154
|
+
"x-og-variants": {
|
|
19155
|
+
"none": "Not mirrored.",
|
|
19156
|
+
"x": "x negated: the mirror image across the yz plane.",
|
|
19157
|
+
"y": "y negated: across the xz plane.",
|
|
19158
|
+
"z": "z negated: across the xy plane."
|
|
19159
|
+
}
|
|
19160
|
+
},
|
|
19161
|
+
"GeometryPart": {
|
|
17666
19162
|
"x-og-kind": "desc",
|
|
17667
19163
|
"x-og-module": "render",
|
|
17668
|
-
"description": "A
|
|
19164
|
+
"description": "A geometry placed as an Object3D is (scale, then rotate, then move), then mirrored: one part of og.render.mergeGeometries or an operand of og.render.csgGeometry.",
|
|
17669
19165
|
"type": "object",
|
|
17670
19166
|
"properties": {
|
|
17671
|
-
"
|
|
17672
|
-
"
|
|
17673
|
-
"description": "
|
|
17674
|
-
"default": 0
|
|
17675
|
-
"minimum": 0,
|
|
17676
|
-
"x-og-unit": "m"
|
|
19167
|
+
"geometry": {
|
|
19168
|
+
"$ref": "#/$defs/Geometry",
|
|
19169
|
+
"description": "Any geometry: made, a primitive or a loaded glTF's.",
|
|
19170
|
+
"default": 0
|
|
17677
19171
|
},
|
|
17678
|
-
"
|
|
17679
|
-
"
|
|
17680
|
-
"description": "
|
|
17681
|
-
"default":
|
|
17682
|
-
|
|
19172
|
+
"position": {
|
|
19173
|
+
"$ref": "#/$defs/Vector3",
|
|
19174
|
+
"description": "Where it goes.",
|
|
19175
|
+
"default": {
|
|
19176
|
+
"x": 0,
|
|
19177
|
+
"y": 0,
|
|
19178
|
+
"z": 0
|
|
19179
|
+
},
|
|
17683
19180
|
"x-og-unit": "m"
|
|
17684
19181
|
},
|
|
17685
|
-
"
|
|
17686
|
-
"
|
|
17687
|
-
"
|
|
17688
|
-
"
|
|
17689
|
-
|
|
17690
|
-
|
|
17691
|
-
|
|
17692
|
-
|
|
17693
|
-
|
|
17694
|
-
"type": "integer",
|
|
17695
|
-
"minimum": 0,
|
|
17696
|
-
"maximum": 4294967295,
|
|
17697
|
-
"description": "Rings from the inside out.",
|
|
17698
|
-
"default": 1,
|
|
17699
|
-
"minimum": 1
|
|
19182
|
+
"quaternion": {
|
|
19183
|
+
"$ref": "#/$defs/Quaternion",
|
|
19184
|
+
"description": "How it turns.",
|
|
19185
|
+
"default": {
|
|
19186
|
+
"x": 0,
|
|
19187
|
+
"y": 0,
|
|
19188
|
+
"z": 0,
|
|
19189
|
+
"w": 1
|
|
19190
|
+
}
|
|
17700
19191
|
},
|
|
17701
|
-
"
|
|
17702
|
-
"
|
|
17703
|
-
"description": "
|
|
17704
|
-
"default":
|
|
17705
|
-
|
|
19192
|
+
"scale": {
|
|
19193
|
+
"$ref": "#/$defs/Vector3",
|
|
19194
|
+
"description": "Its scale (a negative component mirrors it as `mirror` does).",
|
|
19195
|
+
"default": {
|
|
19196
|
+
"x": 1,
|
|
19197
|
+
"y": 1,
|
|
19198
|
+
"z": 1
|
|
19199
|
+
}
|
|
17706
19200
|
},
|
|
17707
|
-
"
|
|
17708
|
-
"
|
|
17709
|
-
"description": "
|
|
17710
|
-
"default":
|
|
17711
|
-
"x-og-unit": "rad"
|
|
19201
|
+
"mirror": {
|
|
19202
|
+
"$ref": "#/$defs/MirrorAxis",
|
|
19203
|
+
"description": "Mirror it along a world axis after placing it: a symmetric prop is one half twice, the second mirrored.",
|
|
19204
|
+
"default": "none"
|
|
17712
19205
|
}
|
|
17713
19206
|
},
|
|
17714
19207
|
"additionalProperties": false
|
|
17715
19208
|
},
|
|
17716
|
-
"
|
|
19209
|
+
"CsgOp": {
|
|
19210
|
+
"x-og-kind": "enum",
|
|
19211
|
+
"x-og-module": "render",
|
|
19212
|
+
"description": "A boolean operation on two solids.",
|
|
19213
|
+
"type": "string",
|
|
19214
|
+
"enum": [
|
|
19215
|
+
"union",
|
|
19216
|
+
"subtract",
|
|
19217
|
+
"intersect"
|
|
19218
|
+
],
|
|
19219
|
+
"x-og-variants": {
|
|
19220
|
+
"union": "Everything in either: a + b.",
|
|
19221
|
+
"subtract": "What of a is not in b: a - b (holes, notches, a dice's pips).",
|
|
19222
|
+
"intersect": "What is in both."
|
|
19223
|
+
}
|
|
19224
|
+
},
|
|
19225
|
+
"CsgGeometryDesc": {
|
|
17717
19226
|
"x-og-kind": "desc",
|
|
17718
19227
|
"x-og-module": "render",
|
|
17719
|
-
"description": "
|
|
19228
|
+
"description": "Two closed geometries combined by a boolean operation, each placed first: a box with a hole bored through it, a dice, a window cut in a wall. The result is closed when both are (every edge shared by two triangles, wound opposite), every piece keeps its source's normals, uvs and colours (b's turned inside out where it is subtracted). Where a plane side or an edge crossing is decided, the decision is exact (Shewchuk's predicates), so every host makes the same cuts; faces that coincide keep one copy or none, as the operation says.",
|
|
17720
19229
|
"type": "object",
|
|
17721
19230
|
"properties": {
|
|
17722
|
-
"
|
|
17723
|
-
"
|
|
17724
|
-
"description": "The
|
|
17725
|
-
"default":
|
|
17726
|
-
"minimum": 0,
|
|
17727
|
-
"x-og-unit": "m"
|
|
19231
|
+
"op": {
|
|
19232
|
+
"$ref": "#/$defs/CsgOp",
|
|
19233
|
+
"description": "The operation.",
|
|
19234
|
+
"default": "union"
|
|
17728
19235
|
},
|
|
17729
|
-
"
|
|
17730
|
-
"
|
|
17731
|
-
"
|
|
17732
|
-
"
|
|
17733
|
-
"description": "Segments around.",
|
|
17734
|
-
"default": 32,
|
|
17735
|
-
"minimum": 3
|
|
19236
|
+
"a": {
|
|
19237
|
+
"$ref": "#/$defs/GeometryPart",
|
|
19238
|
+
"description": "The first operand.",
|
|
19239
|
+
"default": {}
|
|
17736
19240
|
},
|
|
17737
|
-
"
|
|
17738
|
-
"
|
|
17739
|
-
"description": "
|
|
17740
|
-
"default":
|
|
17741
|
-
"x-og-unit": "rad"
|
|
19241
|
+
"b": {
|
|
19242
|
+
"$ref": "#/$defs/GeometryPart",
|
|
19243
|
+
"description": "The second operand.",
|
|
19244
|
+
"default": {}
|
|
17742
19245
|
},
|
|
17743
|
-
"
|
|
17744
|
-
"
|
|
17745
|
-
"description": "How
|
|
17746
|
-
"default":
|
|
17747
|
-
|
|
19246
|
+
"uvRepeat": {
|
|
19247
|
+
"$ref": "#/$defs/Vector2",
|
|
19248
|
+
"description": "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping).",
|
|
19249
|
+
"default": {
|
|
19250
|
+
"x": 1,
|
|
19251
|
+
"y": 1
|
|
19252
|
+
}
|
|
19253
|
+
},
|
|
19254
|
+
"physics": {
|
|
19255
|
+
"type": "boolean",
|
|
19256
|
+
"description": "Register it as a physics mesh too.",
|
|
19257
|
+
"default": true
|
|
19258
|
+
},
|
|
19259
|
+
"dynamic": {
|
|
19260
|
+
"type": "boolean",
|
|
19261
|
+
"description": "Whether og.render.updateGeometry may rewrite it later.",
|
|
19262
|
+
"default": false
|
|
17748
19263
|
}
|
|
17749
19264
|
},
|
|
17750
19265
|
"additionalProperties": false
|
|
17751
19266
|
},
|
|
17752
|
-
"
|
|
19267
|
+
"MergeGeometriesDesc": {
|
|
17753
19268
|
"x-og-kind": "desc",
|
|
17754
19269
|
"x-og-module": "render",
|
|
17755
|
-
"description": "
|
|
19270
|
+
"description": "Geometries placed and merged into one, as three.js BufferGeometryUtils.mergeGeometries after applying each part's matrix: a prop of parts drawn in one draw, a mirrored half, an array (the same part at several placements). Normals follow each placement; a mirrored part turns its triangles so they still face out. Vertex colours are kept when any part has them.",
|
|
17756
19271
|
"type": "object",
|
|
17757
19272
|
"properties": {
|
|
17758
|
-
"
|
|
19273
|
+
"parts": {
|
|
17759
19274
|
"type": "array",
|
|
17760
19275
|
"items": {
|
|
17761
|
-
"$ref": "#/$defs/
|
|
19276
|
+
"$ref": "#/$defs/GeometryPart"
|
|
17762
19277
|
},
|
|
17763
|
-
"description": "The
|
|
17764
|
-
"default": []
|
|
17765
|
-
"x-og-unit": "m"
|
|
17766
|
-
},
|
|
17767
|
-
"path": {
|
|
17768
|
-
"$ref": "#/$defs/Path",
|
|
17769
|
-
"description": "A path (og.path.create, or a scene's `path` by og.path.find) the tube follows instead of the points: its own curve, kind and closed flag (`closed` is the path's then). 0 uses the points.",
|
|
17770
|
-
"default": 0
|
|
17771
|
-
},
|
|
17772
|
-
"tubularSegments": {
|
|
17773
|
-
"type": "integer",
|
|
17774
|
-
"minimum": 0,
|
|
17775
|
-
"maximum": 4294967295,
|
|
17776
|
-
"description": "Segments along the tube.",
|
|
17777
|
-
"default": 64,
|
|
17778
|
-
"minimum": 1
|
|
19278
|
+
"description": "The parts, in order (at least one).",
|
|
19279
|
+
"default": []
|
|
17779
19280
|
},
|
|
17780
|
-
"
|
|
17781
|
-
"
|
|
17782
|
-
"description": "
|
|
17783
|
-
"default":
|
|
17784
|
-
|
|
17785
|
-
|
|
19281
|
+
"uvRepeat": {
|
|
19282
|
+
"$ref": "#/$defs/Vector2",
|
|
19283
|
+
"description": "How many times a texture repeats across it, along u and v: its UVs scaled by uvRepeat (three.js texture.repeat, here on the geometry; material textures sample with repeat wrapping).",
|
|
19284
|
+
"default": {
|
|
19285
|
+
"x": 1,
|
|
19286
|
+
"y": 1
|
|
19287
|
+
}
|
|
17786
19288
|
},
|
|
17787
|
-
"
|
|
17788
|
-
"type": "
|
|
17789
|
-
"
|
|
17790
|
-
"
|
|
17791
|
-
"description": "Segments around it.",
|
|
17792
|
-
"default": 8,
|
|
17793
|
-
"minimum": 3
|
|
19289
|
+
"physics": {
|
|
19290
|
+
"type": "boolean",
|
|
19291
|
+
"description": "Register it as a physics mesh too.",
|
|
19292
|
+
"default": true
|
|
17794
19293
|
},
|
|
17795
|
-
"
|
|
19294
|
+
"dynamic": {
|
|
17796
19295
|
"type": "boolean",
|
|
17797
|
-
"description": "
|
|
19296
|
+
"description": "Whether og.render.updateGeometry may rewrite it later.",
|
|
17798
19297
|
"default": false
|
|
17799
19298
|
}
|
|
17800
19299
|
},
|
|
@@ -19002,7 +20501,7 @@
|
|
|
19002
20501
|
},
|
|
19003
20502
|
"lodBias": {
|
|
19004
20503
|
"type": "number",
|
|
19005
|
-
"description": "This instance's level of detail bias, multiplied with RenderSettings.lodBias: the cook simplifies every mesh into levels (a model's import settings, `model { lods 1 0.5 0.25 }` by default, the triangle fraction of each level; a glTF with MSFT_lod keeps its own levels), and the renderer draws the level
|
|
20504
|
+
"description": "This instance's level of detail bias, multiplied with RenderSettings.lodBias: the cook simplifies every mesh into levels (a model's import settings, `model { lods 1 0.5 0.25 }` by default, the triangle fraction of each level; a glTF with MSFT_lod keeps its own levels) and measures each level's error against the full mesh, and the renderer draws the coarsest level whose error covers less than a pixel at the model's distance, with hysteresis so it does not flicker at the boundary. Above 1 keeps detail farther (a hero), below 1 drops it sooner (a crowd); 0 always draws the full mesh. dump_entity shows the level drawn.",
|
|
19006
20505
|
"default": 1,
|
|
19007
20506
|
"minimum": 0,
|
|
19008
20507
|
"maximum": 16,
|
|
@@ -23406,6 +24905,14 @@
|
|
|
23406
24905
|
"description": "The sprite layer it draws in, sorted with the sprites there (after them when they share the layer).",
|
|
23407
24906
|
"default": 0
|
|
23408
24907
|
},
|
|
24908
|
+
"skin": {
|
|
24909
|
+
"type": "integer",
|
|
24910
|
+
"minimum": 0,
|
|
24911
|
+
"maximum": 4294967295,
|
|
24912
|
+
"description": "The skin it wears: an index into Rig2DInfo.skins (0 is the rig's default; `rig.skins.indexOf(\"armor\")` finds one by name). A skin shows its own attachment wherever the setup pose or a clip shows the default's; a slot the skin leaves alone shows the default's. Change it any tick: the pose is drawn from it.",
|
|
24913
|
+
"default": 0,
|
|
24914
|
+
"minimum": 0
|
|
24915
|
+
},
|
|
23409
24916
|
"finished": {
|
|
23410
24917
|
"type": "boolean",
|
|
23411
24918
|
"description": "Written: a clip that does not loop reached its end (or its start, played backwards).",
|
|
@@ -23418,7 +24925,7 @@
|
|
|
23418
24925
|
"Skeleton2DEvent": {
|
|
23419
24926
|
"x-og-kind": "event",
|
|
23420
24927
|
"x-og-module": "anim",
|
|
23421
|
-
"description": "A 2D skeleton's clip passed one of its events (`event 0.2 \"step\"` in the rig) in the last tick: footsteps, the frame a swing lands. Read in the tick after, like every event; a clip started at 0 fires its events at 0, a looping clip fires each once per pass.",
|
|
24928
|
+
"description": "A 2D skeleton's clip, or the clip a child armature in one of its slots plays, passed one of its events (`event 0.2 \"step\"` in the rig) in the last tick: footsteps, the frame a swing lands. Read in the tick after, like every event; a clip started at 0 fires its events at 0, a looping clip fires each once per pass.",
|
|
23422
24929
|
"type": "object",
|
|
23423
24930
|
"properties": {
|
|
23424
24931
|
"entity": {
|
|
@@ -23439,13 +24946,18 @@
|
|
|
23439
24946
|
"type": "number",
|
|
23440
24947
|
"description": "The event's time in the clip.",
|
|
23441
24948
|
"x-og-unit": "s"
|
|
24949
|
+
},
|
|
24950
|
+
"armature": {
|
|
24951
|
+
"type": "string",
|
|
24952
|
+
"description": "Empty for the skeleton's own clip; for an event of a child armature shown in one of its slots, that armature's name (`clip` and `time` are then the child's clip and its time): a flame's crackle apart from the keeper's footsteps (at most 63 bytes)."
|
|
23442
24953
|
}
|
|
23443
24954
|
},
|
|
23444
24955
|
"required": [
|
|
23445
24956
|
"entity",
|
|
23446
24957
|
"clip",
|
|
23447
24958
|
"name",
|
|
23448
|
-
"time"
|
|
24959
|
+
"time",
|
|
24960
|
+
"armature"
|
|
23449
24961
|
],
|
|
23450
24962
|
"additionalProperties": false
|
|
23451
24963
|
},
|
|
@@ -23589,6 +25101,13 @@
|
|
|
23589
25101
|
},
|
|
23590
25102
|
"description": "The IK constraints' names: an index here is IkTarget2D.constraint."
|
|
23591
25103
|
},
|
|
25104
|
+
"skins": {
|
|
25105
|
+
"type": "array",
|
|
25106
|
+
"items": {
|
|
25107
|
+
"type": "string"
|
|
25108
|
+
},
|
|
25109
|
+
"description": "Its skins' names, `default` (the rig's own attachments) first: an index here is Skeleton2D.skin."
|
|
25110
|
+
},
|
|
23592
25111
|
"clips": {
|
|
23593
25112
|
"type": "array",
|
|
23594
25113
|
"items": {
|
|
@@ -23604,6 +25123,7 @@
|
|
|
23604
25123
|
"bones",
|
|
23605
25124
|
"slots",
|
|
23606
25125
|
"constraints",
|
|
25126
|
+
"skins",
|
|
23607
25127
|
"clips"
|
|
23608
25128
|
],
|
|
23609
25129
|
"additionalProperties": false
|
|
@@ -30525,22 +32045,6 @@
|
|
|
30525
32045
|
],
|
|
30526
32046
|
"additionalProperties": false
|
|
30527
32047
|
},
|
|
30528
|
-
"GraphicsQuality": {
|
|
30529
|
-
"x-og-kind": "enum",
|
|
30530
|
-
"x-og-module": "ui",
|
|
30531
|
-
"description": "A graphics quality preset.",
|
|
30532
|
-
"type": "string",
|
|
30533
|
-
"enum": [
|
|
30534
|
-
"medium",
|
|
30535
|
-
"low",
|
|
30536
|
-
"high"
|
|
30537
|
-
],
|
|
30538
|
-
"x-og-variants": {
|
|
30539
|
-
"medium": "Medium.",
|
|
30540
|
-
"low": "Low: the fewest effects.",
|
|
30541
|
-
"high": "High: every effect."
|
|
30542
|
-
}
|
|
30543
|
-
},
|
|
30544
32048
|
"MenuItem": {
|
|
30545
32049
|
"x-og-kind": "desc",
|
|
30546
32050
|
"x-og-module": "ui",
|
|
@@ -30860,6 +32364,18 @@
|
|
|
30860
32364
|
"description": "Called when the screen closes after changes (persist here).",
|
|
30861
32365
|
"default": null
|
|
30862
32366
|
},
|
|
32367
|
+
"world": {
|
|
32368
|
+
"anyOf": [
|
|
32369
|
+
{
|
|
32370
|
+
"x-og-type": "World"
|
|
32371
|
+
},
|
|
32372
|
+
{
|
|
32373
|
+
"type": "null"
|
|
32374
|
+
}
|
|
32375
|
+
],
|
|
32376
|
+
"description": "The world the graphics preset is drawn in: when the player picks another preset the screen calls og.render.applyQuality(world, preset) before onChange. Null leaves applying it to the game. Inside a system, the system declares RenderSettings among its writes.",
|
|
32377
|
+
"default": null
|
|
32378
|
+
},
|
|
30863
32379
|
"title": {
|
|
30864
32380
|
"type": "string",
|
|
30865
32381
|
"description": "The dialog's title. Every word of the screen is a field with its English default: a localised game passes its string table's (og.i18n.t).",
|
|
@@ -35387,6 +36903,18 @@
|
|
|
35387
36903
|
"castShadows": {
|
|
35388
36904
|
"type": "boolean",
|
|
35389
36905
|
"description": "Its terrain file's `castShadows`."
|
|
36906
|
+
},
|
|
36907
|
+
"seaLevel": {
|
|
36908
|
+
"anyOf": [
|
|
36909
|
+
{
|
|
36910
|
+
"type": "number"
|
|
36911
|
+
},
|
|
36912
|
+
{
|
|
36913
|
+
"type": "null"
|
|
36914
|
+
}
|
|
36915
|
+
],
|
|
36916
|
+
"description": "A generated terrain's sea level (`generate { sea <m> }`) above its entity: place an og.Water there, the terrain's size; null without a sea.",
|
|
36917
|
+
"x-og-unit": "m"
|
|
35390
36918
|
}
|
|
35391
36919
|
},
|
|
35392
36920
|
"required": [
|
|
@@ -35399,7 +36927,8 @@
|
|
|
35399
36927
|
"maxHeight",
|
|
35400
36928
|
"layers",
|
|
35401
36929
|
"collision",
|
|
35402
|
-
"castShadows"
|
|
36930
|
+
"castShadows",
|
|
36931
|
+
"seaLevel"
|
|
35403
36932
|
],
|
|
35404
36933
|
"additionalProperties": false
|
|
35405
36934
|
},
|