topotopo 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +40 -10
- package/README.md +475 -111
- package/dist/cli.js +328 -133
- package/dist/config.d.ts +48 -0
- package/dist/config.js +170 -0
- package/dist/core/analysis.d.ts +5 -1
- package/dist/core/analysis.js +8 -3
- package/dist/core/bake.d.ts +16 -8
- package/dist/core/bake.js +165 -29
- package/dist/core/bevel.d.ts +3 -1
- package/dist/core/bevel.js +238 -97
- package/dist/core/decimate.d.ts +65 -0
- package/dist/core/decimate.js +409 -3
- package/dist/core/erosion.d.ts +37 -0
- package/dist/core/erosion.js +41 -1
- package/dist/core/geometry.d.ts +5 -1
- package/dist/core/geometry.js +204 -4
- package/dist/core/heightfield.d.ts +27 -4
- package/dist/core/heightfield.js +54 -16
- package/dist/core/imageops.d.ts +6 -0
- package/dist/core/imageops.js +51 -0
- package/dist/core/intrinsics.d.ts +7 -0
- package/dist/core/intrinsics.js +94 -0
- package/dist/core/manifold.d.ts +12 -1
- package/dist/core/manifold.js +78 -6
- package/dist/core/materials.d.ts +11 -0
- package/dist/core/materials.js +56 -0
- package/dist/core/noise.d.ts +9 -0
- package/dist/core/noise.js +10 -1
- package/dist/core/packed.js +11 -0
- package/dist/core/particles.d.ts +1 -1
- package/dist/core/particles.js +1 -1
- package/dist/core/polymerge.d.ts +21 -0
- package/dist/core/polymerge.js +327 -0
- package/dist/core/rbd.js +13 -1
- package/dist/core/repair.d.ts +2 -0
- package/dist/core/repair.js +2 -0
- package/dist/core/report.d.ts +70 -0
- package/dist/core/report.js +275 -0
- package/dist/core/scatter.d.ts +1 -1
- package/dist/core/scatter.js +1 -1
- package/dist/core/scene.d.ts +20 -0
- package/dist/core/scene.js +72 -0
- package/dist/core/sha256.d.ts +4 -0
- package/dist/core/sha256.js +69 -0
- package/dist/core/shapes.d.ts +3 -0
- package/dist/core/shapes.js +34 -0
- package/dist/core/snippet-lib.d.ts +15 -2
- package/dist/core/snippet-lib.js +40 -14
- package/dist/core/solidify.d.ts +38 -0
- package/dist/core/solidify.js +356 -0
- package/dist/core/tangents.d.ts +54 -0
- package/dist/core/tangents.js +218 -0
- package/dist/core/texcoord.d.ts +4 -0
- package/dist/core/texcoord.js +14 -0
- package/dist/core/texnoise.d.ts +6 -1
- package/dist/core/texnoise.js +6 -2
- package/dist/core/texsdf.d.ts +131 -0
- package/dist/core/texsdf.js +637 -0
- package/dist/core/texture.d.ts +163 -9
- package/dist/core/texture.js +844 -20
- package/dist/core/topology.d.ts +32 -0
- package/dist/core/topology.js +238 -7
- package/dist/core/traceimage.d.ts +7 -0
- package/dist/core/traceimage.js +221 -0
- package/dist/core/tritri.d.ts +5 -0
- package/dist/core/tritri.js +120 -0
- package/dist/core/unwrap.d.ts +72 -0
- package/dist/core/unwrap.js +800 -0
- package/dist/core/usercode.d.ts +27 -0
- package/dist/core/usercode.js +87 -0
- package/dist/core/uv.d.ts +15 -16
- package/dist/core/uv.js +36 -189
- package/dist/core/uvislands.d.ts +62 -0
- package/dist/core/uvislands.js +574 -0
- package/dist/core/uvoverlap.d.ts +58 -0
- package/dist/core/uvoverlap.js +220 -0
- package/dist/core/uvpack.d.ts +64 -0
- package/dist/core/uvpack.js +628 -0
- package/dist/core/uvreport.d.ts +127 -0
- package/dist/core/uvreport.js +372 -0
- package/dist/core/wrangle.d.ts +6 -1
- package/dist/core/wrangle.js +27 -16
- package/dist/core/xatlas.d.ts +16 -1
- package/dist/core/xatlas.js +95 -61
- package/dist/engines.d.ts +63 -0
- package/dist/engines.js +180 -0
- package/dist/explain.d.ts +4 -3
- package/dist/explain.js +129 -12
- package/dist/graph/engine.d.ts +92 -29
- package/dist/graph/engine.js +298 -148
- package/dist/graph/expr.d.ts +6 -3
- package/dist/graph/expr.js +18 -8
- package/dist/graph/outputs.d.ts +23 -0
- package/dist/graph/outputs.js +41 -0
- package/dist/graph/packages.d.ts +72 -0
- package/dist/graph/packages.js +261 -0
- package/dist/graph/parallel.d.ts +3 -1
- package/dist/graph/parallel.js +4 -1
- package/dist/graph/params.d.ts +6 -0
- package/dist/graph/params.js +34 -7
- package/dist/graph/scope.d.ts +55 -0
- package/dist/graph/scope.js +14 -0
- package/dist/graph/types.d.ts +75 -12
- package/dist/graph/types.js +4 -2
- package/dist/graph/vars.d.ts +16 -0
- package/dist/graph/vars.js +80 -0
- package/dist/host/artifacts.d.ts +10 -1
- package/dist/host/artifacts.js +37 -6
- package/dist/host/cook.d.ts +241 -0
- package/dist/host/cook.js +844 -0
- package/dist/host/export-targets.d.ts +42 -5
- package/dist/host/export-targets.js +72 -13
- package/dist/host/godot-commands.d.ts +4 -0
- package/dist/host/godot-commands.js +21 -0
- package/dist/host/godot.d.ts +183 -0
- package/dist/host/godot.js +916 -0
- package/dist/host/node.d.ts +12 -7
- package/dist/host/node.js +27 -9
- package/dist/host/pool.js +51 -2
- package/dist/host/sidecars.d.ts +8 -0
- package/dist/host/sidecars.js +50 -0
- package/dist/host/types.d.ts +19 -6
- package/dist/host/version.d.ts +1 -0
- package/dist/host/version.js +3 -0
- package/dist/host/worker.js +5 -2
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -2
- package/dist/inspect.d.ts +84 -1
- package/dist/inspect.js +271 -24
- package/dist/io/common.d.ts +33 -5
- package/dist/io/export.js +2 -1
- package/dist/io/files.d.ts +23 -4
- package/dist/io/files.js +60 -8
- package/dist/io/gltf.js +355 -51
- package/dist/io/heightmap.d.ts +3 -0
- package/dist/io/heightmap.js +1 -0
- package/dist/io/import.js +10 -0
- package/dist/io/inspect-scene.d.ts +55 -0
- package/dist/io/inspect-scene.js +155 -0
- package/dist/io/kinds.d.ts +81 -0
- package/dist/io/kinds.js +163 -0
- package/dist/io/points.d.ts +2 -1
- package/dist/io/points.js +3 -1
- package/dist/io/sidecars.d.ts +24 -0
- package/dist/io/sidecars.js +57 -0
- package/dist/io/source.d.ts +65 -0
- package/dist/io/source.js +112 -0
- package/dist/io/targets.d.ts +47 -3
- package/dist/io/targets.js +149 -14
- package/dist/io/textures.js +21 -1
- package/dist/io/unreal.js +5 -1
- package/dist/mcp/docs.d.ts +10 -1
- package/dist/mcp/docs.js +816 -119
- package/dist/mcp/inputs.d.ts +12 -5
- package/dist/mcp/inputs.js +50 -13
- package/dist/mcp/server.js +70 -24
- package/dist/mcp/tools.d.ts +14 -7
- package/dist/mcp/tools.js +207 -108
- package/dist/mcp/verify.d.ts +2 -2
- package/dist/mcp/verify.js +1 -1
- package/dist/mcp/workspace.d.ts +15 -0
- package/dist/mcp/workspace.js +349 -0
- package/dist/nodes/attributes.js +198 -1
- package/dist/nodes/bake.js +207 -83
- package/dist/nodes/beam.d.ts +1 -0
- package/dist/nodes/beam.js +201 -0
- package/dist/nodes/bevel.js +54 -5
- package/dist/nodes/cloth.js +2 -0
- package/dist/nodes/code.js +22 -10
- package/dist/nodes/curves.js +440 -93
- package/dist/nodes/flow.js +53 -33
- package/dist/nodes/generate.js +13 -39
- package/dist/nodes/heightfield.js +248 -77
- package/dist/nodes/imageops.d.ts +1 -0
- package/dist/nodes/imageops.js +203 -0
- package/dist/nodes/index.d.ts +4 -0
- package/dist/nodes/index.js +4 -0
- package/dist/nodes/material.js +91 -23
- package/dist/nodes/measure.js +45 -18
- package/dist/nodes/particles.js +2 -0
- package/dist/nodes/pcg.js +6 -5
- package/dist/nodes/procedural.js +4 -3
- package/dist/nodes/rbd.js +1 -1
- package/dist/nodes/remesh.js +71 -15
- package/dist/nodes/scene.d.ts +1 -0
- package/dist/nodes/scene.js +55 -0
- package/dist/nodes/sdf.js +10 -5
- package/dist/nodes/solid.js +20 -5
- package/dist/nodes/solidify.d.ts +1 -0
- package/dist/nodes/solidify.js +52 -0
- package/dist/nodes/splines.d.ts +15 -1
- package/dist/nodes/splines.js +112 -105
- package/dist/nodes/texture.d.ts +21 -6
- package/dist/nodes/texture.js +1318 -185
- package/dist/nodes/topology.d.ts +7 -0
- package/dist/nodes/topology.js +133 -6
- package/dist/nodes/transform.js +11 -3
- package/dist/nodes/util.d.ts +1 -1
- package/dist/nodes/uv.js +192 -174
- package/dist/nodes/wasmcall.js +6 -2
- package/dist/open.d.ts +19 -0
- package/dist/open.js +12 -0
- package/dist/package.d.ts +288 -0
- package/dist/package.js +772 -0
- package/dist/packages/check.d.ts +32 -0
- package/dist/packages/check.js +169 -0
- package/dist/packages/commands.d.ts +57 -0
- package/dist/packages/commands.js +537 -0
- package/dist/packages/registry.d.ts +796 -0
- package/dist/packages/registry.js +2998 -0
- package/dist/packages/update.d.ts +124 -0
- package/dist/packages/update.js +476 -0
- package/dist/render/options.d.ts +2 -0
- package/dist/render/options.js +44 -5
- package/dist/render/pbr.d.ts +28 -0
- package/dist/render/pbr.js +378 -0
- package/dist/render/preview.d.ts +69 -0
- package/dist/render/preview.js +26 -0
- package/dist/render/raster.d.ts +78 -7
- package/dist/render/raster.js +600 -145
- package/dist/render/texview.d.ts +7 -1
- package/dist/render/texview.js +34 -2
- package/dist/scan.d.ts +61 -0
- package/dist/scan.js +228 -0
- package/dist/session.d.ts +311 -0
- package/dist/session.js +849 -0
- package/dist/viewer/app/api.js +48 -6
- package/dist/viewer/app/camera.js +1 -1
- package/dist/viewer/app/cooking.js +78 -0
- package/dist/viewer/app/embed.js +100 -0
- package/dist/viewer/app/export-popover.js +118 -16
- package/dist/viewer/app/grid.js +6 -2
- package/dist/viewer/app/guides.js +123 -1
- package/dist/viewer/app/keymap.js +7 -4
- package/dist/viewer/app/layers.js +5 -5
- package/dist/viewer/app/main.js +186 -53
- package/dist/viewer/app/markers.js +61 -1
- package/dist/viewer/app/outliner.js +72 -27
- package/dist/viewer/app/output-info.js +45 -0
- package/dist/viewer/app/outputs.css +147 -8
- package/dist/viewer/app/outputs.js +168 -54
- package/dist/viewer/app/packages.js +614 -0
- package/dist/viewer/app/props.js +177 -53
- package/dist/viewer/app/scene.js +35 -6
- package/dist/viewer/app/select.js +5 -4
- package/dist/viewer/app/selection.js +1 -1
- package/dist/viewer/app/status.js +12 -15
- package/dist/viewer/app/style.css +66 -8
- package/dist/viewer/app/units.js +1 -1
- package/dist/viewer/app/vars.js +48 -1
- package/dist/viewer/app/welcome.js +72 -0
- package/dist/viewer/graph-file.d.ts +62 -0
- package/dist/viewer/graph-file.js +175 -0
- package/dist/viewer/index.html +24 -11
- package/dist/viewer/json-edit.d.ts +13 -0
- package/dist/viewer/json-edit.js +274 -0
- package/dist/viewer/outputs.d.ts +49 -5
- package/dist/viewer/outputs.js +264 -56
- package/dist/viewer/packages.d.ts +121 -0
- package/dist/viewer/packages.js +584 -0
- package/dist/viewer/server.d.ts +24 -7
- package/dist/viewer/server.js +289 -31
- package/dist/web/app/web.css +419 -0
- package/dist/web/app/web.js +188 -0
- package/dist/web/bake.d.ts +34 -0
- package/dist/web/bake.js +153 -0
- package/dist/web/folder-page.d.ts +101 -0
- package/dist/web/folder-page.js +146 -0
- package/dist/web/folders.d.ts +280 -0
- package/dist/web/folders.js +970 -0
- package/dist/web/library.d.ts +91 -0
- package/dist/web/library.js +228 -0
- package/dist/web/markdown.d.ts +45 -0
- package/dist/web/markdown.js +677 -0
- package/dist/web/pages.d.ts +258 -0
- package/dist/web/pages.js +301 -0
- package/dist/web/server.d.ts +24 -0
- package/dist/web/server.js +1068 -0
- package/dist/workspace.d.ts +88 -105
- package/dist/workspace.js +359 -375
- package/integrations/godot/addons/topotopo/LICENSE +202 -0
- package/integrations/godot/addons/topotopo/README.md +57 -0
- package/integrations/godot/addons/topotopo/context_menu.gd +43 -0
- package/integrations/godot/addons/topotopo/dock.gd +266 -0
- package/integrations/godot/addons/topotopo/dock.tscn +72 -0
- package/integrations/godot/addons/topotopo/export_filter.gd +72 -0
- package/integrations/godot/addons/topotopo/gltf_instancing.gd +131 -0
- package/integrations/godot/addons/topotopo/icons/topotopo.svg +1 -0
- package/integrations/godot/addons/topotopo/inspector.gd +38 -0
- package/integrations/godot/addons/topotopo/instances_post_import.gd +111 -0
- package/integrations/godot/addons/topotopo/package.gd +23 -0
- package/integrations/godot/addons/topotopo/package_importer.gd +187 -0
- package/integrations/godot/addons/topotopo/plugin.cfg +7 -0
- package/integrations/godot/addons/topotopo/plugin.gd +970 -0
- package/integrations/godot/addons/topotopo/record.gd +435 -0
- package/integrations/godot/addons/topotopo/runner.gd +458 -0
- package/integrations/godot/addons/topotopo/tools/check.gd +42 -0
- package/integrations/godot/addons/topotopo/watcher.gd +199 -0
- package/kernels/pkg/README.md +23 -29
- package/kernels/pkg-simd/README.md +23 -29
- package/library/architecture/versions/1.0/architecture.topo +12 -0
- package/{shelf → library/architecture/versions/1.0/graphs}/arch.json +3 -3
- package/{shelf → library/architecture/versions/1.0/graphs}/beam_truss.json +6 -6
- package/{shelf → library/architecture/versions/1.0/graphs}/brick_wall.json +8 -8
- package/{shelf → library/architecture/versions/1.0/graphs}/door_frame.json +3 -3
- package/{shelf → library/architecture/versions/1.0/graphs}/hex_grid_floor.json +3 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/house.json +8 -8
- package/library/architecture/versions/1.0/graphs/lineup.json +42 -0
- package/{shelf → library/architecture/versions/1.0/graphs}/pillar.json +3 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/railing.json +5 -5
- package/{shelf → library/architecture/versions/1.0/graphs}/roof_gable.json +2 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/roof_hip.json +2 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/roof_skeleton.json +2 -1
- package/{shelf → library/architecture/versions/1.0/graphs}/scaffold.json +4 -4
- package/{shelf → library/architecture/versions/1.0/graphs}/spiral_stairs.json +3 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/stairs.json +6 -6
- package/{shelf → library/architecture/versions/1.0/graphs}/tile_floor.json +3 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/wall_segment.json +10 -10
- package/{shelf → library/architecture/versions/1.0/graphs}/window_frame.json +2 -2
- package/library/architecture/versions/1.0/version.json +1119 -0
- package/{shelf → library/nature/versions/1.0/graphs}/bush.json +2 -2
- package/{shelf → library/nature/versions/1.0/graphs}/cliff_block.json +4 -3
- package/{shelf → library/nature/versions/1.0/graphs}/forest_patch.json +5 -5
- package/{shelf → library/nature/versions/1.0/graphs}/grass_clumps.json +2 -2
- package/library/nature/versions/1.0/graphs/lineup.json +24 -0
- package/{shelf → library/nature/versions/1.0/graphs}/log.json +6 -6
- package/{shelf → library/nature/versions/1.0/graphs}/rock.json +5 -4
- package/{shelf → library/nature/versions/1.0/graphs}/scatter_rocks.json +5 -5
- package/{shelf → library/nature/versions/1.0/graphs}/tree_lowpoly.json +3 -2
- package/library/nature/versions/1.0/nature.topo +12 -0
- package/library/nature/versions/1.0/version.json +534 -0
- package/{shelf → library/props/versions/1.0/graphs}/barrel.json +5 -4
- package/{shelf → library/props/versions/1.0/graphs}/crate.json +3 -3
- package/library/props/versions/1.0/graphs/lineup.json +18 -0
- package/{shelf → library/props/versions/1.0/graphs}/pallet.json +4 -3
- package/{shelf → library/props/versions/1.0/graphs}/pipe_run.json +3 -3
- package/{shelf → library/props/versions/1.0/graphs}/sandbag_wall.json +5 -5
- package/library/props/versions/1.0/props.topo +12 -0
- package/library/props/versions/1.0/version.json +336 -0
- package/{shelf → library/street/versions/1.0/graphs}/bench.json +5 -5
- package/{shelf → library/street/versions/1.0/graphs}/bollard.json +2 -1
- package/{shelf → library/street/versions/1.0/graphs}/cable.json +4 -4
- package/{shelf → library/street/versions/1.0/graphs}/fence.json +7 -7
- package/{shelf → library/street/versions/1.0/graphs}/lamp_post.json +2 -2
- package/library/street/versions/1.0/graphs/lineup.json +22 -0
- package/{shelf → library/street/versions/1.0/graphs}/road_strip.json +2 -2
- package/{shelf → library/street/versions/1.0/graphs}/sign_post.json +1 -1
- package/library/street/versions/1.0/street.topo +12 -0
- package/library/street/versions/1.0/version.json +421 -0
- package/package.json +23 -8
- package/dist/graph/migrate.d.ts +0 -23
- package/dist/graph/migrate.js +0 -58
- package/shelf/index.json +0 -190
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "topotopo/nature",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"note": "first version",
|
|
5
|
+
"published": "2026-10-30T12:01:48.932Z",
|
|
6
|
+
"big": false,
|
|
7
|
+
"hash": "c5658d33c4aec40470bff942eab0e250b59946d8dbd853ffbdd551674bb890b8",
|
|
8
|
+
"outputs": {
|
|
9
|
+
"bush": {
|
|
10
|
+
"graph": "bush",
|
|
11
|
+
"node": "out",
|
|
12
|
+
"label": "Bush",
|
|
13
|
+
"kind": "mesh",
|
|
14
|
+
"tags": [
|
|
15
|
+
"bush",
|
|
16
|
+
"foliage",
|
|
17
|
+
"vegetation",
|
|
18
|
+
"low-poly"
|
|
19
|
+
],
|
|
20
|
+
"description": "Low-poly bush: overlapping faceted blobs, cut flat at the ground. Pivot at the centre of the base. Piece: bush (foliage_dark). Open at the bottom.",
|
|
21
|
+
"sliders": {
|
|
22
|
+
"size": {
|
|
23
|
+
"type": "float",
|
|
24
|
+
"default": 1.2,
|
|
25
|
+
"min": 0.2,
|
|
26
|
+
"max": 5,
|
|
27
|
+
"desc": "width (m)"
|
|
28
|
+
},
|
|
29
|
+
"height": {
|
|
30
|
+
"type": "float",
|
|
31
|
+
"default": 0.8,
|
|
32
|
+
"min": 0.1,
|
|
33
|
+
"max": 4,
|
|
34
|
+
"desc": "approximate height (m)"
|
|
35
|
+
},
|
|
36
|
+
"blobs": {
|
|
37
|
+
"type": "int",
|
|
38
|
+
"default": 6,
|
|
39
|
+
"min": 1,
|
|
40
|
+
"max": 16,
|
|
41
|
+
"desc": "number of blobs"
|
|
42
|
+
},
|
|
43
|
+
"roughness": {
|
|
44
|
+
"type": "float",
|
|
45
|
+
"default": 0.2,
|
|
46
|
+
"min": 0,
|
|
47
|
+
"max": 0.5,
|
|
48
|
+
"desc": "blob displacement (fraction of the blob radius)"
|
|
49
|
+
},
|
|
50
|
+
"seed": {
|
|
51
|
+
"type": "int",
|
|
52
|
+
"default": 0,
|
|
53
|
+
"min": 0,
|
|
54
|
+
"max": 1000,
|
|
55
|
+
"desc": "random seed"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"inputs": []
|
|
59
|
+
},
|
|
60
|
+
"cliff_block": {
|
|
61
|
+
"graph": "cliff_block",
|
|
62
|
+
"node": "out",
|
|
63
|
+
"label": "Cliff block",
|
|
64
|
+
"kind": "mesh",
|
|
65
|
+
"tags": [
|
|
66
|
+
"cliff",
|
|
67
|
+
"rock",
|
|
68
|
+
"mountain",
|
|
69
|
+
"low-poly"
|
|
70
|
+
],
|
|
71
|
+
"description": "Cliff block: a tall rock mass with ridged noise, horizontal strata ledges and banded colour, flat on the ground. Pivot at the centre of the base. Piece: cliff (cliff_rock). Closed (watertight).",
|
|
72
|
+
"sliders": {
|
|
73
|
+
"width": {
|
|
74
|
+
"type": "float",
|
|
75
|
+
"default": 4,
|
|
76
|
+
"min": 1,
|
|
77
|
+
"max": 20,
|
|
78
|
+
"desc": "size along X (m)"
|
|
79
|
+
},
|
|
80
|
+
"height": {
|
|
81
|
+
"type": "float",
|
|
82
|
+
"default": 5,
|
|
83
|
+
"min": 1,
|
|
84
|
+
"max": 30,
|
|
85
|
+
"desc": "height (m)"
|
|
86
|
+
},
|
|
87
|
+
"depth": {
|
|
88
|
+
"type": "float",
|
|
89
|
+
"default": 3,
|
|
90
|
+
"min": 1,
|
|
91
|
+
"max": 20,
|
|
92
|
+
"desc": "size along Z (m)"
|
|
93
|
+
},
|
|
94
|
+
"roughness": {
|
|
95
|
+
"type": "float",
|
|
96
|
+
"default": 0.5,
|
|
97
|
+
"min": 0,
|
|
98
|
+
"max": 1,
|
|
99
|
+
"desc": "noise and ledge strength (0 = smooth block)"
|
|
100
|
+
},
|
|
101
|
+
"strata": {
|
|
102
|
+
"type": "int",
|
|
103
|
+
"default": 6,
|
|
104
|
+
"min": 0,
|
|
105
|
+
"max": 20,
|
|
106
|
+
"desc": "number of strata ledges (0 = none)"
|
|
107
|
+
},
|
|
108
|
+
"seed": {
|
|
109
|
+
"type": "int",
|
|
110
|
+
"default": 0,
|
|
111
|
+
"min": 0,
|
|
112
|
+
"max": 1000,
|
|
113
|
+
"desc": "noise seed"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"inputs": []
|
|
117
|
+
},
|
|
118
|
+
"forest_patch": {
|
|
119
|
+
"graph": "forest_patch",
|
|
120
|
+
"node": "out",
|
|
121
|
+
"label": "Forest",
|
|
122
|
+
"kind": "instances",
|
|
123
|
+
"tags": [
|
|
124
|
+
"forest",
|
|
125
|
+
"trees",
|
|
126
|
+
"conifer",
|
|
127
|
+
"vegetation",
|
|
128
|
+
"scatter",
|
|
129
|
+
"low-poly"
|
|
130
|
+
],
|
|
131
|
+
"description": "Forest on a surface (input 0; without one, a 30 × 30 m ground patch at y = 0): trees scattered by density with a minimum spacing on faces flatter than max_slope, kept upright with random yaw and height, as packed copies of three tree_lowpoly variants (conifer, round, poplar) picked by conifer_ratio, plus optional bushes between them. Output: packed instances (unpack for polygons); the input surface is not included. Pivot = the surface. Pieces: tree_trunk, tree_canopy, bush.",
|
|
132
|
+
"sliders": {
|
|
133
|
+
"density": {
|
|
134
|
+
"type": "float",
|
|
135
|
+
"default": 0.02,
|
|
136
|
+
"min": 0.001,
|
|
137
|
+
"max": 0.5,
|
|
138
|
+
"desc": "trees per square metre before spacing"
|
|
139
|
+
},
|
|
140
|
+
"min_distance": {
|
|
141
|
+
"type": "float",
|
|
142
|
+
"default": 3,
|
|
143
|
+
"min": 0.5,
|
|
144
|
+
"max": 20,
|
|
145
|
+
"desc": "minimum distance between trees (m)"
|
|
146
|
+
},
|
|
147
|
+
"min_height": {
|
|
148
|
+
"type": "float",
|
|
149
|
+
"default": 4,
|
|
150
|
+
"min": 1,
|
|
151
|
+
"max": 30,
|
|
152
|
+
"desc": "smallest tree height (m)"
|
|
153
|
+
},
|
|
154
|
+
"max_height": {
|
|
155
|
+
"type": "float",
|
|
156
|
+
"default": 9,
|
|
157
|
+
"min": 1,
|
|
158
|
+
"max": 40,
|
|
159
|
+
"desc": "largest tree height (m)"
|
|
160
|
+
},
|
|
161
|
+
"conifer_ratio": {
|
|
162
|
+
"type": "float",
|
|
163
|
+
"default": 0.5,
|
|
164
|
+
"min": 0,
|
|
165
|
+
"max": 1,
|
|
166
|
+
"desc": "share of conifers; the rest is split between round and poplar trees"
|
|
167
|
+
},
|
|
168
|
+
"max_slope": {
|
|
169
|
+
"type": "float",
|
|
170
|
+
"default": 30,
|
|
171
|
+
"min": 0,
|
|
172
|
+
"max": 90,
|
|
173
|
+
"desc": "no trees on faces steeper than this (degrees)"
|
|
174
|
+
},
|
|
175
|
+
"bushes": {
|
|
176
|
+
"type": "bool",
|
|
177
|
+
"default": true,
|
|
178
|
+
"desc": "scatter bushes (three times the tree density)"
|
|
179
|
+
},
|
|
180
|
+
"ground_size": {
|
|
181
|
+
"type": "float",
|
|
182
|
+
"default": 30,
|
|
183
|
+
"min": 2,
|
|
184
|
+
"max": 200,
|
|
185
|
+
"desc": "size of the ground patch used when nothing is connected (m)"
|
|
186
|
+
},
|
|
187
|
+
"seed": {
|
|
188
|
+
"type": "int",
|
|
189
|
+
"default": 0,
|
|
190
|
+
"min": 0,
|
|
191
|
+
"max": 1000,
|
|
192
|
+
"desc": "random seed"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"inputs": [
|
|
196
|
+
{
|
|
197
|
+
"index": 0,
|
|
198
|
+
"label": "surface to plant on (polygons); optional"
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
"grass_clumps": {
|
|
203
|
+
"graph": "grass_clumps",
|
|
204
|
+
"node": "out",
|
|
205
|
+
"label": "Grass",
|
|
206
|
+
"kind": "instances",
|
|
207
|
+
"tags": [
|
|
208
|
+
"grass",
|
|
209
|
+
"foliage",
|
|
210
|
+
"vegetation",
|
|
211
|
+
"ground-cover",
|
|
212
|
+
"scatter"
|
|
213
|
+
],
|
|
214
|
+
"description": "Grass clumps on a surface (input 0; without one, a 4 × 4 m ground patch at y = 0): each clump is a fan of thin two-sided blades leaning outwards; clumps are scattered by density on faces flatter than max_slope and copied as packed instances of two variants with random yaw and size. Output: packed instances (unpack for polygons); the input surface is not included. Pivot = the surface. Piece: grass (grass, double sided).",
|
|
215
|
+
"sliders": {
|
|
216
|
+
"density": {
|
|
217
|
+
"type": "float",
|
|
218
|
+
"default": 8,
|
|
219
|
+
"min": 0.1,
|
|
220
|
+
"max": 40,
|
|
221
|
+
"desc": "clumps per square metre"
|
|
222
|
+
},
|
|
223
|
+
"height": {
|
|
224
|
+
"type": "float",
|
|
225
|
+
"default": 0.35,
|
|
226
|
+
"min": 0.05,
|
|
227
|
+
"max": 2,
|
|
228
|
+
"desc": "blade height (m)"
|
|
229
|
+
},
|
|
230
|
+
"blades": {
|
|
231
|
+
"type": "int",
|
|
232
|
+
"default": 12,
|
|
233
|
+
"min": 3,
|
|
234
|
+
"max": 30,
|
|
235
|
+
"desc": "blades per clump"
|
|
236
|
+
},
|
|
237
|
+
"spread": {
|
|
238
|
+
"type": "float",
|
|
239
|
+
"default": 0.5,
|
|
240
|
+
"min": 0,
|
|
241
|
+
"max": 1.5,
|
|
242
|
+
"desc": "how far the blades lean out (fraction of the height)"
|
|
243
|
+
},
|
|
244
|
+
"max_slope": {
|
|
245
|
+
"type": "float",
|
|
246
|
+
"default": 45,
|
|
247
|
+
"min": 0,
|
|
248
|
+
"max": 90,
|
|
249
|
+
"desc": "no grass on faces steeper than this (degrees)"
|
|
250
|
+
},
|
|
251
|
+
"ground_size": {
|
|
252
|
+
"type": "float",
|
|
253
|
+
"default": 4,
|
|
254
|
+
"min": 0.5,
|
|
255
|
+
"max": 20,
|
|
256
|
+
"desc": "size of the ground patch used when nothing is connected (m)"
|
|
257
|
+
},
|
|
258
|
+
"seed": {
|
|
259
|
+
"type": "int",
|
|
260
|
+
"default": 0,
|
|
261
|
+
"min": 0,
|
|
262
|
+
"max": 1000,
|
|
263
|
+
"desc": "random seed"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"inputs": [
|
|
267
|
+
{
|
|
268
|
+
"index": 0,
|
|
269
|
+
"label": "surface to grow on (polygons); optional"
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
"lineup": {
|
|
274
|
+
"graph": "lineup",
|
|
275
|
+
"node": "lineup",
|
|
276
|
+
"label": "Nature line-up",
|
|
277
|
+
"kind": "scene",
|
|
278
|
+
"tags": [
|
|
279
|
+
"lineup",
|
|
280
|
+
"nature"
|
|
281
|
+
],
|
|
282
|
+
"description": "TopoTopo's nature package, its 8 outputs side by side at their defaults. The package's default output and its preview, from bush to tree_lowpoly along +X, 1 m apart.",
|
|
283
|
+
"sliders": {},
|
|
284
|
+
"inputs": []
|
|
285
|
+
},
|
|
286
|
+
"log": {
|
|
287
|
+
"graph": "log",
|
|
288
|
+
"node": "out",
|
|
289
|
+
"label": "Log",
|
|
290
|
+
"kind": "mesh",
|
|
291
|
+
"tags": [
|
|
292
|
+
"log",
|
|
293
|
+
"deadwood",
|
|
294
|
+
"wood",
|
|
295
|
+
"low-poly"
|
|
296
|
+
],
|
|
297
|
+
"description": "Felled log lying along X: a tapered trunk with ridged bark, light end grain and a few branch stubs. Pivot at the centre of the base (the log rests on y = 0). Pieces: log_trunk (bark, ends wood_end), log_stubs (bark). The trunk is closed.",
|
|
298
|
+
"sliders": {
|
|
299
|
+
"log_length": {
|
|
300
|
+
"type": "float",
|
|
301
|
+
"default": 2.4,
|
|
302
|
+
"min": 0.4,
|
|
303
|
+
"max": 8,
|
|
304
|
+
"desc": "length along X (m)"
|
|
305
|
+
},
|
|
306
|
+
"radius": {
|
|
307
|
+
"type": "float",
|
|
308
|
+
"default": 0.2,
|
|
309
|
+
"min": 0.05,
|
|
310
|
+
"max": 0.8,
|
|
311
|
+
"desc": "radius at the thick end (m)"
|
|
312
|
+
},
|
|
313
|
+
"taper": {
|
|
314
|
+
"type": "float",
|
|
315
|
+
"default": 0.2,
|
|
316
|
+
"min": 0,
|
|
317
|
+
"max": 0.6,
|
|
318
|
+
"desc": "how much thinner the other end is (fraction of radius)"
|
|
319
|
+
},
|
|
320
|
+
"roughness": {
|
|
321
|
+
"type": "float",
|
|
322
|
+
"default": 0.12,
|
|
323
|
+
"min": 0,
|
|
324
|
+
"max": 0.3,
|
|
325
|
+
"desc": "bark displacement as a fraction of radius"
|
|
326
|
+
},
|
|
327
|
+
"stubs": {
|
|
328
|
+
"type": "int",
|
|
329
|
+
"default": 3,
|
|
330
|
+
"min": 0,
|
|
331
|
+
"max": 10,
|
|
332
|
+
"desc": "branch stubs"
|
|
333
|
+
},
|
|
334
|
+
"seed": {
|
|
335
|
+
"type": "int",
|
|
336
|
+
"default": 0,
|
|
337
|
+
"min": 0,
|
|
338
|
+
"max": 1000,
|
|
339
|
+
"desc": "random seed (bark noise, stubs)"
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"inputs": []
|
|
343
|
+
},
|
|
344
|
+
"rock": {
|
|
345
|
+
"graph": "rock",
|
|
346
|
+
"node": "out",
|
|
347
|
+
"label": "Rock",
|
|
348
|
+
"kind": "mesh",
|
|
349
|
+
"tags": [
|
|
350
|
+
"rock",
|
|
351
|
+
"stone",
|
|
352
|
+
"boulder",
|
|
353
|
+
"low-poly"
|
|
354
|
+
],
|
|
355
|
+
"description": "Low-poly rock: a noise-displaced icosphere, flattened, with faceted shading and a mottled tint. Pivot at the centre of the base (sink lowers it into the ground). Piece: rock (rock). Closed (watertight).",
|
|
356
|
+
"sliders": {
|
|
357
|
+
"size": {
|
|
358
|
+
"type": "float",
|
|
359
|
+
"default": 1,
|
|
360
|
+
"min": 0.1,
|
|
361
|
+
"max": 6,
|
|
362
|
+
"desc": "approximate width (m)"
|
|
363
|
+
},
|
|
364
|
+
"roughness": {
|
|
365
|
+
"type": "float",
|
|
366
|
+
"default": 0.35,
|
|
367
|
+
"min": 0,
|
|
368
|
+
"max": 0.8,
|
|
369
|
+
"desc": "displacement as a fraction of the size"
|
|
370
|
+
},
|
|
371
|
+
"flatness": {
|
|
372
|
+
"type": "float",
|
|
373
|
+
"default": 0.65,
|
|
374
|
+
"min": 0.2,
|
|
375
|
+
"max": 1,
|
|
376
|
+
"desc": "height / width"
|
|
377
|
+
},
|
|
378
|
+
"level": {
|
|
379
|
+
"type": "int",
|
|
380
|
+
"default": 2,
|
|
381
|
+
"min": 1,
|
|
382
|
+
"max": 4,
|
|
383
|
+
"desc": "icosphere subdivision level (2 = 162 points)"
|
|
384
|
+
},
|
|
385
|
+
"sink": {
|
|
386
|
+
"type": "float",
|
|
387
|
+
"default": 0,
|
|
388
|
+
"min": 0,
|
|
389
|
+
"max": 0.5,
|
|
390
|
+
"desc": "part of the height below y = 0"
|
|
391
|
+
},
|
|
392
|
+
"seed": {
|
|
393
|
+
"type": "int",
|
|
394
|
+
"default": 0,
|
|
395
|
+
"min": 0,
|
|
396
|
+
"max": 1000,
|
|
397
|
+
"desc": "shape seed"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"inputs": []
|
|
401
|
+
},
|
|
402
|
+
"scatter_rocks": {
|
|
403
|
+
"graph": "scatter_rocks",
|
|
404
|
+
"node": "out",
|
|
405
|
+
"label": "Scattered rocks",
|
|
406
|
+
"kind": "instances",
|
|
407
|
+
"tags": [
|
|
408
|
+
"rocks",
|
|
409
|
+
"stone",
|
|
410
|
+
"ground-cover",
|
|
411
|
+
"scatter"
|
|
412
|
+
],
|
|
413
|
+
"description": "Rocks scattered on a surface (input 0; without one, an 8 × 8 m ground patch at y = 0): the slope mask keeps faces flatter than max_slope, scatter by density with a minimum spacing, rocks aligned to the surface with random yaw, tilt and scale, overlaps pruned, then packed copies of three rock variants (this package's rock output) sunk slightly into the ground. Output: packed instances (unpack for polygons); the input surface is not included. Pivot = the surface. Piece: rock (rock).",
|
|
414
|
+
"sliders": {
|
|
415
|
+
"density": {
|
|
416
|
+
"type": "float",
|
|
417
|
+
"default": 0.4,
|
|
418
|
+
"min": 0.01,
|
|
419
|
+
"max": 5,
|
|
420
|
+
"desc": "rocks per square metre before pruning"
|
|
421
|
+
},
|
|
422
|
+
"min_scale": {
|
|
423
|
+
"type": "float",
|
|
424
|
+
"default": 0.35,
|
|
425
|
+
"min": 0.05,
|
|
426
|
+
"max": 5,
|
|
427
|
+
"desc": "smallest rock width (m)"
|
|
428
|
+
},
|
|
429
|
+
"max_scale": {
|
|
430
|
+
"type": "float",
|
|
431
|
+
"default": 1.1,
|
|
432
|
+
"min": 0.05,
|
|
433
|
+
"max": 8,
|
|
434
|
+
"desc": "largest rock width (m)"
|
|
435
|
+
},
|
|
436
|
+
"max_slope": {
|
|
437
|
+
"type": "float",
|
|
438
|
+
"default": 40,
|
|
439
|
+
"min": 0,
|
|
440
|
+
"max": 90,
|
|
441
|
+
"desc": "no rocks on faces steeper than this (degrees)"
|
|
442
|
+
},
|
|
443
|
+
"ground_size": {
|
|
444
|
+
"type": "float",
|
|
445
|
+
"default": 8,
|
|
446
|
+
"min": 1,
|
|
447
|
+
"max": 60,
|
|
448
|
+
"desc": "size of the ground patch used when nothing is connected (m)"
|
|
449
|
+
},
|
|
450
|
+
"seed": {
|
|
451
|
+
"type": "int",
|
|
452
|
+
"default": 0,
|
|
453
|
+
"min": 0,
|
|
454
|
+
"max": 1000,
|
|
455
|
+
"desc": "random seed"
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"inputs": [
|
|
459
|
+
{
|
|
460
|
+
"index": 0,
|
|
461
|
+
"label": "surface to scatter on (polygons); optional"
|
|
462
|
+
}
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
"tree_lowpoly": {
|
|
466
|
+
"graph": "tree_lowpoly",
|
|
467
|
+
"node": "out",
|
|
468
|
+
"label": "Tree",
|
|
469
|
+
"kind": "mesh",
|
|
470
|
+
"tags": [
|
|
471
|
+
"tree",
|
|
472
|
+
"conifer",
|
|
473
|
+
"deciduous",
|
|
474
|
+
"vegetation",
|
|
475
|
+
"low-poly"
|
|
476
|
+
],
|
|
477
|
+
"description": "Low-poly tree in three styles: round (a cluster of faceted blobs), conifer (stacked cones) and poplar (a tall narrow crown). Pivot at the base of the trunk. Pieces: tree_trunk (bark), tree_canopy (foliage, or foliage_dark for conifers). Every piece is closed.",
|
|
478
|
+
"sliders": {
|
|
479
|
+
"height": {
|
|
480
|
+
"type": "float",
|
|
481
|
+
"default": 6,
|
|
482
|
+
"min": 1.5,
|
|
483
|
+
"max": 25,
|
|
484
|
+
"desc": "total height (m)"
|
|
485
|
+
},
|
|
486
|
+
"trunk_radius": {
|
|
487
|
+
"type": "float",
|
|
488
|
+
"default": 0.18,
|
|
489
|
+
"min": 0.04,
|
|
490
|
+
"max": 1,
|
|
491
|
+
"desc": "trunk radius at the base (m)"
|
|
492
|
+
},
|
|
493
|
+
"canopy_radius": {
|
|
494
|
+
"type": "float",
|
|
495
|
+
"default": 1.8,
|
|
496
|
+
"min": 0.4,
|
|
497
|
+
"max": 8,
|
|
498
|
+
"desc": "crown radius (m)"
|
|
499
|
+
},
|
|
500
|
+
"style": {
|
|
501
|
+
"type": "enum",
|
|
502
|
+
"default": "round",
|
|
503
|
+
"options": [
|
|
504
|
+
"round",
|
|
505
|
+
"conifer",
|
|
506
|
+
"poplar"
|
|
507
|
+
],
|
|
508
|
+
"desc": "crown shape"
|
|
509
|
+
},
|
|
510
|
+
"seed": {
|
|
511
|
+
"type": "int",
|
|
512
|
+
"default": 0,
|
|
513
|
+
"min": 0,
|
|
514
|
+
"max": 1000,
|
|
515
|
+
"desc": "random seed (blob placement, rotation, tint)"
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"inputs": []
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"default": {
|
|
522
|
+
"graph": "lineup",
|
|
523
|
+
"node": "lineup",
|
|
524
|
+
"kind": "scene",
|
|
525
|
+
"tags": [
|
|
526
|
+
"lineup",
|
|
527
|
+
"nature"
|
|
528
|
+
],
|
|
529
|
+
"description": "TopoTopo's nature package, its 8 outputs side by side at their defaults. The package's default output and its preview, from bush to tree_lowpoly along +X, 1 m apart.",
|
|
530
|
+
"sliders": {},
|
|
531
|
+
"inputs": []
|
|
532
|
+
},
|
|
533
|
+
"topotopo": "0.4.0"
|
|
534
|
+
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"note": "half profile in the XY plane from the bottom centre around to the top centre, with a recessed lid",
|
|
25
25
|
"params": {
|
|
26
26
|
"run_over": "detail",
|
|
27
|
-
"code": "const H =
|
|
27
|
+
"code": "const H = height, R = radius, b = bulge, n = 12, rim = Math.min(0.03, H * 0.04), rec = 0.92;\nconst r = (y) => R * (1 + b * (1 - Math.pow(2 * y / H - 1, 2)));\nconst pts = [addpoint(0, [0, 0, 0])];\nfor (let i = 0; i <= n; i++) { const y = H * i / n; pts.push(addpoint(0, [r(y), y, 0])); }\npts.push(addpoint(0, [R * rec, H, 0]), addpoint(0, [R * rec, H - rim, 0]), addpoint(0, [0, H - rim, 0]));\naddprim(0, 'polyline', pts);"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"body": { "type": "revolve", "in": ["profile"], "params": { "segments": "=staves" } },
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"note": "Cd = the material's base colour, tinted per stave",
|
|
47
47
|
"params": {
|
|
48
48
|
"run_over": "prims",
|
|
49
|
-
"code": "const m = JSON.parse(detail(0, 'materials') || '{}')[s@material]; if (!m) return; const a = Math.atan2(@P.z, @P.x); const k = 0.75 + 0.4 * rand(Math.floor((a + PI) / TAU *
|
|
49
|
+
"code": "const m = JSON.parse(detail(0, 'materials') || '{}')[s@material]; if (!m) return; const a = Math.atan2(@P.z, @P.x); const k = 0.75 + 0.4 * rand(Math.floor((a + PI) / TAU * staves + 0.5), seed); @Cd = mul(m.baseColor, k);"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"hoop_pts": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"in": ["none"],
|
|
55
55
|
"params": {
|
|
56
56
|
"run_over": "detail",
|
|
57
|
-
"code": "const H =
|
|
57
|
+
"code": "const H = height, R = radius, b = bulge, n = Math.round(hoops), hh = Math.min(0.035, H * 0.04);\nconst r = (y) => R * (1 + b * (1 - Math.pow(2 * y / H - 1, 2)));\nfor (let i = 0; i < n; i++) {\n const f = n === 1 ? 0.5 : i < n / 2 ? 0.08 + 0.3 * i / Math.max(1, Math.ceil(n / 2) - 1 || 1) : 0.92 - 0.3 * (n - 1 - i) / Math.max(1, Math.ceil(n / 2) - 1 || 1);\n const y = H * Math.min(0.94, Math.max(0.06, f));\n const q = addpoint(0, [0, y, 0]);\n setpointattrib(0, 'scale', q, [r(y) + 0.006, hh, r(y) + 0.006]);\n}"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"hoop_unit": { "type": "tube", "params": { "radius": 1, "height": 1, "cols": "=staves", "caps": true } },
|
|
@@ -81,5 +81,6 @@
|
|
|
81
81
|
"out": { "type": "attrib_delete", "in": ["all"], "params": { "names": "copynum" } }
|
|
82
82
|
},
|
|
83
83
|
"output": "out",
|
|
84
|
-
"
|
|
84
|
+
"outputs": { "barrel": { "node": "out", "label": "Barrel", "kind": "mesh", "tags": ["barrel", "container", "wooden", "prop"] } },
|
|
85
|
+
"meta": { "watertight": true }
|
|
85
86
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"note": "one point per plank: P, scale (box size), tint",
|
|
28
28
|
"params": {
|
|
29
29
|
"run_over": "detail",
|
|
30
|
-
"code": "const D = [
|
|
30
|
+
"code": "const D = [width, height, depth], fw = Math.min(frame_width, Math.min(...D) / 3), n = Math.max(1, Math.round(planks)), t = 0.02, rec = Math.min(0.015, fw / 3);\nfor (const ax of [0, 1, 2]) for (const sg of [-1, 1]) {\n const run = ax === 0 ? 2 : 0, st = ax === 1 ? 2 : 1;\n const L = D[run] - 2 * rec, w = Math.max(0.005, (D[st] - 2 * rec - (n - 1) * gap) / n);\n for (let i = 0; i < n; i++) {\n const p = [0, 0, 0], s = [0, 0, 0];\n p[ax] = sg * (D[ax] / 2 - rec - t / 2); p[st] = -D[st] / 2 + rec + (i + 0.5) * w + i * gap;\n s[ax] = t; s[run] = L; s[st] = w;\n p[1] += D[1] / 2;\n const q = addpoint(0, p);\n setpointattrib(0, 'scale', q, s);\n setpointattrib(0, 'tint', q, 0.82 + 0.3 * rand(ax * 2 + sg, i, seed));\n }\n}"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"frame_pts": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"note": "12 edge battens: vertical posts full height, horizontal battens between them",
|
|
37
37
|
"params": {
|
|
38
38
|
"run_over": "detail",
|
|
39
|
-
"code": "const D = [
|
|
39
|
+
"code": "const D = [width, height, depth], fw = Math.min(frame_width, Math.min(...D) / 3);\nfor (const a of [0, 1, 2]) {\n const b = (a + 1) % 3, c = (a + 2) % 3;\n for (const sb of [-1, 1]) for (const sc of [-1, 1]) {\n const p = [0, 0, 0], s = [fw, fw, fw];\n p[b] = sb * (D[b] - fw) / 2; p[c] = sc * (D[c] - fw) / 2;\n s[a] = a === 1 ? D[a] : D[a] - 2 * fw;\n p[1] += D[1] / 2;\n const q = addpoint(0, p);\n setpointattrib(0, 'scale', q, s);\n setpointattrib(0, 'tint', q, 1);\n }\n}"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"unit": { "type": "box" },
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"out": { "type": "attrib_delete", "in": ["paint"], "params": { "names": "tint copynum" } }
|
|
76
76
|
},
|
|
77
77
|
"output": "out",
|
|
78
|
+
"outputs": { "crate": { "node": "out", "label": "Crate", "kind": "mesh", "tags": ["crate", "container", "wooden", "prop"] } },
|
|
78
79
|
"meta": {
|
|
79
|
-
"shelf_group": "props",
|
|
80
80
|
"watertight": true,
|
|
81
81
|
"thumbnail_render": { "azimuth": 35, "elevation": 25 }
|
|
82
82
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "TopoTopo's props package, its 5 outputs side by side at their defaults. The package's default output and its preview, from barrel to sandbag_wall along +X, 1 m apart.",
|
|
3
|
+
"nodes": {
|
|
4
|
+
"barrel": {"type":"topotopo/props/barrel"},
|
|
5
|
+
"barrel_at": {"type":"transform","in":["barrel"],"params":{"translate":[0.323,0,0]}},
|
|
6
|
+
"crate": {"type":"topotopo/props/crate"},
|
|
7
|
+
"crate_at": {"type":"transform","in":["crate"],"params":{"translate":[2.146,0,0]}},
|
|
8
|
+
"pallet": {"type":"topotopo/props/pallet"},
|
|
9
|
+
"pallet_at": {"type":"transform","in":["pallet"],"params":{"translate":[4.246,0,0]}},
|
|
10
|
+
"pipe_run": {"type":"topotopo/props/pipe_run"},
|
|
11
|
+
"pipe_run_at": {"type":"transform","in":["pipe_run"],"params":{"translate":[5.846,0,0]}},
|
|
12
|
+
"sandbag_wall": {"type":"topotopo/props/sandbag_wall"},
|
|
13
|
+
"sandbag_wall_at": {"type":"transform","in":["sandbag_wall"],"params":{"translate":[13.349,0,0]}},
|
|
14
|
+
"lineup": {"type":"merge","in":["barrel_at","crate_at","pallet_at","pipe_run_at","sandbag_wall_at"]}
|
|
15
|
+
},
|
|
16
|
+
"output": "lineup",
|
|
17
|
+
"outputs": {"lineup":{"node":"lineup","label":"Props line-up","kind":"mesh","tags":["lineup","props"]}}
|
|
18
|
+
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"note": "bottom boards (3, along X), cross boards (3, along Z) on the blocks, deck boards (along X)",
|
|
38
38
|
"params": {
|
|
39
39
|
"run_over": "detail",
|
|
40
|
-
"code": "const W =
|
|
40
|
+
"code": "const W = width, D = depth, t = board_thickness, bh = block_height, bw = 0.1, bx = 0.145;\nconst add = (p, s, k) => { const q = addpoint(0, p); setpointattrib(0, 'scale', q, s); setpointattrib(0, 'tint', q, 0.85 + 0.25 * rand(k, seed)); };\nconst zs = [-D / 2 + bw / 2, 0, D / 2 - bw / 2], xs = [-W / 2 + bx / 2, 0, W / 2 - bx / 2];\nzs.forEach((z, i) => add([0, t / 2, z], [W, t, bw], i));\nxs.forEach((x, i) => add([x, t + bh + t / 2, 0], [bx, t, D], 10 + i));\nconst n = Math.max(2, Math.round(deck_boards)), dw = Math.min(0.145, D / n * 0.85), gap = (D - n * dw) / (n - 1);\nfor (let i = 0; i < n; i++) add([0, 2 * t + bh + t / 2, -D / 2 + dw / 2 + i * (dw + gap)], [W, t, dw], 20 + i);"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"block_pts": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"in": ["none"],
|
|
46
46
|
"params": {
|
|
47
47
|
"run_over": "detail",
|
|
48
|
-
"code": "const W =
|
|
48
|
+
"code": "const W = width, D = depth, t = board_thickness, bh = block_height, bw = 0.1, bx = 0.145;\nfor (const x of [-W / 2 + bx / 2, 0, W / 2 - bx / 2]) for (const z of [-D / 2 + bw / 2, 0, D / 2 - bw / 2]) {\n const q = addpoint(0, [x, t + bh / 2, z]); setpointattrib(0, 'scale', q, [bx, bh, bw]); setpointattrib(0, 'tint', q, 0.9 + 0.2 * rand(x, z, seed));\n}"
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"unit": { "type": "box" },
|
|
@@ -84,5 +84,6 @@
|
|
|
84
84
|
"out": { "type": "attrib_delete", "in": ["paint"], "params": { "names": "tint copynum" } }
|
|
85
85
|
},
|
|
86
86
|
"output": "out",
|
|
87
|
-
"
|
|
87
|
+
"outputs": { "pallet": { "node": "out", "label": "Pallet", "kind": "mesh", "tags": ["pallet", "warehouse", "wooden", "prop"] } },
|
|
88
|
+
"meta": { "watertight": true, "thumbnail_render": { "elevation": 30 } }
|
|
88
89
|
}
|