@tora-editor/tora 0.1.0 → 0.2.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/README.md +108 -58
- package/assets/free-audio/arcade-pop/audio/loss.wav +0 -0
- package/assets/free-audio/arcade-pop/audio/reward.wav +0 -0
- package/assets/free-audio/arcade-pop/audio/win.wav +0 -0
- package/assets/free-audio/arcade-pop/source/INFO.txt +11 -11
- package/assets/kenney-food-starter/License.txt +28 -0
- package/assets/kenney-food-starter/burger.glb +0 -0
- package/assets/kenney-food-starter/frying-pan.glb +0 -0
- package/assets/kenney-food-starter/plan.json +61 -0
- package/assets/kenney-food-starter/plate.glb +0 -0
- package/assets/kenney-food-starter/pot.glb +0 -0
- package/assets/kenney-harvest/audio/victory.wav +0 -0
- package/assets/kenney-harvest/source/music-jingles/OGG/jingles_NES/jingles_NES03.ogg +0 -0
- package/assets/kenney-harvest/source/music-jingles/OGG/jingles_PIZZA/jingles_PIZZA03.ogg +0 -0
- package/assets/kenney-harvest/source/music-jingles/license.txt +14 -0
- package/bin/tora.mjs +77 -9
- package/crates/packer/trusted/native-3d-meta.json +3 -2
- package/crates/packer/trusted/native-3d.js +181 -181
- package/crates/packer/trusted/native-meta.json +2 -2
- package/crates/packer/trusted/native.js +5 -5
- package/crates/packer/trusted/release-manifest.json +17 -17
- package/crates/packer/trusted/review-runtime-meta.json +3 -2
- package/crates/packer/trusted/review-runtime.js +182 -182
- package/docs/TORA_AGENT_SETUP.md +24 -13
- package/docs/TORA_CREATION_API.md +29 -12
- package/docs/reference/CORE_AUTHORING.md +2 -1
- package/docs/reference/PLAYABLE_STARTERS.md +20 -0
- package/docs/reference/packs/3d.md +9 -3
- package/network-rules/mintegral-appgrowth-single-html.json +10 -10
- package/package.json +6 -6
- package/packages/creative-project/project-v21.schema.json +264 -8
- package/scripts/lean/editor/review-editor.css +10 -0
- package/scripts/lean/editor/review-editor.js +117 -1
- package/scripts/lean/native/agent-tools.mjs +7 -7
- package/scripts/lean/native/api.mjs +16 -5
- package/scripts/lean/native/asset-catalog.mjs +7 -6
- package/scripts/lean/native/asset-lineage.mjs +54 -0
- package/scripts/lean/native/asset-prep.mjs +173 -40
- package/scripts/lean/native/assets.mjs +107 -11
- package/scripts/lean/native/author-expansion-proofs.mjs +2 -99
- package/scripts/lean/native/author-fps.mjs +545 -0
- package/scripts/lean/native/author-primitive-proofs.mjs +5 -4
- package/scripts/lean/native/build-cache.mjs +2 -2
- package/scripts/lean/native/cc0-inputs.mjs +24 -0
- package/scripts/lean/native/cc0-staging.mjs +28 -8
- package/scripts/lean/native/check-harvest-outcome-audio.mjs +7 -8
- package/scripts/lean/native/check-salvage.mjs +8 -5
- package/scripts/lean/native/compiler.mjs +9 -3
- package/scripts/lean/native/contracts.mjs +11 -8
- package/scripts/lean/native/creative-qa.mjs +305 -122
- package/scripts/lean/native/demos.mjs +47 -3
- package/scripts/lean/native/document.mjs +36 -10
- package/scripts/lean/native/export-budget.mjs +75 -0
- package/scripts/lean/native/glb-loader.mjs +468 -0
- package/scripts/lean/native/intake-creator-tools.mjs +83 -30
- package/scripts/lean/native/local-bundle.mjs +5 -3
- package/scripts/lean/native/mcp-server.mjs +33 -46
- package/scripts/lean/native/media-validate.mjs +124 -0
- package/scripts/lean/native/native-bin.mjs +3 -3
- package/scripts/lean/native/outcome-playthrough.mjs +97 -0
- package/scripts/lean/native/prepare-fps-assets.mjs +330 -0
- package/scripts/lean/native/project-bundle.mjs +3 -3
- package/scripts/lean/native/remote-cc0-fetcher.mjs +403 -197
- package/scripts/lean/native/review-agent-tools.mjs +2 -2
- package/scripts/lean/native/review.mjs +3 -0
- package/scripts/lean/native/runtime.mjs +242 -56
- package/scripts/lean/native/schema.mjs +7 -5
- package/scripts/lean/native/service.mjs +159 -32
- package/scripts/lean/native/stage-3d.mjs +343 -40
- package/scripts/lean/native/starters.mjs +436 -0
- package/scripts/lean/native/verify.mjs +1 -1
- package/scripts/lean/native/win-cues.mjs +96 -0
- package/skills/tora-playables/SKILL.md +1 -1
package/docs/TORA_AGENT_SETUP.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tora Agent & MCP Setup
|
|
2
2
|
|
|
3
|
-
Connect Tora once via local MCP, then describe the playable ad you want using your existing AI coding
|
|
3
|
+
Connect Tora once via local MCP, then describe the playable ad you want using your existing AI coding client (**Perch**, **Claude Code**, **Cursor**, **OpenAI Codex**, or **Gemini CLI**) without buying a separate Tora API key. The integration supplies Tora's production briefs, deterministic authoring tools, non-destructive asset optimization, 4-viewport Creative QA, and seven free ad-network exporters.
|
|
4
4
|
|
|
5
5
|
## 1. Zero-Rust CLI Setup (or Local Source Setup)
|
|
6
6
|
|
|
@@ -9,11 +9,11 @@ Connect Tora once via local MCP, then describe the playable ad you want using yo
|
|
|
9
9
|
From your game workspace (Node `>= 22` only):
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx @tora-editor/tora init --client cursor # or claude-code | codex | gemini | all | print
|
|
12
|
+
npx @tora-editor/tora init --client cursor # or perch | claude-code | codex | gemini | all | print
|
|
13
13
|
npx @tora-editor/tora doctor # verify Node, prebuilt native binary, Chromium & workspace
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
`tora init` resolves or downloads the SHA-256-verified prebuilt `playable` binary, ensures Playwright Chromium is installed, and
|
|
16
|
+
`tora init` resolves or downloads the SHA-256-verified prebuilt `playable` binary, ensures Playwright Chromium is installed, and merges Tora into your client's tool configuration. Use `--dry-run` to preview edits without modifying files.
|
|
17
17
|
|
|
18
18
|
### From a Source Checkout
|
|
19
19
|
|
|
@@ -30,6 +30,16 @@ npm run setup
|
|
|
30
30
|
|
|
31
31
|
Use `tora init --client <client>` above, or add the single `tora mcp` command manually:
|
|
32
32
|
|
|
33
|
+
### Perch
|
|
34
|
+
|
|
35
|
+
Run this once in the folder you want Perch to use for your playable.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx @tora-editor/tora init --client perch
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Setup verifies the Tora brief and capabilities and adds the tool connection to `.perch/mcp.json`. Reopen Perch in that folder and describe the playable you want. Choose your model in the Perch composer. Perch may ask you to approve local workspace writes, depending on its permission mode. Perch launches the installed package directly through Node. If you remove that installation or clear the npm execution cache, rerun setup in the same folder.
|
|
42
|
+
|
|
33
43
|
### Generic MCP (`mcpServers` — Cursor, Claude Desktop, Windsurf, Gemini CLI)
|
|
34
44
|
|
|
35
45
|
```json
|
|
@@ -79,25 +89,26 @@ The connected client discovers exact argument schemas via MCP `tools/list`.
|
|
|
79
89
|
| `tora_brief` | Load production instructions, playable brief, win/CTA guidance, and API docs. Pass `alreadyRead: [{ name, sha256 }]` from `digests` on re-reads to omit unchanged docs |
|
|
80
90
|
| `tora_capabilities` | Discover supported 2D/3D visual, behavior, event, action, and concept contracts (`summary: true` index, `packs` + `format: "compact"` for compact unit-bearing schemas) |
|
|
81
91
|
| `tora_create` | Create an empty editable native project |
|
|
92
|
+
| `tora_starters` / `tora_compose_starter` | Discover starters and build an editable draft. Set `deliver: true` to save HTML, project bundle and QA evidence together. |
|
|
82
93
|
| `tora_compose` | Compile a structured creative concept and prepared assets into an editable playable |
|
|
83
94
|
| `tora_inspect` | Read project state, compact scene outline (`tree: true`, optional `sceneId`), records, dependencies, and revision identity |
|
|
84
95
|
| `tora_edit` | Preview and atomically commit scoped operations against the expected revision (`scopeCreates: true` for reference-safe new records; `commitPreviewDigest` to commit cached previews without re-sending `operations`) |
|
|
85
|
-
| `tora_list_assets` | Search verified local & cached remote CC0
|
|
86
|
-
| `tora_fetch_cc0_pack` | Download,
|
|
87
|
-
| `tora_stage_cc0_assets` | Atomically stage up to 32 verified local/cached CC0 assets
|
|
88
|
-
| `tora_prep_assets` |
|
|
89
|
-
| `tora_upload_asset` | Upload raw PNG/JPEG/WAV/MP3 up to 8 MiB with rights metadata and automatic non-destructive optimization
|
|
90
|
-
| `tora_upload_assets` | Batch upload and optimize up to 32 assets in one atomic revision (prefer workspace `filePath` to avoid the 12 MiB MCP frame limit;
|
|
96
|
+
| `tora_list_assets` | Search verified local & cached remote CC0 sprites, audio, and meshes with dimensions, 3D facts, and style families (`includeRemote: true` searches allowlisted Kenney, Quaternius, and CC0-filtered OpenGameArt packs) |
|
|
97
|
+
| `tora_fetch_cc0_pack` | Download from an allowed origin, verify CC0, and cache optimized 2D/audio up to 8,000,000 bytes or GLB/glTF/OBJ up to 32,000,000 bytes in `.tora/remote-asset-cache`. Supports `fileFilters`, `kind`, texture/triangle/byte targets, `pivotMode:"origin"\|"center"\|"bottom-center"`, and per-model skip diagnostics. External-only Quaternius downloads return manual workspace-import guidance |
|
|
98
|
+
| `tora_stage_cc0_assets` | Atomically stage up to 32 verified local/cached CC0 assets with provenance, retained 3D masters, optional per-item texture/triangle overrides, and single visual style family enforcement |
|
|
99
|
+
| `tora_prep_assets` | Prepare PNG/JPEG mechanically (`crop`, `trim`, `resize`/`maxSide`, `sliceGrid`) or directory-based OBJ/glTF/GLB through `prep-3d` into `.tora/prepared-assets` with hash-bound provenance, dependency manifests, and lossless 3D masters. Use the returned `subNodes` for named parts and `animations` to select `animate-3d` clips |
|
|
100
|
+
| `tora_upload_asset` | Upload raw PNG/JPEG/WAV/MP3 up to 8 MB or workspace GLB/glTF/OBJ up to 32 MiB with rights metadata and automatic non-destructive optimization. Supports `useOriginal`, `sourceHash`, prepared provenance, texture/triangle overrides, and `pivotMode:"origin"\|"center"\|"bottom-center"` via prep |
|
|
101
|
+
| `tora_upload_assets` | Batch upload and optimize up to 32 assets in one atomic revision (prefer workspace `filePath` to avoid the 12 MiB MCP frame limit; preserves prepared provenance, dependency lineage, and `styleFamily`) |
|
|
91
102
|
| `tora_render` | Write an editable HTML scene preview artifact for visual inspection |
|
|
92
|
-
| `tora_qa` | Run static, acoustic, 4-viewport layout, primary-interaction, and post-SLA motion filmstrip QA (`screenshots/filmstrip-interaction.png` + real-play `filmstrip-end-card.png`; opt-in `recordVideo: true` writes `screenshots/gameplay.webm`) |
|
|
93
|
-
| `tora_export` | Write standalone HTML, any of seven ad-network HTML/ZIP artifacts, a multi-network batch (`targets: [...]`, `outputDir`), or a `.tora.json` project bundle. Google/Mintegral/TikTok write deterministic ZIPs |
|
|
103
|
+
| `tora_qa` | Run static, acoustic, 4-viewport layout, primary-interaction, and post-SLA motion filmstrip QA (`screenshots/filmstrip-interaction.png` + real-play `filmstrip-end-card.png`; opt-in `recordVideo: true` writes `screenshots/gameplay.webm`; `fitTargetBudget:true` verifies a fitted export variant) |
|
|
104
|
+
| `tora_export` | Write standalone HTML, any of seven ad-network HTML/ZIP artifacts, a multi-network batch (`targets: [...]`, `outputDir`), or a `.tora.json` project bundle. Google/Mintegral/TikTok write deterministic ZIPs. `fitTargetBudget:true` deterministically re-optimizes referenced media from retained masters without mutating the stored revision |
|
|
94
105
|
| `tora_history` | Save, undo, or redo project revisions |
|
|
95
106
|
| `tora_review_*` / `tora_intake_*` | Claim and resolve visual review notes or studio intake briefs from the local editor |
|
|
96
107
|
|
|
97
108
|
### Fast Token-Saving Workflow
|
|
98
109
|
|
|
99
110
|
1. **Discover cheaply:** `tora_brief({})` once (save `digests` for `alreadyRead` on re-reads), `tora_capabilities({ summary: true })`, then `tora_capabilities({ packs: [...], format: "compact" })`.
|
|
100
|
-
2. **Source, prep & batch assets:** Use `tora_list_assets` / `tora_fetch_cc0_pack` + `tora_stage_cc0_assets` for verified CC0 packs (single visual style family enforced), or run `tora_prep_assets` (`trim` / `crop` / `resize` / `sliceGrid`) followed by `tora_upload_assets` (automatically preserving hash-bound provenance and `styleFamily`).
|
|
111
|
+
2. **Source, prep & batch assets:** Use `tora_list_assets` / `tora_fetch_cc0_pack` + `tora_stage_cc0_assets` for verified CC0 2D/3D/audio packs (single visual style family enforced), or run `tora_prep_assets` (`trim` / `crop` / `resize` / `sliceGrid`, or `prep-3d` for model bundles) followed by `tora_upload_assets` (automatically preserving hash-bound provenance, dependency lineage, and `styleFamily`).
|
|
101
112
|
3. **Inspect & edit leanly:** Use `tora_inspect({ id, tree: true })` before targeted `ids` reads; use `tora_edit` with `scopeCreates: true` (existing targets still require explicit `scope`) and `commitPreviewDigest` when committing a reviewed `PREVIEW`.
|
|
102
113
|
4. **Triage motion & layout, then inspect full-size:** Use `screenshots/contact-sheet.png` and `screenshots/filmstrip-interaction.png` (plus opt-in `recordVideo: true` → `screenshots/gameplay.webm`) to inspect layout, animation, and particle payoff mid-build, then inspect the individual full-size viewport PNGs and real playback before final delivery.
|
|
103
114
|
5. **Batch export:** `tora_export({ id, targets: [...], outputDir })` compiles targets in parallel, reuses verified QA receipts where unchanged (note: cached passes are shared across MCP/HTTP/intake keyed by artifact, checker, and Playwright/Chromium version, so a borderline 150 ms timing pass remains cached until the artifact, checker, browser version, or stored screenshots change), runs Creative QA serially for every target before writing any files, and then writes all artifacts atomically.
|
|
@@ -115,7 +126,7 @@ npm run dev:editor
|
|
|
115
126
|
```
|
|
116
127
|
|
|
117
128
|
Open `http://127.0.0.1:8001/?view=new` (configurable via `EDITOR_PORT`) to:
|
|
118
|
-
- Inspect and play
|
|
129
|
+
- Inspect and play all four showcase demos (*Tiny Harvest*, *Traffic Tycoon*, *Mini Golf 3D*, *Sky Blaster 3D*) when running from a source checkout. Lean npm installations omit demo packs and hide unavailable demo actions.
|
|
119
130
|
- Drop in assets and create `$0` MCP handoff briefs, or optionally connect a verified BYOK API key (Google Gemini, OpenAI, or Anthropic Claude) for in-browser builds and visual revision notes.
|
|
120
131
|
- Export standalone drafts plus Unity Ads, AppLovin, Meta, Google Ads, ironSource / LevelPlay, Mintegral, and TikTok builds.
|
|
121
132
|
|
|
@@ -42,21 +42,28 @@ but human speaker/headphone audition and creative suitability remain separate.
|
|
|
42
42
|
|
|
43
43
|
The BYOK creator uses the same validated transaction and media pipeline. Its three
|
|
44
44
|
asset-source modes are enforced server-side: uploads only, uploads plus verified
|
|
45
|
-
CC0, or verified CC0 only. The local catalog records dimensions/durations,
|
|
46
|
-
families, hashes, authors, source URLs, and license evidence.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
CC0, or verified CC0 only. The local catalog records dimensions/durations, 3D
|
|
46
|
+
mesh facts, style families, hashes, authors, source URLs, and license evidence.
|
|
47
|
+
Discovery searches Kenney, Quaternius, and CC0-filtered OpenGameArt. Automatic
|
|
48
|
+
3D fetching was verified with Kenney and OpenGameArt. The fetcher checks that the download
|
|
49
|
+
and each redirect use HTTPS and an allowed origin with public DNS. It applies
|
|
50
|
+
streaming and ZIP limits and stores normalized media with immutable v2 receipts
|
|
51
|
+
under `.tora/remote-asset-cache/`. Each file and model dependency must pass the
|
|
52
|
+
license checks in its nearest directory scope. Same-directory license conflicts
|
|
53
|
+
fail closed. Each 3D preparation variant has a distinct stageable ID and a
|
|
54
|
+
retained lossless master. The receipt records skipped models and their causes.
|
|
55
|
+
Quaternius pages that only expose an external drive return structured
|
|
56
|
+
manual-download guidance. Connectivity failures return local and cached matches.
|
|
57
|
+
Downloads with unverifiable license evidence are rejected. A build is capped at
|
|
58
|
+
12 model turns and four minutes, supports cancellation and retry, and persists
|
|
59
|
+
progress in the intake's `build.json`. Provider use remains billable to the
|
|
60
|
+
creator's connected key.
|
|
54
61
|
|
|
55
62
|
## HTTP boundary
|
|
56
63
|
|
|
57
64
|
Mutations require the exact local Origin and Host, `Content-Type: application/json`,
|
|
58
65
|
and a body no larger than 1 MiB, except project/intake asset uploads, which allow
|
|
59
|
-
12 MiB to carry an 8
|
|
66
|
+
12 MiB to carry an 8 MB raw file in base64 JSON. IDs are local identifiers, never filesystem paths.
|
|
60
67
|
Project IDs use lowercase letters, digits, and hyphens, start with a letter, and
|
|
61
68
|
contain 2–48 characters. Object/record IDs permit lowercase letters, digits,
|
|
62
69
|
underscores, dots, and hyphens, start with a letter, and contain at most 96 characters.
|
|
@@ -70,16 +77,22 @@ underscores, dots, and hyphens, start with a letter, and contain at most 96 char
|
|
|
70
77
|
| `GET /api/creation/capabilities` | Registered visual/behavior contracts, typed defaults, constraints, units, operations, limits, conditions, and actual targets |
|
|
71
78
|
| `POST /api/projects` | `{id,name,kind:"native-scene",androidUrl?}` → empty default scene and working revision |
|
|
72
79
|
| `GET /api/projects` | Valid projects, kind, and native working revision |
|
|
80
|
+
| `GET /api/assets/catalog` | Search verified local/cached assets and optionally live CC0 providers with `query`, `kind`, `styleFamily`, `includeRemote`, and `limit` |
|
|
81
|
+
| `POST /api/assets/fetch-cc0` | Fetch a verified CC0 pack with `sourceUrl`, optional `fileFilter`/`fileFilters`, `kind`, 3D optimization options (`targetTriangles`, texture/byte targets, pivot/up-axis, preservation flags), and `maxFiles`; full parity with `tora_fetch_cc0_pack` |
|
|
82
|
+
| `POST /api/assets/prep` | Prepare one or more workspace image/model items through the same hash-bound pipeline as `tora_prep_assets` |
|
|
83
|
+
| `POST /api/projects/:id/stage-cc0` | `{expected,items}` stages verified assets atomically with optional per-item 3D overrides and retained-master lineage |
|
|
84
|
+
| `GET /api/demos` | List only demos whose source assets are installed or whose projects are already materialized; lean npm installs return `{demos:[]}` |
|
|
85
|
+
| `POST /api/demos/open` | Materialize an available demo, or return `422 E_DEMO_ASSETS_UNAVAILABLE` when its source pack is absent |
|
|
73
86
|
| `GET /api/projects/:id?revision=ID` | Chosen immutable revision, or the working head when the query is absent |
|
|
74
87
|
| `POST /api/projects/:id/transactions/preview` | Validate a transaction; return its digest, affected records, dependencies, asset references, and warnings |
|
|
75
88
|
| `POST /api/projects/:id/transactions` | Build and atomically commit the exact previewed transaction |
|
|
76
89
|
| `POST /api/projects/:id/history` | `{expected:{revisionId,contentHash},action:"save"\|"undo"\|"redo"}` |
|
|
77
90
|
| `POST /api/projects/:id/accept` | Explicit `{revisionId,contentHash}` approval; no automatic acceptance |
|
|
78
|
-
| `POST /api/projects/:id/export` | Explicit `{revisionId,target}` for standalone or any of the seven network profiles → HTML and manifest, plus `archiveBase64`/`archiveFilename` for ZIP targets |
|
|
91
|
+
| `POST /api/projects/:id/export` | Explicit `{revisionId,target,fitTargetBudget?}` for standalone or any of the seven network profiles → HTML and manifest (with byte budget ledger and delivered `assetHashes`), plus `archiveBase64`/`archiveFilename` for ZIP targets. Set `fitTargetBudget:true` to opt in to deterministic export-time fitting without mutating stored revisions |
|
|
79
92
|
| `POST /api/review-intakes/:id/submit` | `{}` or `{mode:"auto"\|"byok"\|"mcp"}`. A verified Gemini/OpenAI/Anthropic connection starts an asynchronous BYOK build; otherwise the existing `$0` MCP handoff is queued. |
|
|
80
93
|
| `POST /api/review-intakes/:id/cancel` | `{}` aborts the active BYOK build and preserves its uploads and partial draft. |
|
|
81
94
|
| `POST /api/review-intakes/:id/retry` | `{}` resumes a failed/cancelled BYOK build without re-uploading assets. |
|
|
82
|
-
| `POST /api/projects/:id/assets` | `{expected,asset:{id,mime,data,rights,optimize?,preserveResolution?}}`; raw base64 up to 8 MiB, non-destructive optimization, real delivery decode validation, then one revision.
|
|
95
|
+
| `POST /api/projects/:id/assets` | `{expected,asset:{id,mime,data,rights,optimize?,preserveResolution?,maxTextureSide?,preserveGeometry?,targetTriangles?,useOriginal?}}` or batch `{expected,assets:[...]}`; raw base64 up to 8 MB (local MCP `filePath` supports up to 32 MiB for `.glb`/`.gltf`/`.obj`), non-destructive optimization, per-revision lineage tracking, real delivery decode validation, then one revision. `useOriginal:true` or a retained `sourceHash` may replace `data` when re-optimizing an existing asset |
|
|
83
96
|
| `GET /api/projects/:id/assets/:assetId` | Asset hash, MIME, byte count, rights declaration, and provenance |
|
|
84
97
|
| `GET /api/projects/:id/render?revision=ID` | Verified, lowered asset bytes and artifact identity for editor rendering |
|
|
85
98
|
|
|
@@ -246,6 +259,10 @@ the existing `.tora/editor-state` service, not a rescue-specific save directory.
|
|
|
246
259
|
| Path nodes / edges / agents per network document | 64 / 128 / 64 |
|
|
247
260
|
| Processed events / actions per frame | 256 / 1,024 |
|
|
248
261
|
| Raw image/audio upload / optimized delivery asset | 8,000,000 / 700,000 bytes |
|
|
262
|
+
| Raw 3D model upload / optimized delivery asset | 32 MiB via workspace `filePath` / 700,000 bytes |
|
|
263
|
+
| 3D automatic soft target / explicit byte target | 250,000 / 4,096–700,000 bytes |
|
|
264
|
+
| 3D triangle target / texture delivery cap | 32–50,000 / 16–1,024 px per side |
|
|
265
|
+
| 3D skins / joints per skin / animation clips | 4 / 64 / 16 (`LINEAR` or `STEP`) |
|
|
249
266
|
| Other individual assets (including Tora meshes) | 700,000 bytes |
|
|
250
267
|
|
|
251
268
|
The simulation uses a 1/60-second fixed step and at most five catch-up steps per
|
|
@@ -14,9 +14,10 @@ Native projects are editable Creative Project `2.1.0` documents running on `tora
|
|
|
14
14
|
|
|
15
15
|
- Native documents contain scenes, components, variables, gameplay behaviors, shared event sources, ordered event bindings, assets, and a store destination. Component transforms are local affine matrices; scene membership and world transforms are derived.
|
|
16
16
|
- Preview and commit enforce exact revision identity. Deleting shared records can remove dependent records; inspect `preview.effects` before commit.
|
|
17
|
-
- Creative QA checks static audio/text rules and exercises opening and primary input at `320×568`, `390×844`, `768×1024`, and `844×390`, with a 150 ms primary-response limit.
|
|
17
|
+
- Creative QA checks static audio/text rules and exercises opening and primary input at `320×568`, `390×844`, `768×1024`, and `844×390`, with a 150 ms primary-response limit. It follows normal inputs to declared end cards, checks the Store CTA in a mock host, and exercises declared timeouts from a fresh load. A manually selected scene or state hook provides layout evidence only.
|
|
18
18
|
- Standalone HTML is a draft. Unity Ads and AppLovin exports use host-injected MRAID and the pinned trusted runtime. Run `playable-cli artifact check` on each exact exported file; static success is not official network acceptance.
|
|
19
19
|
- Configure a real HTTPS Google Play or App Store destination before campaign use. Only a deliberate trusted CTA release may open the store. Audio starts muted until permitted interaction.
|
|
20
|
+
- Set optional `delaySeconds` (0–10 seconds) on `changeScene` to start a reveal delay from the event that executes it. The first delayed change in a scene stays scheduled through repeated input and is cleared by leaving the scene or restarting. Use a separate deadline timer for timeout.
|
|
20
21
|
- Replay resets runtime state without rewriting authored data. Runtime instances never enter authoring history.
|
|
21
22
|
|
|
22
23
|
## Domain pack index
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Start an editable Tora playable
|
|
2
|
+
|
|
3
|
+
Call `tora_brief`, then `tora_starters` to see the play styles. For a simple cooking brief, one call builds a complete editable draft with licensed burger models and audio, a win reveal, a timeout, and a Store CTA.
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"id": "burger-order",
|
|
8
|
+
"starter": "stack-and-serve",
|
|
9
|
+
"name": "Burger Order",
|
|
10
|
+
"deliver": true
|
|
11
|
+
}
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Pass that object to `tora_compose_starter`. For a tap-and-collect challenge, use `tap-targets` to start with four toy race cars arriving in different pit boxes. Choose a fresh ID for each project.
|
|
15
|
+
|
|
16
|
+
The starter can use a different palette (`background`, `surface`, `ink`, `accent` as six-digit hex colors), win or timeout title, or CTA label. Pass `durationSeconds` from 10 to 60 and `winHoldSeconds` from 0.25 to 3 to tune the timing. The win hold begins when the last goal is completed. Titles and CTA labels are up to three words and 24 characters. Headline and button text require a contrast ratio of at least 4.5:1 against their respective backgrounds.
|
|
17
|
+
|
|
18
|
+
The `art` and `audio` options accept asset IDs from Tora's verified CC0 local catalog or remote cache. Keep art in a single style family. The burger model must have the named nodes `bun-bottom`, `patty`, `cheese`, `salad`, `tomato`, and `bun-top`. The audio roles are `music`, `step`, `win`, and `loss`. Add the real Store URL via `androidUrl` when supplied with the brief.
|
|
19
|
+
|
|
20
|
+
With `deliver: true`, Tora saves the HTML, editable project bundle, and packaged QA evidence together in a new folder named after the project with a `-draft` suffix. Open the draft and review its gameplay, sound, and end cards. If you make further edits, run `tora_qa` with `recordVideo: true` and use `tora_export` to update your deliverables.
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
# 3D pack
|
|
2
2
|
|
|
3
|
-
`native.stage3d.v1` defines the WebGL stage, lighting, camera, and optional follow target. `native.mesh3d.v1` declares bounded primitive
|
|
3
|
+
`native.stage3d.v1` defines the WebGL stage, lighting, tone mapping (`none` | `neutral` | `aces`), shadows (`shadowsEnabled`, `shadowMapSize`), studio environment reflections (`envIntensity`), `renderMaxDim`, camera, and optional follow target. `native.mesh3d.v1` declares bounded primitive, retained `model/tora-mesh`, or canonical glTF 2.0 binary (`model/gltf-binary`, `primitive: 'model'`) geometry, transforms, material presentation, and lighting flags. Use the exact capability descriptors: some retained fields are specific to existing golf content.
|
|
4
|
+
|
|
5
|
+
For verified CC0 3D sourcing, use `tora_list_assets({kind:'mesh',includeRemote:true,query})`, then `tora_fetch_cc0_pack` with optional `fileFilter`/`fileFilters` and 3D preparation options, then `tora_stage_cc0_assets`. Kenney, Quaternius, and OpenGameArt are the only remote origins. Archive licenses are resolved by nearest ancestor directory for every model and dependency; prepared variants have distinct stageable IDs and retained masters. Quaternius discovery is supported, but packs that only link to an external drive return manual-download guidance for `tora_prep_assets` / `tora_upload_assets` instead of bypassing the origin allowlist.
|
|
6
|
+
|
|
7
|
+
For general 3D assets (`model/gltf-binary`), author multi-part textured `.obj`+`.mtl` or `.gltf`+`.bin` bundles through `tora_prep_assets` (`playable assets prep-3d`) to normalize units/pivots, preserve named nodes, emit a lossless `.master.glb`, and retain a dependency manifest, or upload standalone `.glb`/`.gltf`/`.obj` files up to 32 MiB via `filePath`. Pass optional `targetTriangles` for attribute-preserving QEM polygon reduction (auto-optimization also steps down geometry when needed for tight budgets). Set `primitive: 'model'` with `assetSlots: [{slotId: 'source', assetId}]` (and optional `texture`, `normalMap`, `emissiveMap` override slots), optional `subNode` to instantiate a preserved named part from a shared kit, `pivotMode` (`origin` | `center` | `bottom-center`), `normalizeSize`, `materialMode` (`asset` | `lambert` | `standard` | `unlit`), `overrideMaterialName`, `tintColor`, `roughnessScale`, `metalnessScale`, and `castShadow`/`receiveShadow`. For rigged/animated GLB models (up to 4 skins / 64 joints per skin, 16 `LINEAR`/`STEP` animation clips), attach `animate-3d` (`clipName`, `loop: 'repeat' | 'once' | 'pingpong'`, `speed`, `autoplay`, `fadeSeconds`), trigger clip transitions with `playModelAnimation`, and listen for `modelAnimationEnd`. Set `fitColliderFromModel: true` on `physics-3d` to auto-fit `radius`/`hx`/`hz` from the rendered model bounds. Pass `useOriginal: true` on re-upload to restore or re-optimize from the revision's retained master, and opt in to `fitTargetBudget: true` on `tora_export` / `tora_qa` to fit oversized projects to tight targets (such as Meta 2 MB) while verifying Creative QA against the exact delivered artifact hash.
|
|
4
8
|
|
|
5
9
|
`physics-3d` supplies bounded dynamic/static/kinematic movement. `aim-launch-3d` handles pullback or direct launch and trajectory display. `capture-zone-3d` performs speed/height-gated capture, and `oscillate-3d` moves a component sinusoidally. These are separate from 2D canvas physics and cannot be assumed interchangeable.
|
|
6
10
|
|
|
7
|
-
For
|
|
11
|
+
For a landing or impact, place a mesh origin at the contact point and attach an `emitter` with `origin: 'contact-3d'`, `coverage: 'local'`, and `shape: 'circle'` for crumbs or `shape: 'confetti'` for tumbling pieces. An invisible mesh can supply the point when the visible asset's pivot is elsewhere. Trigger `emit` when the pieces touch. The burst follows the 3D camera and respects depth and reduced motion. Speed and gravity use 100 authored units per world unit. Start with 12 particles, `speed: 145`, `gravity: 300`, `lifetime: 0.45`, and colors drawn from the artwork. Reserve screen-wide confetti for the outcome.
|
|
12
|
+
|
|
13
|
+
For first-person 3D shooters and turret/arena games, attach `fps-controller-3d` to a `native.stage3d.v1`. Bind a `virtual-joystick` to `aimJoystickBehaviorId` to steer camera yaw/pitch aiming directly: `aimMode: 'delta'` (default) provides direct 1:1 thumb/mouse aiming (like Sniper 3D / COD Mobile — aim rotates only while moving and stops immediately when held still, using `lookSensitivity`), while `aimMode: 'rate'` pans continuously at `aimTurnSpeed` rad/s. Use `minYaw`/`maxYaw` and `minPitch`/`maxPitch` to bound the firing arc, `moveSpeed: 0` for a fixed-position turret/sniper shooter, or bind `joystickBehaviorId` (or `moveXVariableId`/`moveYVariableId`) for camera-relative movement with OBB wall-sliding against static `physics-3d` boxes; `lookMode: 'drag'` also supports multi-touch drag-to-look. Set `attachToCamera: true` on `native.mesh3d.v1` nodes for first-person viewmodels. Use `spawnAt3d` to instantiate `mesh3d` prototypes — pass `fromComponentId` or `fromTeam` with local yaw-rotated `offsetX`/`offsetY`/`offsetZ` so projectiles emerge directly from a living, visible 3D actor's actual weapon muzzle (and never fire from dead/hidden actors or random world coordinates), `steer-3d` for enemy pursuit/strafe/patrol or 3D homing projectiles (`stopDistance <= 0.5`), and `raycast3d` (`mode: 'crosshair' | 'pointer'`, optional `targetTeam`) to fire hitscan shots that emit `raycastHit3d` (integrating with `instance-state` / `modifyInstanceState` / `instanceDepleted` / `despawn`) or `raycastMiss3d`, while static `physics-3d` walls occlude shots.
|
|
8
14
|
|
|
9
|
-
3D rendering uses the separately pinned trusted `native-3d` bundle and WebGL2.
|
|
15
|
+
3D rendering uses the separately pinned trusted `native-3d` bundle and WebGL2 with a strict glTF 2.0 binary profile (`KHR_mesh_quantization`, `KHR_materials_unlit`, `KHR_texture_transform`, `KHR_materials_emissive_strength`) decoded synchronously without `fetch`, `blob:`, `Worker`, or `WebAssembly`. Skeletal support is bounded to at most 4 skins, 64 joints per skin, and 16 `LINEAR`/`STEP` clips; custom shaders, embedded video, and unrestricted meshes are outside the profile. Keep geometry and effects bounded for mobile ad WebViews.
|
|
10
16
|
|
|
11
17
|
Verify actual WebGL output in every aspect ratio, including reduced motion, muted play, host suspend/resume, and fallback behavior. Inspect depth, silhouettes, camera framing, shadows, launch feedback, capture celebration, and Store CTA in packaged screenshots and footage. Static compilation does not establish rendering performance or device acceptance.
|
|
@@ -3,43 +3,43 @@
|
|
|
3
3
|
"profileId": "mintegral-appgrowth-single-html",
|
|
4
4
|
"networkId": "mintegral",
|
|
5
5
|
"channelId": "appgrowth-single-html",
|
|
6
|
-
"rulesVersion": "2026-
|
|
7
|
-
"reviewedAt": "2026-
|
|
6
|
+
"rulesVersion": "2026-11-29-review-1",
|
|
7
|
+
"reviewedAt": "2026-11-29",
|
|
8
8
|
"sources": [
|
|
9
9
|
{
|
|
10
10
|
"id": "assets",
|
|
11
11
|
"url": "https://helpcenter.mintegral.com/en/docs/asset-specs",
|
|
12
12
|
"title": "Mintegral AppGrowth asset specifications",
|
|
13
|
-
"checkedAt": "2026-
|
|
13
|
+
"checkedAt": "2026-11-29",
|
|
14
14
|
"notes": "Single HTML row and companion artwork documented."
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"id": "upload",
|
|
18
18
|
"url": "https://helpcenter.mintegral.com/en/docs/creative-guide-step-by-step/creative-review-process-guide",
|
|
19
19
|
"title": "Mintegral creative upload guide",
|
|
20
|
-
"checkedAt": "2026-
|
|
20
|
+
"checkedAt": "2026-11-29",
|
|
21
21
|
"notes": "Current guide still documents URL/ZIP upload; it does not verify the exact single-HTML submission path."
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"id": "preview",
|
|
25
25
|
"url": "https://helpcenter.mintegral.com/en/docs/playable-ad-guide",
|
|
26
26
|
"title": "Mintegral playable testing guide",
|
|
27
|
-
"checkedAt": "2026-
|
|
28
|
-
"notes": "Mindworks
|
|
27
|
+
"checkedAt": "2026-11-29",
|
|
28
|
+
"notes": "The Mindworks guide redirects to Playturbo. The public tester and its linked contract remain accessible."
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"id": "contract",
|
|
32
32
|
"url": "https://www.playturbo.com/_nuxt/doc/en-doc.86decc5.pdf",
|
|
33
33
|
"title": "Mindworks / Playturbo required playable test items",
|
|
34
|
-
"checkedAt": "2026-
|
|
35
|
-
"notes": "
|
|
34
|
+
"checkedAt": "2026-11-29",
|
|
35
|
+
"notes": "The live tester links this PDF. It documents install, gameReady, gameEnd, gameRetry, gameStart, gameClose and ZIP layout."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"id": "tester",
|
|
39
39
|
"url": "https://www.playturbo.com/review",
|
|
40
40
|
"title": "Live official Playturbo playable tester",
|
|
41
|
-
"checkedAt": "2026-
|
|
42
|
-
"notes": "
|
|
41
|
+
"checkedAt": "2026-11-29",
|
|
42
|
+
"notes": "Public ZIP tester is accessible. The prior exploratory probe encountered HTML validation errors and hosted-iframe timeouts. Acceptance of the engine artifact remains unverified."
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
45
|
"rules": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tora-editor/tora",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Local MCP-first 2D & 3D HTML5 playable ad engine with Creative QA and 7 ad-network exporters.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"playwright": "1.64.1"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@tora-editor/native-darwin-arm64": "0.
|
|
35
|
-
"@tora-editor/native-darwin-x64": "0.
|
|
36
|
-
"@tora-editor/native-linux-x64-gnu": "0.
|
|
37
|
-
"@tora-editor/native-linux-arm64-gnu": "0.
|
|
38
|
-
"@tora-editor/native-win32-x64-msvc": "0.
|
|
34
|
+
"@tora-editor/native-darwin-arm64": "0.2.0",
|
|
35
|
+
"@tora-editor/native-darwin-x64": "0.2.0",
|
|
36
|
+
"@tora-editor/native-linux-x64-gnu": "0.2.0",
|
|
37
|
+
"@tora-editor/native-linux-arm64-gnu": "0.2.0",
|
|
38
|
+
"@tora-editor/native-win32-x64-msvc": "0.2.0"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=22.0.0"
|