@combos-fun/plugin-renderer-3d-tiling-sprite 0.1.15 → 0.1.16
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/agent-skill.md +12 -48
- package/package.json +4 -4
package/agent-skill.md
CHANGED
|
@@ -1,61 +1,25 @@
|
|
|
1
1
|
# `@combos-fun/plugin-renderer-3d-tiling-sprite` — Agent notes
|
|
2
2
|
|
|
3
|
-
Repeats one IMAGE
|
|
4
|
-
|
|
5
|
-
Prerequisite: follow the parent `@combos-fun/plugin-renderer-3d` skill for system order, named resources, pose seeding, hierarchy, and stale-async handling.
|
|
6
|
-
|
|
7
|
-
## Public API
|
|
3
|
+
Repeats one IMAGE on a plane. Parent: `plugin-renderer-3d`.
|
|
8
4
|
|
|
9
5
|
```ts
|
|
10
|
-
import {
|
|
11
|
-
TilingSprite3D,
|
|
12
|
-
TilingSprite3DSystem,
|
|
13
|
-
type TilingSprite3DParams,
|
|
14
|
-
} from '@combos-fun/plugin-renderer-3d-tiling-sprite';
|
|
6
|
+
import { TilingSprite3D, TilingSprite3DSystem } from '@combos-fun/plugin-renderer-3d-tiling-sprite';
|
|
15
7
|
```
|
|
16
8
|
|
|
17
|
-
`componentName = 'TilingSprite3D'
|
|
18
|
-
|
|
19
|
-
## Parameters
|
|
20
|
-
|
|
21
|
-
| Field | Type | Default |
|
|
22
|
-
|-------|------|---------|
|
|
23
|
-
| `resource` | `string` | `''`; empty on ADD is a silent no-op |
|
|
24
|
-
| `repeatX/Y` | `number` | `1` |
|
|
25
|
-
| `width/height` | `number` | `10` |
|
|
26
|
-
| `positionX/Y/Z` | `number` | `0` |
|
|
27
|
-
| `rotationX/Y/Z` | `number` | `0` radians |
|
|
28
|
-
| `opacity` | `number` | `1` |
|
|
29
|
-
|
|
30
|
-
There are no scale or double-side fields. `width/height` are the plane's world-unit dimensions; the material is front-sided.
|
|
9
|
+
`componentName = 'TilingSprite3D'`. `systemName = 'TilingSprite3DSystem'`.
|
|
31
10
|
|
|
32
|
-
|
|
11
|
+
| Field | Default |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `resource` | `''` — IMAGE name. Empty on add does nothing |
|
|
14
|
+
| `repeatX` / `repeatY` | `1` |
|
|
15
|
+
| `width` / `height` | `10` — plane size in world units |
|
|
16
|
+
| `position*` / `rotation*` | `0` |
|
|
17
|
+
| `opacity` | `1` |
|
|
33
18
|
|
|
34
|
-
|
|
35
|
-
- `resource` replacement rebuilds the mesh. `repeatX/Y` update texture repeat, `width/height` replace and dispose geometry, and `opacity` updates material transparency.
|
|
36
|
-
- Pose synchronizes per frame. With renderer shadows enabled, the mesh casts and receives shadows.
|
|
37
|
-
- Removal disposes geometry, material, and texture.
|
|
38
|
-
|
|
39
|
-
## Package-specific pitfalls
|
|
40
|
-
|
|
41
|
-
- Rotate the plane toward the camera; it is invisible from the back.
|
|
42
|
-
- Use a seamless texture to avoid visible tile boundaries.
|
|
43
|
-
- `TilingSprite3D.opacity` can be overwritten each frame by a sibling `Render3D`.
|
|
44
|
-
|
|
45
|
-
## Minimal example
|
|
19
|
+
No scale or `doubleSide`. The plane uses `RepeatWrapping` and is front-sided; rotate it toward the camera. `width` / `height` replace the geometry. A sibling `Render3D` overwrites `opacity`. Load is async and drops a stale texture.
|
|
46
20
|
|
|
47
21
|
```ts
|
|
48
|
-
const floor = new GameObject('floor');
|
|
49
22
|
floor.addComponent(new TilingSprite3D({
|
|
50
|
-
resource: 'floor',
|
|
51
|
-
repeatX: 4,
|
|
52
|
-
repeatY: 4,
|
|
53
|
-
width: 10,
|
|
54
|
-
height: 10,
|
|
55
|
-
rotationX: -Math.PI / 2,
|
|
23
|
+
resource: 'floor', repeatX: 4, repeatY: 4, width: 10, height: 10, rotationX: -Math.PI / 2,
|
|
56
24
|
}));
|
|
57
25
|
```
|
|
58
|
-
|
|
59
|
-
## Verification
|
|
60
|
-
|
|
61
|
-
`pnpm --filter @combos-fun/plugin-renderer-3d-tiling-sprite run build`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@combos-fun/plugin-renderer-3d-tiling-sprite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Repeating texture on a 3D plane (PlaneGeometry + RepeatWrapping texture)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-renderer-3d-tiling-sprite.esm.js",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"three": "^0.172.0",
|
|
30
|
-
"@combos-fun/engine": "0.1.
|
|
31
|
-
"@combos-fun/inspector-decorator": "0.1.
|
|
32
|
-
"@combos-fun/plugin-renderer-3d": "0.1.
|
|
30
|
+
"@combos-fun/engine": "0.1.16",
|
|
31
|
+
"@combos-fun/inspector-decorator": "0.1.16",
|
|
32
|
+
"@combos-fun/plugin-renderer-3d": "0.1.16"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
35
|
"combos-fun",
|