@combos-fun/plugin-renderer-sprite 0.0.7 → 0.0.9
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 +4 -8
- package/package.json +11 -7
package/agent-skill.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# `@combos-fun/plugin-renderer-sprite` — Agent notes
|
|
2
2
|
|
|
3
|
-
Sprite atlas rendering for the 2D pipeline. Renders a single named sprite
|
|
4
|
-
out of a packed atlas (Texture Packer JSON + image sheet).
|
|
3
|
+
Sprite atlas rendering for the 2D pipeline. Renders a single named sprite out of a packed atlas (Texture Packer JSON + image sheet).
|
|
5
4
|
|
|
6
5
|
## When to read
|
|
7
6
|
|
|
8
|
-
Read when you have a packed sprite atlas and need to draw a single named
|
|
9
|
-
frame (UI icons grouped in a sheet, character portraits, item icons).
|
|
7
|
+
Read when you have a packed sprite atlas and need to draw a single named frame (UI icons grouped in a sheet, character portraits, item icons).
|
|
10
8
|
|
|
11
9
|
## Public API
|
|
12
10
|
|
|
@@ -23,15 +21,13 @@ import { Sprite, SpriteSystem, type SpriteParams } from '@combos-fun/plugin-rend
|
|
|
23
21
|
| `resource` | `string` | Engine resource name registered with `RESOURCE_TYPE.SPRITE`. Source must include both `image` and `json`. |
|
|
24
22
|
| `spriteName` | `string` | Frame name from the atlas JSON |
|
|
25
23
|
|
|
26
|
-
Side effect: importing this package registers `SPRITE` resource handlers
|
|
27
|
-
on the engine `resource` singleton.
|
|
24
|
+
Side effect: importing this package registers `SPRITE` resource handlers on the engine `resource` singleton.
|
|
28
25
|
|
|
29
26
|
Internal cache key: `resource + '_s|r|c_' + spriteName`.
|
|
30
27
|
|
|
31
28
|
## Required setup
|
|
32
29
|
|
|
33
|
-
`RendererSystem` then `SpriteSystem`. Resource must be registered with
|
|
34
|
-
both `image` and `json` URLs:
|
|
30
|
+
`RendererSystem` then `SpriteSystem`. Resource must be registered with both `image` and `json` URLs:
|
|
35
31
|
|
|
36
32
|
```ts
|
|
37
33
|
resource.addResource([{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@combos-fun/plugin-renderer-sprite",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"description": "Sprite atlas rendering",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-renderer-sprite.esm.js",
|
|
7
7
|
"bundle": "CombosFun.plugin.renderer.sprite",
|
|
@@ -27,15 +27,19 @@
|
|
|
27
27
|
"types": "dist/plugin-renderer-sprite.d.ts",
|
|
28
28
|
"keywords": [
|
|
29
29
|
"combos-fun",
|
|
30
|
-
"
|
|
30
|
+
"sprite",
|
|
31
|
+
"atlas",
|
|
32
|
+
"spritesheet",
|
|
33
|
+
"frame",
|
|
34
|
+
"2d"
|
|
31
35
|
],
|
|
32
36
|
"author": "sun668 <q947692259@gmail.com>",
|
|
33
37
|
"dependencies": {
|
|
34
38
|
"pixi.js": "^8.18.1",
|
|
35
|
-
"@combos-fun/renderer-adapter": "0.0.
|
|
36
|
-
"@combos-fun/
|
|
37
|
-
"@combos-fun/
|
|
38
|
-
"@combos-fun/
|
|
39
|
+
"@combos-fun/renderer-adapter": "0.0.9",
|
|
40
|
+
"@combos-fun/inspector-decorator": "0.0.9",
|
|
41
|
+
"@combos-fun/plugin-renderer": "0.0.9",
|
|
42
|
+
"@combos-fun/engine": "0.0.9"
|
|
39
43
|
},
|
|
40
44
|
"scripts": {
|
|
41
45
|
"build": "node ../../scripts/build-package.mjs"
|