@combos-fun/plugin-renderer-nine-patch 0.0.38 → 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.
Files changed (2) hide show
  1. package/agent-skill.md +3 -4
  2. package/package.json +5 -5
package/agent-skill.md CHANGED
@@ -12,7 +12,7 @@ Read for any stretchable UI panel: buttons, dialog backgrounds, tooltip frames,
12
12
  import { NinePatch, NinePatchSystem, type NinePatchParams } from '@combos-fun/plugin-renderer-nine-patch';
13
13
  ```
14
14
 
15
- `componentName = 'NinePatch'`, `systemName = 'NinePatchSystem'`.
15
+ `componentName = 'NinePatch'`, `systemName = 'NinePatch'` (class is `NinePatchSystem` — use `game.getSystem(NinePatchSystem)`, not the string).
16
16
 
17
17
  ### `NinePatchParams`
18
18
 
@@ -25,7 +25,7 @@ import { NinePatch, NinePatchSystem, type NinePatchParams } from '@combos-fun/pl
25
25
  | `rightWidth` | `number` | Right fixed border (px) |
26
26
  | `bottomHeight` | `number` | Bottom fixed border (px) |
27
27
 
28
- The actual stretched size comes from `Transform.size`. Set `transform.size = { x: 300, y: 100 }` to stretch the centre to those dimensions.
28
+ The actual stretched size comes from `Transform.size`. Set `size: { width: 300, height: 100 }` on the GameObject constructor (not `{ x, y }`).
29
29
 
30
30
  ## Required setup
31
31
 
@@ -42,8 +42,7 @@ The actual stretched size comes from `Transform.size`. Set `transform.size = { x
42
42
  ## Minimal example
43
43
 
44
44
  ```ts
45
- const panel = new GameObject('panel');
46
- panel.addComponent(new Transform({ position: { x: 100, y: 100 }, size: { x: 300, y: 120 } }));
45
+ const panel = new GameObject('panel', { position: { x: 100, y: 100 }, size: { width: 300, height: 120 } });
47
46
  panel.addComponent(new NinePatch({
48
47
  resource: 'panel-bg',
49
48
  leftWidth: 16, topHeight: 16, rightWidth: 16, bottomHeight: 16,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combos-fun/plugin-renderer-nine-patch",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "description": "9-patch (nine-slice) panels",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-renderer-nine-patch.esm.js",
@@ -36,10 +36,10 @@
36
36
  ],
37
37
  "author": "sun668 <q947692259@gmail.com>",
38
38
  "dependencies": {
39
- "@combos-fun/plugin-renderer": "0.0.38",
40
- "@combos-fun/renderer-adapter": "0.0.38",
41
- "@combos-fun/engine": "0.0.38",
42
- "@combos-fun/inspector-decorator": "0.0.38",
39
+ "@combos-fun/plugin-renderer": "0.0.39",
40
+ "@combos-fun/renderer-adapter": "0.0.39",
41
+ "@combos-fun/engine": "0.0.39",
42
+ "@combos-fun/inspector-decorator": "0.0.39",
43
43
  "pixi.js": "^8.18.1"
44
44
  },
45
45
  "scripts": {