@combos-fun/plugin-renderer-text 0.0.35 → 0.0.37

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 +10 -1
  2. package/package.json +5 -5
package/agent-skill.md CHANGED
@@ -21,7 +21,15 @@ import { Text, TextSystem, type TextParams } from '@combos-fun/plugin-renderer-t
21
21
  | `text` | `string` | — (required) |
22
22
  | `style` | `Partial<TextStyle>` | `{ fontSize: 20 }` |
23
23
 
24
- `style` accepts the full Pixi `TextStyle` surface (`fill`, `fontFamily`, `fontSize`, `fontWeight`, `wordWrap`, `wordWrapWidth`, `align`, `stroke`, `dropShadow`, `lineHeight`, ...).
24
+ `style` is Pixi **v8** `TextStyle` / `TextStyleOptions`. Common safe fields:
25
+
26
+ - `fill`, `fontFamily`, `fontSize`, `fontWeight`, `fontStyle`
27
+ - `align`, `wordWrap`, `wordWrapWidth`, `breakWords`, `lineHeight`, `letterSpacing`, `leading`, `padding`
28
+ - `stroke`, `dropShadow`
29
+
30
+ **Not supported:** `backgroundColor` (and other CSS/DOM or Pixi v7-only shortcuts). For a text plate/bubble background, put `Graphics` or `Img` on a **separate** GameObject behind the text (one visible render Component per GameObject).
31
+
32
+ Do not treat “full Pixi TextStyle” as “any CSS text property”.
25
33
 
26
34
  `Transform.size` is updated automatically after rendering so layout components downstream can position around the actual bounds.
27
35
 
@@ -33,6 +41,7 @@ import { Text, TextSystem, type TextParams } from '@combos-fun/plugin-renderer-t
33
41
 
34
42
  | Symptom | Fix |
35
43
  |---------|-----|
44
+ | `tsc`: `backgroundColor` does not exist on `Partial<TextStyle>` | Remove it; use a sibling/child `Graphics`/`Img` plate |
36
45
  | Text invisible on dark background | Set `style.fill: 0xffffff` (default fill is dark) |
37
46
  | Wrap not working | Set `style.wordWrap: true` AND `style.wordWrapWidth: <px>` |
38
47
  | Custom font not loading | Load the webfont before adding the component (e.g. `document.fonts.load(...)`) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combos-fun/plugin-renderer-text",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "Text rendering",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-renderer-text.esm.js",
@@ -35,11 +35,11 @@
35
35
  ],
36
36
  "author": "sun668 <q947692259@gmail.com>",
37
37
  "dependencies": {
38
+ "@combos-fun/plugin-renderer": "0.0.37",
39
+ "@combos-fun/renderer-adapter": "0.0.37",
40
+ "@combos-fun/engine": "0.0.37",
38
41
  "pixi.js": "^8.18.1",
39
- "@combos-fun/plugin-renderer": "0.0.35",
40
- "@combos-fun/renderer-adapter": "0.0.35",
41
- "@combos-fun/engine": "0.0.35",
42
- "@combos-fun/inspector-decorator": "0.0.35"
42
+ "@combos-fun/inspector-decorator": "0.0.37"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "node ../../scripts/build-package.mjs"