@combos-fun/plugin-renderer-graphics 0.0.37 → 0.0.39
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 +2 -3
- package/package.json +4 -4
package/agent-skill.md
CHANGED
|
@@ -12,7 +12,7 @@ Read for any vector shape: lines, fills, custom geometry, circles / rectangles d
|
|
|
12
12
|
import { Graphics, GraphicsSystem } from '@combos-fun/plugin-renderer-graphics';
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
`componentName = 'Graphics'`, `systemName = 'GraphicsSystem
|
|
15
|
+
`componentName = 'Graphics'`, `systemName = 'Graphics'` (class is `GraphicsSystem` — use `game.getSystem(GraphicsSystem)`, not the string).
|
|
16
16
|
|
|
17
17
|
The `Graphics` Component owns a `graphics` field — a Pixi `Graphics` instance created in `init()`. Use the standard Pixi v8 graphics API (`rect`, `circle`, `fill`, `stroke`, `moveTo`, `lineTo`, etc.) on it.
|
|
18
18
|
|
|
@@ -31,8 +31,7 @@ The `Graphics` Component owns a `graphics` field — a Pixi `Graphics` instance
|
|
|
31
31
|
## Minimal example
|
|
32
32
|
|
|
33
33
|
```ts
|
|
34
|
-
const go = new GameObject('rect');
|
|
35
|
-
go.addComponent(new Transform({ position: { x: 100, y: 100 } }));
|
|
34
|
+
const go = new GameObject('rect', { position: { x: 100, y: 100 } });
|
|
36
35
|
const g = go.addComponent(new Graphics());
|
|
37
36
|
g.graphics.rect(0, 0, 200, 80).fill({ color: 0xff0000 });
|
|
38
37
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@combos-fun/plugin-renderer-graphics",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.39",
|
|
4
4
|
"description": "Vector / procedural shapes",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-renderer-graphics.esm.js",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
],
|
|
37
37
|
"author": "sun668 <q947692259@gmail.com>",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@combos-fun/renderer-adapter": "0.0.
|
|
40
|
-
"@combos-fun/plugin-renderer": "0.0.
|
|
41
|
-
"@combos-fun/engine": "0.0.
|
|
39
|
+
"@combos-fun/renderer-adapter": "0.0.39",
|
|
40
|
+
"@combos-fun/plugin-renderer": "0.0.39",
|
|
41
|
+
"@combos-fun/engine": "0.0.39"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "node ../../scripts/build-package.mjs"
|