API by package

create-threenative API

Every public function and class in create-threenative. Scaffold a readable ThreeNative game project.

On this page

Generated from the engine's capability manifest: 1 function. Each entry is the exported signature, what it is for, and a working example. Start with the package overview.

threenative inspect

function · src/inspect.ts

One command for the glb, manifest and screenshot checks agents otherwise write 120 ad-hoc scripts for.

ts
threenative inspect <file.glb> | --manifest [--project <dir>] | --frame <image.png> [--sample role:u,v ...] [--json]

Use it to

  • check that a baked glb stands on the floor (minY is 0)
  • count the triangles and list the material names of a glb
  • read the asset extras (tnOrigin procedural) of a glb
  • audit the assets folder against public/assets.manifest.json
  • find leftover zip downloads and duplicate asset files
  • check that a screenshot is not blank or black and read the colour at a point

Example

ts
threenative inspect assets/car.glb --json && threenative inspect --manifest && threenative inspect --frame shot.png --sample hero:0.5,0.6

Good to know

  • Read-only: it never modifies an asset, a manifest or an image.
  • --manifest and --frame exit 1 on a finding; --frame reads non-interlaced 8-bit PNG only.
  • A .zip left in assets/ or an asset with no manifest entry fails --manifest; an assets.exclude match shows as unlisted.
View source on GitHub ↗