navara-add-example
Adding a navara_three example
First read .claude/skills/navara-usage/SKILL.md (and the reference file matching your example's topic) for correct API usage. The canonical process doc is web/navara_three/example/README.md — follow it for process (directories, dev server, screenshots). For code style, prefer this skill's boilerplate: the README's code template predates the current conventions (it uses addDefaultAtmosphereLayers() and inline data instead of DefaultPlugin + source/layer split).
Philosophy (from README — enforced in review)
"Don't hide our API inside abstractions in the example"
- Call
view.addLayer(),layer.on("featureUpdated", ...),layer.update()directly — no wrapper functions that obscure API calls. - One example = one feature. Don't combine unrelated features.
Two example tracks — and who decides what goes where
-
Dev/demo examples (the default track):
pages/<name>/(URL/<name>) orpages/<category>/<name>/(URL/<category>-<name>). Existing category dirs:styling/,terrain/,plugins/,use-cases/,debug/,mesh-layers/, or root (uncategorized). A directory only acts as a category when it has nomain.tsof its own (seevite.config.example.ts) — e.g.pages/atmosphere/andpages/camera/are single examples, not categories, and the README'sbasic//effects/categories don't exist yet. New examples — including anything for development or debugging — go here. -
Curated gallery:
pages/examples/<section>/<name>/with ameta.tsnext tomain.ts.The gallery is curated, not exhaustive. Pages under
pages/examples/require design approval and are planned against the gallery's overall design. Never add a page there for development/debug purposes, and never add one proactively "for coverage" the way docs pages are added — only add a gallery example when explicitly asked to, with the placement already decided.Sections and the
ExampleMetatype are declared inpages/examples/sections.ts(getting-started,2d,2.5d,3d,basemap,terrain,source,styling,interaction,lighting-effect).meta.tsshape: