@combos-fun/plugin-renderer-nine-patch 0.1.14 → 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.
Files changed (2) hide show
  1. package/agent-skill.md +5 -25
  2. package/package.json +5 -5
package/agent-skill.md CHANGED
@@ -1,38 +1,18 @@
1
1
  # `@combos-fun/plugin-renderer-nine-patch` — Agent notes
2
2
 
3
- Read only for a resizable panel whose corners and edge widths must stay fixed.
3
+ Resizable panel with fixed borders.
4
4
 
5
5
  ```ts
6
- import { NinePatch, NinePatchSystem, type NinePatchParams } from '@combos-fun/plugin-renderer-nine-patch';
6
+ import { NinePatch, NinePatchSystem } from '@combos-fun/plugin-renderer-nine-patch';
7
7
  ```
8
8
 
9
- `NinePatch.componentName = 'NinePatch'`; `NinePatchSystem.systemName = 'NinePatch'`.
9
+ `NinePatch.componentName = 'NinePatch'`. `NinePatchSystem.systemName = 'NinePatch'`.
10
10
 
11
- | Field | Type | Use |
12
- |---|---|---|
13
- | `resource` | `string` | IMAGE or SPRITE resource name |
14
- | `spriteName` | `string?` | Atlas frame; required for SPRITE |
15
- | `leftWidth` | `number?` | Left fixed border |
16
- | `topHeight` | `number?` | Top fixed border |
17
- | `rightWidth` | `number?` | Right fixed border |
18
- | `bottomHeight` | `number?` | Bottom fixed border |
19
-
20
- Pass all four border values, including zero. Although optional in TypeScript,
21
- omitted borders in a supplied params object overwrite the initial `0` with
22
- `undefined`.
11
+ `resource` is an IMAGE or SPRITE name. SPRITE also needs `spriteName` and an imported `plugin-renderer-sprite`. Pass all four borders, including `0`: an omitted border in the params object becomes `undefined`. Size follows `Transform2D.size`. Opposite borders must fit the source texture.
23
12
 
24
13
  ```ts
25
14
  panel.addComponent(new NinePatch({
26
15
  resource: 'panel-bg',
27
- leftWidth: 16,
28
- topHeight: 16,
29
- rightWidth: 16,
30
- bottomHeight: 16,
16
+ leftWidth: 16, topHeight: 16, rightWidth: 16, bottomHeight: 16,
31
17
  }));
32
18
  ```
33
-
34
- Output size follows `Transform2D.size`. Keep opposite borders within the source texture dimensions.
35
-
36
- For SPRITE resources, import `@combos-fun/plugin-renderer-sprite` and provide an
37
- exact `spriteName`; atlas parsing registers the prefixed key in Pixi's Texture
38
- cache.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combos-fun/plugin-renderer-nine-patch",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "9-patch (nine-slice) panels",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-renderer-nine-patch.esm.js",
@@ -37,10 +37,10 @@
37
37
  "author": "sun668 <q947692259@gmail.com>",
38
38
  "dependencies": {
39
39
  "pixi.js": "^8.18.1",
40
- "@combos-fun/plugin-renderer": "0.1.14",
41
- "@combos-fun/engine": "0.1.14",
42
- "@combos-fun/renderer-adapter": "0.1.14",
43
- "@combos-fun/inspector-decorator": "0.1.14"
40
+ "@combos-fun/plugin-renderer": "0.1.16",
41
+ "@combos-fun/renderer-adapter": "0.1.16",
42
+ "@combos-fun/engine": "0.1.16",
43
+ "@combos-fun/inspector-decorator": "0.1.16"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "node ../../scripts/build-package.mjs"