@yft-design/engine 0.0.34 → 0.0.36

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.
@@ -1,11 +1,13 @@
1
1
  import { AnimatedNode, MaskNode, type SceneNode } from '../model/scene';
2
2
  import type { EngineDocument } from '../model/document';
3
+ import { type AnimatedSourceDecoder } from '../decoders/animatedImage';
3
4
  import { GLTextureCache } from './GLTextureCache';
4
5
  export interface SourceHost {
5
6
  readonly gl: WebGL2RenderingContext;
6
7
  readonly textures: GLTextureCache;
7
8
  readonly document: EngineDocument;
8
9
  requestRenderAll: () => void;
10
+ decodeAnimated?: AnimatedSourceDecoder | null;
9
11
  }
10
12
  export declare class SourceManager {
11
13
  private readonly host;
@@ -17,6 +19,7 @@ export declare class SourceManager {
17
19
  private readonly maskTextures;
18
20
  private readonly svgRasters;
19
21
  private readonly svgMaxRasterPx;
22
+ private loadGeneration;
20
23
  constructor(host: SourceHost);
21
24
  loadGroupMasks(nodes: SceneNode[]): Promise<void>;
22
25
  loadAnimatedSources(nodes: SceneNode[]): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yft-design/engine",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "description": "yft-design 的 WebGL2 画布引擎:接受 fabric toObject 格式 JSON,输出 GL 画布 / 位图(任意倍率 FBO 读回)/ SVG(纯数据序列化器)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,7 +30,8 @@
30
30
  "dependencies": {
31
31
  "gifuct-js": "^2.1.2",
32
32
  "rbush": "^4.0.1",
33
- "warpvas": "^1.0.4"
33
+ "warpvas": "^1.0.4",
34
+ "upng-js": "^2.1.0"
34
35
  },
35
36
  "devDependencies": {
36
37
  "@types/node": "^22.19.17",
@@ -38,7 +39,8 @@
38
39
  "esbuild": "^0.28.2",
39
40
  "jsdom": "^29.1.1",
40
41
  "typescript": "^6.0.3",
41
- "vitest": "^4.1.6"
42
+ "vitest": "^4.1.6",
43
+ "@types/upng-js": "^2.1.5"
42
44
  },
43
45
  "scripts": {
44
46
  "test": "vitest run",