const DefaultParams
DefaultParams is the canonical form of the defaults; it renders exactly like "".
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package cantiere (v2, "Kasaba Dili") is a Sinopia engine: an isometric maquette of an imaginary town on a drafting sh...
Package cantiere (v2, "Kasaba Dili") is a Sinopia engine: an isometric maquette of an imaginary town on a drafting sheet, built from a vocabulary of architectural elements — gabled houses, crenellated towers, domes, a bell tower, arcades, gardens with cypresses, a square with a fountain and building sites in red scaffolding — on six plans (Hill Town, Terraces, Courtyard, Coast, Citadel, Ruin), in six materials and four lights. The title block of the sheet carries the token number ("TAV. 42").
It is the successor of Cantiere v1 (p/.../art/cantiere/v1, which stays untouched): the same FNV-1a + splitmix64 streams, a new town. Three streams: seed+"|traits" (the trait draws), seed+"|town" (the 6 x 6 parcel plan, which Traits reads too, so Landmark and Tallest come without rendering) and seed+"|art" (colours and details). frontend/src/engines/cantierev2.ts is a byte-identical TypeScript twin; cantiere_test.gno pins golden vectors that the twin asserts too.
The art reads Input.TokenID (the title block). It never reads heights or moves, so the engine is not living. Pure integer maths: every division is a floor division (fdiv), as in the twin.
DefaultParams is the canonical form of the defaults; it renders exactly like "".
MaxSVGBytes: the largest output over 10,000 default seeds is about 22 KB (docs/engines/cantiere-v2.md); the 28 KB budget.
1const ParamsSchema = `{"type":"object","properties":{` +
2 `"plan":{"type":"string","title":"Plan","enum":["Seeded","Hill Town","Terraces","Courtyard","Coast","Citadel","Ruin"],"default":"Seeded"},` +
3 `"material":{"type":"string","title":"Material","enum":["Seeded","Tufa","Brick","Travertine","Painted Plaster","Whitewash","Basalt"],"default":"Seeded"},` +
4 `"light":{"type":"string","title":"Light","enum":["Seeded","Morning","Noon","Evening","Night"],"default":"Seeded"}}}`ParamsSchema is the Studio form. Studio sends JSON.stringify of the values in this property order; ValidateParams accepts exactly that or "".
Manifest describes the engine. Author and FeeBps are set by the adapter.
Render returns the raw SVG for in.Seed, in.Params and in.TokenID.
SVG renders the artwork for a seed, a config and a token id.
TavNumber is the sheet number in the title block: TokenID read as a decimal, modulo 100,000 (core's supply cap is 10,000). Anything but ASCII digits is 0, which prints "PROVA" (a proof; Studio renders use "0").
TraitString is "Type=Value;…" in TraitTypes order (the golden-vector form shared with the TypeScript twin).
Traits returns the eight traits of in.Seed in TraitTypes order. It never renders: six draws and the 36-parcel town plan.
ValidateParams accepts "" (the showcase defaults) and the canonical JSON.
Defaults is the showcase look (params "").
ParseParams accepts "" or the canonical JSON Studio produces, nothing else.
TraitsOf returns the decoded traits of a seed under cfg.
Config is a parsed params string; -1 means drawn from the seed.
TraitSet is the decoded traits of a seed; the SVG and the trait list both read it, so picture and metadata cannot disagree.