@drawcall/design 0.1.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 +25 -0
- package/dist/cli-client.d.ts +5 -0
- package/dist/cli-client.js +19 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +332 -0
- package/dist/config.d.ts +11 -0
- package/dist/config.js +56 -0
- package/dist/image.d.ts +1 -0
- package/dist/image.js +25 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -0
- package/dist/protocol.d.ts +7 -0
- package/dist/protocol.js +15 -0
- package/dist/skill.generated.d.ts +1 -0
- package/dist/skill.generated.js +2 -0
- package/dist/source.d.ts +10 -0
- package/dist/source.js +38 -0
- package/dist/target.d.ts +18 -0
- package/dist/target.js +40 -0
- package/dist/v1/client.d.ts +10 -0
- package/dist/v1/client.js +16 -0
- package/dist/v1/contract.d.ts +196 -0
- package/dist/v1/contract.js +99 -0
- package/dist/v1/index.d.ts +3 -0
- package/dist/v1/index.js +3 -0
- package/dist/v1/schemas.d.ts +146 -0
- package/dist/v1/schemas.js +143 -0
- package/package.json +55 -0
- package/skills/drawcall-design/SKILL.md +35 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: drawcall-design
|
|
3
|
+
description: Create, modify, inspect, and screenshot 3D objects and scenes in Drawcall Design using its MCP tools or @drawcall/design CLI. Use for Drawcall Design projects, frames, and code-frame source. Do not use for full games or applications.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Drawcall Design
|
|
7
|
+
|
|
8
|
+
Use the Drawcall Design MCP tools when available. Otherwise, use `npx @drawcall/design`. Drawcall Design is a remote, current-state canvas: inspect the existing project, frames, and source before changing them.
|
|
9
|
+
|
|
10
|
+
A code frame stores source as a `Record<absolute path, code>`. A renderable frame has exactly one `/index.ts` or `/index.js`. That module must export `scene`, whose value is a `THREE.Object3D`, and may export `camera`, whose value is a `THREE.Camera`.
|
|
11
|
+
|
|
12
|
+
Source runs as browser ESM. Use relative imports with explicit extensions for other frame files and normal package imports for browser-compatible packages. Top-level await is supported. In TypeScript files, use syntax that can be erased; avoid features that generate JavaScript.
|
|
13
|
+
|
|
14
|
+
A code frame represents a designed state rather than a running application. Complete asynchronous setup before exporting the scene, and add any lighting or environment the object needs.
|
|
15
|
+
|
|
16
|
+
Create image frames from a public HTTP(S) URL through MCP. In the CLI, `frame create --image` accepts either an HTTP(S) URL or a local PNG, JPEG, or WebP file.
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import * as THREE from "three";
|
|
20
|
+
|
|
21
|
+
const root = new THREE.Scene();
|
|
22
|
+
// Build the object or scene.
|
|
23
|
+
|
|
24
|
+
export const scene: THREE.Object3D = root;
|
|
25
|
+
|
|
26
|
+
const view = new THREE.PerspectiveCamera(35, 1, 0.1, 100);
|
|
27
|
+
view.position.set(4, 3, 5);
|
|
28
|
+
view.lookAt(0, 0, 0);
|
|
29
|
+
|
|
30
|
+
export const camera: THREE.Camera = view;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Read source before editing it. Prefer an exact edit for a small change, write one file when replacing that file, and replace the complete source only when the whole frame should change.
|
|
34
|
+
|
|
35
|
+
After every meaningful visual change, take a frame screenshot and inspect it. Iterate until the rendered object, composition, and frame size satisfy the request.
|