@yft-design/engine 0.0.32 → 0.0.33

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.
@@ -88,6 +88,7 @@ export declare class SceneNode {
88
88
  y: number;
89
89
  };
90
90
  get aCoords(): CornerPoints;
91
+ contentBoxCorners(): CornerPoints;
91
92
  get inkACoords(): CornerPoints;
92
93
  get parentMatrix(): Mat | null;
93
94
  setParentMatrix(m: Mat | null, parentOpacity?: number): void;
@@ -147,6 +148,8 @@ export declare class TextNode extends SceneNode {
147
148
  fy?: number;
148
149
  };
149
150
  get aCoords(): CornerPoints;
151
+ contentBoxCorners(): CornerPoints;
152
+ private bitmapFrameCorners;
150
153
  get inkACoords(): CornerPoints;
151
154
  private get textInkACoords();
152
155
  get contentTopY(): number;
@@ -1,3 +1,4 @@
1
+ import type { GradientDecl } from '../core/gradient';
1
2
  import type { PsdDropShadowDecl, PsdGradientFillDecl, PsdInnerShadowDecl, PsdSolidFillDecl, PsdStrokeDecl } from '../core/psdEffects';
2
3
  import { type SceneNode, type SourceRect, type TextNode } from '../model/scene';
3
4
  export declare const STROKE_BAKE_PIXEL_BUDGET = 600000;
@@ -14,6 +15,7 @@ export interface PsdShadowBake {
14
15
  quadH: number;
15
16
  }
16
17
  export declare const bakePsdShadow: (node: SceneNode, decls: PsdDropShadowDecl[], source: CanvasImageSource, rasterScale?: number, sourceRect?: SourceRect | null) => PsdShadowBake | null;
18
+ export declare const makeStrokeGradientSampler: (decl: GradientDecl, dimsW: number, dimsH: number, padT: number) => ((x: number, y: number) => [number, number, number, number]) | null;
17
19
  export declare const bakePsdSolidFill: (node: SceneNode, decl: PsdSolidFillDecl | PsdGradientFillDecl, source: CanvasImageSource, rasterScale?: number, sourceRect?: SourceRect | null) => HTMLCanvasElement | null;
18
20
  export declare const bakePathEffectShadow: (node: SceneNode, decls: PsdDropShadowDecl[]) => PsdShadowBake | null;
19
21
  export declare const buildPathFxSource: (node: SceneNode, rs?: number) => HTMLCanvasElement | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yft-design/engine",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "description": "yft-design 的 WebGL2 画布引擎:接受 fabric toObject 格式 JSON,输出 GL 画布 / 位图(任意倍率 FBO 读回)/ SVG(纯数据序列化器)",
5
5
  "repository": {
6
6
  "type": "git",