@combos-fun/plugin-renderer-3d-tiling-sprite 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 +27 -0
- package/agent-skill.md +57 -0
- package/combos-plugin.json +11 -0
- package/package.json +19 -5
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# @combos-fun/plugin-renderer-3d-tiling-sprite
|
|
2
|
+
|
|
3
|
+
@combos-fun/plugin-renderer-3d-tiling-sprite — part of the Combos Fun engine monorepo.
|
|
4
|
+
|
|
5
|
+
Keywords: `3d`, `tiling`, `texture`, `floor`, `wall`, `repeat`.
|
|
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-tiling-sprite/plugin-manifest';
|
|
21
|
+
// or fetch the markdown directly:
|
|
22
|
+
// require.resolve('@combos-fun/plugin-renderer-3d-tiling-sprite/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,57 @@
|
|
|
1
|
+
# `@combos-fun/plugin-renderer-3d-tiling-sprite` — Agent notes
|
|
2
|
+
|
|
3
|
+
Repeating texture on a 3D plane (`PlaneGeometry` + `RepeatWrapping` texture). Useful for ground tiles, walls, brick patterns.
|
|
4
|
+
|
|
5
|
+
## When to read
|
|
6
|
+
|
|
7
|
+
Read for any tiled 3D surface: floors, walls, repeating patterns on a plane.
|
|
8
|
+
|
|
9
|
+
## Public API
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { TilingSprite3D, TilingSprite3DSystem, type TilingSprite3DParams } from '@combos-fun/plugin-renderer-3d-tiling-sprite';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`componentName = 'TilingSprite3D'`, `systemName = 'TilingSprite3DSystem'`.
|
|
16
|
+
|
|
17
|
+
### `TilingSprite3DParams`
|
|
18
|
+
|
|
19
|
+
| Field | Type | Default |
|
|
20
|
+
|-------|------|---------|
|
|
21
|
+
| `resource` | `string` | `''` (texture URL — direct) |
|
|
22
|
+
| `repeatX` / `repeatY` | `number` | `1` |
|
|
23
|
+
| `width` / `height` | `number` | `10` |
|
|
24
|
+
| `positionX` / `Y` / `Z` | `number` | `0` |
|
|
25
|
+
| `rotationX` / `Y` / `Z` | `number` | `0` |
|
|
26
|
+
| `opacity` | `number` | `1` |
|
|
27
|
+
|
|
28
|
+
There are **no scale fields** — use `width` / `height` for size in world units. Texture uses `THREE.RepeatWrapping`.
|
|
29
|
+
|
|
30
|
+
## Required setup
|
|
31
|
+
|
|
32
|
+
`Renderer3DSystem` then `TilingSprite3DSystem`.
|
|
33
|
+
|
|
34
|
+
## Common pitfalls
|
|
35
|
+
|
|
36
|
+
| Symptom | Fix |
|
|
37
|
+
|---------|-----|
|
|
38
|
+
| Texture stretched | Increase `repeatX` / `repeatY` to tile more |
|
|
39
|
+
| Visible seams | Use a power-of-two seamless texture |
|
|
40
|
+
| Plane invisible from below | Plane is single-sided — orient via `rotation*` so the camera sees the front |
|
|
41
|
+
| Need scale | Use `width` / `height`, not non-existent `scale*` |
|
|
42
|
+
|
|
43
|
+
## Minimal example
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
const floor = new GameObject('floor');
|
|
47
|
+
floor.addComponent(new TilingSprite3D({
|
|
48
|
+
resource: '/assets/floor.png',
|
|
49
|
+
repeatX: 4, repeatY: 4,
|
|
50
|
+
width: 10, height: 10,
|
|
51
|
+
rotationX: -Math.PI / 2, // lay flat
|
|
52
|
+
}));
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Verification
|
|
56
|
+
|
|
57
|
+
`pnpm --filter @combos-fun/plugin-renderer-3d-tiling-sprite run build`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@combos-fun/plugin-renderer-3d-tiling-sprite",
|
|
3
|
+
"pluginId": "renderer-3d-tiling-sprite",
|
|
4
|
+
"category": "rendering",
|
|
5
|
+
"dimension": "3d",
|
|
6
|
+
"isCore": false,
|
|
7
|
+
"keywords": ["3d", "tiling", "texture", "floor", "wall", "repeat"],
|
|
8
|
+
"agentSkill": "./agent-skill.md",
|
|
9
|
+
"requires": ["@combos-fun/engine", "@combos-fun/plugin-renderer-3d"],
|
|
10
|
+
"exports": ["TilingSprite3D", "TilingSprite3DSystem"]
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@combos-fun/plugin-renderer-3d-tiling-sprite",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "@combos-fun/plugin-renderer-3d-tiling-sprite",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-renderer-3d-tiling-sprite.esm.js",
|
|
@@ -9,13 +9,27 @@
|
|
|
9
9
|
"types": "dist/plugin-renderer-3d-tiling-sprite.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-tiling-sprite.esm.js",
|
|
19
|
+
"require": "./index.js",
|
|
20
|
+
"types": "./dist/plugin-renderer-3d-tiling-sprite.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/
|
|
17
|
-
"@combos-fun/
|
|
18
|
-
"@combos-fun/
|
|
30
|
+
"@combos-fun/engine": "0.0.8",
|
|
31
|
+
"@combos-fun/plugin-renderer-3d": "0.0.8",
|
|
32
|
+
"@combos-fun/inspector-decorator": "0.0.8"
|
|
19
33
|
},
|
|
20
34
|
"scripts": {
|
|
21
35
|
"build": "node ../../scripts/build-package.mjs"
|