modern-canvas 0.12.20 → 0.12.22
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/dist/core/renderer/webgl/modules/WebGLBatch2DModule.d.ts +1 -1
- package/dist/core/renderer/webgl/modules/WebGLTextureModule.d.ts +1 -0
- package/dist/index.js +570 -556
- package/dist/scene/2d/element/BaseElement2D.d.ts +0 -1
- package/dist/scene/2d/element/BaseElement2DText.d.ts +9 -8
- package/dist/scene/resources/textures/Texture2D.d.ts +1 -1
- package/package.json +6 -6
|
@@ -69,7 +69,6 @@ export declare class BaseElement2D extends Node2D implements Rectangulable {
|
|
|
69
69
|
protected _process(delta: number): void;
|
|
70
70
|
protected _updateMaskImage(maskImage?: string): void;
|
|
71
71
|
updateGlobalTransform(): void;
|
|
72
|
-
protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
|
|
73
72
|
getRect(): Rect2;
|
|
74
73
|
protected _getPointArray(): Vector2Data[];
|
|
75
74
|
getAabb(): Rect2;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Fonts } from 'modern-font';
|
|
2
|
+
import type { NormalizedFill, NormalizedText, TextContent, Text as TextProperties } from 'modern-idoc';
|
|
2
3
|
import type { MeasureResult } from 'modern-text';
|
|
3
4
|
import type { CanvasContext } from '../../main';
|
|
4
5
|
import type { Texture2D } from '../../resources';
|
|
@@ -10,13 +11,13 @@ export type TextDrawMode = 'auto' | 'texture' | 'path';
|
|
|
10
11
|
export declare class BaseElement2DText extends CoreObject {
|
|
11
12
|
parent: BaseElement2D;
|
|
12
13
|
enabled: boolean;
|
|
13
|
-
content:
|
|
14
|
-
style:
|
|
15
|
-
effects:
|
|
16
|
-
fill:
|
|
17
|
-
outline:
|
|
18
|
-
measureDom:
|
|
19
|
-
fonts:
|
|
14
|
+
content: NormalizedText['content'];
|
|
15
|
+
style: NormalizedText['style'];
|
|
16
|
+
effects: NormalizedText['effects'];
|
|
17
|
+
fill: NormalizedText['fill'];
|
|
18
|
+
outline: NormalizedText['outline'];
|
|
19
|
+
measureDom: HTMLElement;
|
|
20
|
+
fonts: Fonts;
|
|
20
21
|
drawMode: TextDrawMode;
|
|
21
22
|
readonly base: Text;
|
|
22
23
|
protected _texture: CanvasTexture;
|
|
@@ -33,7 +33,7 @@ export declare class Texture2D<T extends Texture2DSource = Texture2DSource> exte
|
|
|
33
33
|
_glTexture(renderer: WebGLRenderer, options?: Partial<WebGLTextureOptions>): WebGLTexture;
|
|
34
34
|
protected _updateProperty(key: string, value: any, oldValue: any): void;
|
|
35
35
|
protected _updatePOT(): void;
|
|
36
|
-
|
|
36
|
+
updateSize(): void;
|
|
37
37
|
requestUpload(): void;
|
|
38
38
|
upload(renderer: WebGLRenderer, options?: Partial<WebGLTextureOptions>): boolean;
|
|
39
39
|
activate(renderer: WebGLRenderer, location?: number): boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modern-canvas",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.22",
|
|
5
5
|
"packageManager": "pnpm@10.19.0",
|
|
6
6
|
"description": "A JavaScript WebGL rendering engine. only the ESM.",
|
|
7
7
|
"author": "wxm",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"earcut": "^3.0.2",
|
|
66
66
|
"modern-font": "^0.4.4",
|
|
67
67
|
"modern-idoc": "^0.10.5",
|
|
68
|
-
"modern-path2d": "^1.4.
|
|
69
|
-
"modern-text": "^1.10.
|
|
68
|
+
"modern-path2d": "^1.4.11",
|
|
69
|
+
"modern-text": "^1.10.3"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"lottie-web": "^5",
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@antfu/eslint-config": "^6.2.0",
|
|
89
89
|
"@types/earcut": "^3.0.0",
|
|
90
|
-
"@types/node": "^24.
|
|
90
|
+
"@types/node": "^24.10.0",
|
|
91
91
|
"bumpp": "^10.3.1",
|
|
92
92
|
"conventional-changelog-cli": "^5.0.0",
|
|
93
|
-
"eslint": "^9.
|
|
93
|
+
"eslint": "^9.39.1",
|
|
94
94
|
"lint-staged": "^16.2.6",
|
|
95
95
|
"lottie-web": "^5.13.0",
|
|
96
96
|
"modern-gif": "^2.0.4",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"typescript": "^5.9.3",
|
|
99
99
|
"unbuild": "^3.6.1",
|
|
100
100
|
"vite": "^7.1.12",
|
|
101
|
-
"vitest": "^4.0.
|
|
101
|
+
"vitest": "^4.0.6",
|
|
102
102
|
"yoga-layout": "^3.2.1"
|
|
103
103
|
},
|
|
104
104
|
"simple-git-hooks": {
|