@combos-fun/plugin-renderer-3d-graphics 0.0.6 → 0.0.8

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 ADDED
@@ -0,0 +1,27 @@
1
+ # @combos-fun/plugin-renderer-3d-graphics
2
+
3
+ @combos-fun/plugin-renderer-3d-graphics — part of the Combos Fun engine monorepo.
4
+
5
+ Keywords: `3d`, `graphics`, `primitives`, `box`, `sphere`, `cylinder`, `plane`.
6
+
7
+ ## Documentation
8
+
9
+ - Per-package agent / developer notes: [`agent-skill.md`](./agent-skill.md)
10
+ - Machine-readable manifest: [`combos-plugin.json`](./combos-plugin.json)
11
+ (validated against `schemas/combos-plugin.schema.json` in the repo
12
+ root)
13
+ - Entry skill (single source of truth for AI agents working with this
14
+ monorepo): `skills/combos-engine-development/SKILL.md`
15
+
16
+ When consumed from npm, the manifest and agent notes are exposed as
17
+ stable subpaths:
18
+
19
+ ```ts
20
+ import manifest from '@combos-fun/plugin-renderer-3d-graphics/plugin-manifest';
21
+ // or fetch the markdown directly:
22
+ // require.resolve('@combos-fun/plugin-renderer-3d-graphics/agent-skill')
23
+ ```
24
+
25
+ ## License
26
+
27
+ Internal workspace package, part of the Combos Fun engine monorepo.
package/agent-skill.md ADDED
@@ -0,0 +1,61 @@
1
+ # `@combos-fun/plugin-renderer-3d-graphics` — Agent notes
2
+
3
+ Procedural 3D primitive shapes for the 3D pipeline. Produces a `THREE.Mesh` with a `MeshStandardMaterial` based on the chosen `shape`.
4
+
5
+ ## When to read
6
+
7
+ Read for any procedural primitive: box, sphere, cylinder, plane, cone, torus, debug placeholders, simple terrain.
8
+
9
+ ## Public API
10
+
11
+ ```ts
12
+ import { Graphics3D, Graphics3DSystem, type Graphics3DParams } from '@combos-fun/plugin-renderer-3d-graphics';
13
+ ```
14
+
15
+ `componentName = 'Graphics3D'`, `systemName = 'Graphics3DSystem'`.
16
+
17
+ ### `Graphics3DParams`
18
+
19
+ | Field | Type | Default |
20
+ |-------|------|---------|
21
+ | `shape` | `'box' \| 'sphere' \| 'cylinder' \| 'plane' \| 'cone' \| 'torus'` | `'box'` |
22
+ | `color` | `number` | `0x00ff00` |
23
+ | `wireframe` | `boolean` | `false` |
24
+ | `width` / `height` / `depth` | `number` | `1` |
25
+ | `radius` | `number` | `0.5` |
26
+ | `segments` | `number` | `32` |
27
+ | `positionX` / `Y` / `Z` | `number` | `0` |
28
+ | `rotationX` / `Y` / `Z` | `number` | `0` |
29
+ | `scaleX` / `Y` / `Z` | `number` | `1` |
30
+ | `opacity` | `number` | `1` |
31
+
32
+ Shape → Three.js geometry: `box → BoxGeometry`, `sphere → SphereGeometry`, `cylinder → CylinderGeometry`, `plane → PlaneGeometry`, `cone → ConeGeometry`, `torus → TorusGeometry`.
33
+
34
+ ## Required setup
35
+
36
+ `Renderer3DSystem` then `Graphics3DSystem`.
37
+
38
+ ## Common pitfalls
39
+
40
+ | Symptom | Fix |
41
+ |---------|-----|
42
+ | Plane invisible from one side | Add `doubleSide`-style material, or rotate to face the camera |
43
+ | Sphere very dark | Increase scene light or use `MeshBasicMaterial`-style flat shading (not exposed; use `Img3D` if you need flat) |
44
+ | Wireframe shimmer | `wireframe: true` — that's by design |
45
+ | Sync drift with `Physics3D` | Make sure both are on the same `GameObject`; `Physics3D.update()` writes positions back automatically |
46
+
47
+ ## Minimal example
48
+
49
+ ```ts
50
+ const box = new GameObject('box');
51
+ box.addComponent(new Graphics3D({
52
+ shape: 'box',
53
+ width: 1, height: 1, depth: 1,
54
+ color: 0xff0000,
55
+ positionX: 0, positionY: 1, positionZ: 0,
56
+ }));
57
+ ```
58
+
59
+ ## Verification
60
+
61
+ `pnpm --filter @combos-fun/plugin-renderer-3d-graphics run build`.
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@combos-fun/plugin-renderer-3d-graphics",
3
+ "pluginId": "renderer-3d-graphics",
4
+ "category": "rendering",
5
+ "dimension": "3d",
6
+ "isCore": false,
7
+ "keywords": ["3d", "graphics", "primitives", "box", "sphere", "cylinder", "plane"],
8
+ "agentSkill": "./agent-skill.md",
9
+ "requires": ["@combos-fun/engine", "@combos-fun/plugin-renderer-3d"],
10
+ "exports": ["Graphics3D", "Graphics3DSystem"]
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combos-fun/plugin-renderer-3d-graphics",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "@combos-fun/plugin-renderer-3d-graphics",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-renderer-3d-graphics.esm.js",
@@ -9,13 +9,27 @@
9
9
  "types": "dist/plugin-renderer-3d-graphics.d.ts",
10
10
  "files": [
11
11
  "index.js",
12
- "dist"
12
+ "dist",
13
+ "agent-skill.md",
14
+ "combos-plugin.json"
13
15
  ],
16
+ "exports": {
17
+ ".": {
18
+ "import": "./dist/plugin-renderer-3d-graphics.esm.js",
19
+ "require": "./index.js",
20
+ "types": "./dist/plugin-renderer-3d-graphics.d.ts"
21
+ },
22
+ "./plugin-manifest": "./combos-plugin.json",
23
+ "./agent-skill": "./agent-skill.md"
24
+ },
25
+ "combos": {
26
+ "pluginManifest": "./combos-plugin.json"
27
+ },
14
28
  "dependencies": {
15
29
  "three": "^0.172.0",
16
- "@combos-fun/engine": "0.0.6",
17
- "@combos-fun/inspector-decorator": "0.0.6",
18
- "@combos-fun/plugin-renderer-3d": "0.0.6"
30
+ "@combos-fun/plugin-renderer-3d": "0.0.8",
31
+ "@combos-fun/inspector-decorator": "0.0.8",
32
+ "@combos-fun/engine": "0.0.8"
19
33
  },
20
34
  "scripts": {
21
35
  "build": "node ../../scripts/build-package.mjs"