modern-canvas 0.12.5 → 0.12.7
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/index.cjs +14 -3
- package/dist/index.d.cts +3 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +14 -14
- package/dist/index.mjs +14 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10205,9 +10205,17 @@ class BaseElement2DText extends CoreObject {
|
|
|
10205
10205
|
return new Transform2D().translate(-origin.x, -origin.y).scale(scale > 0 ? 1 : -1, 1).translate(origin.x, origin.y);
|
|
10206
10206
|
}
|
|
10207
10207
|
useTextureDraw() {
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10208
|
+
let drawMode = this.drawMode;
|
|
10209
|
+
if (drawMode === "auto") {
|
|
10210
|
+
if (!!this.effects?.length || this.content.some((p) => {
|
|
10211
|
+
return p.fragments.some((f) => !!f.highlightImage);
|
|
10212
|
+
})) {
|
|
10213
|
+
drawMode = "texture";
|
|
10214
|
+
} else {
|
|
10215
|
+
drawMode = "path";
|
|
10216
|
+
}
|
|
10217
|
+
}
|
|
10218
|
+
return drawMode === "texture";
|
|
10211
10219
|
}
|
|
10212
10220
|
_pathDraw(ctx) {
|
|
10213
10221
|
this.base.pathSets.forEach((pathSet) => {
|
|
@@ -10321,6 +10329,9 @@ __decorateClass$f([
|
|
|
10321
10329
|
__decorateClass$f([
|
|
10322
10330
|
modernIdoc.property({ alias: "base.fonts" })
|
|
10323
10331
|
], BaseElement2DText.prototype, "fonts");
|
|
10332
|
+
__decorateClass$f([
|
|
10333
|
+
modernIdoc.property({ internal: true, fallback: "auto" })
|
|
10334
|
+
], BaseElement2DText.prototype, "drawMode");
|
|
10324
10335
|
|
|
10325
10336
|
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
10326
10337
|
var __decorateClass$e = (decorators, target, key, kind) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -2093,6 +2093,7 @@ declare class BaseElement2DStyle extends Resource {
|
|
|
2093
2093
|
constructor(properties?: Partial<BaseElement2DStyleProperties>);
|
|
2094
2094
|
}
|
|
2095
2095
|
|
|
2096
|
+
type TextDrawMode = 'auto' | 'texture' | 'path';
|
|
2096
2097
|
declare class BaseElement2DText extends CoreObject {
|
|
2097
2098
|
parent: BaseElement2D;
|
|
2098
2099
|
enabled: boolean;
|
|
@@ -2103,6 +2104,7 @@ declare class BaseElement2DText extends CoreObject {
|
|
|
2103
2104
|
outline: Text['outline'];
|
|
2104
2105
|
measureDom: Text['measureDom'];
|
|
2105
2106
|
fonts: Text['fonts'];
|
|
2107
|
+
drawMode: TextDrawMode;
|
|
2106
2108
|
readonly base: Text;
|
|
2107
2109
|
protected _texture: CanvasTexture;
|
|
2108
2110
|
protected _textureMap: Map<string, {
|
|
@@ -3256,4 +3258,4 @@ interface RenderOptions {
|
|
|
3256
3258
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3257
3259
|
|
|
3258
3260
|
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, CanvasContext, CanvasItem, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DrawboardEffect, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GaussianBlurEffect, Geometry, GifLoader, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, Meta, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, RawWeakMap, Rect2, RefCounted, Renderer, Resource, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, SceneTree, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, Window, ZoomBlurEffect, alignMap, assets, boxSizingMap, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, directionMap, displayMap, ease, easeIn, easeInOut, easeOut, edgeMap, flexDirectionMap, flexWrapMap, frag, getDefaultCssPropertyValue, gutterMap, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, justifyMap, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, overflowMap, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, positionTypeMap, render, timingFunctions, uid };
|
|
3259
|
-
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, ZoomBlurEffectProperties };
|
|
3261
|
+
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, TextDrawMode, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, ZoomBlurEffectProperties };
|
package/dist/index.d.mts
CHANGED
|
@@ -2093,6 +2093,7 @@ declare class BaseElement2DStyle extends Resource {
|
|
|
2093
2093
|
constructor(properties?: Partial<BaseElement2DStyleProperties>);
|
|
2094
2094
|
}
|
|
2095
2095
|
|
|
2096
|
+
type TextDrawMode = 'auto' | 'texture' | 'path';
|
|
2096
2097
|
declare class BaseElement2DText extends CoreObject {
|
|
2097
2098
|
parent: BaseElement2D;
|
|
2098
2099
|
enabled: boolean;
|
|
@@ -2103,6 +2104,7 @@ declare class BaseElement2DText extends CoreObject {
|
|
|
2103
2104
|
outline: Text['outline'];
|
|
2104
2105
|
measureDom: Text['measureDom'];
|
|
2105
2106
|
fonts: Text['fonts'];
|
|
2107
|
+
drawMode: TextDrawMode;
|
|
2106
2108
|
readonly base: Text;
|
|
2107
2109
|
protected _texture: CanvasTexture;
|
|
2108
2110
|
protected _textureMap: Map<string, {
|
|
@@ -3256,4 +3258,4 @@ interface RenderOptions {
|
|
|
3256
3258
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3257
3259
|
|
|
3258
3260
|
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, CanvasContext, CanvasItem, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DrawboardEffect, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GaussianBlurEffect, Geometry, GifLoader, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, Meta, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, RawWeakMap, Rect2, RefCounted, Renderer, Resource, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, SceneTree, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, Window, ZoomBlurEffect, alignMap, assets, boxSizingMap, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, directionMap, displayMap, ease, easeIn, easeInOut, easeOut, edgeMap, flexDirectionMap, flexWrapMap, frag, getDefaultCssPropertyValue, gutterMap, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, justifyMap, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, overflowMap, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, positionTypeMap, render, timingFunctions, uid };
|
|
3259
|
-
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, ZoomBlurEffectProperties };
|
|
3261
|
+
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, TextDrawMode, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, ZoomBlurEffectProperties };
|
package/dist/index.d.ts
CHANGED
|
@@ -2093,6 +2093,7 @@ declare class BaseElement2DStyle extends Resource {
|
|
|
2093
2093
|
constructor(properties?: Partial<BaseElement2DStyleProperties>);
|
|
2094
2094
|
}
|
|
2095
2095
|
|
|
2096
|
+
type TextDrawMode = 'auto' | 'texture' | 'path';
|
|
2096
2097
|
declare class BaseElement2DText extends CoreObject {
|
|
2097
2098
|
parent: BaseElement2D;
|
|
2098
2099
|
enabled: boolean;
|
|
@@ -2103,6 +2104,7 @@ declare class BaseElement2DText extends CoreObject {
|
|
|
2103
2104
|
outline: Text['outline'];
|
|
2104
2105
|
measureDom: Text['measureDom'];
|
|
2105
2106
|
fonts: Text['fonts'];
|
|
2107
|
+
drawMode: TextDrawMode;
|
|
2106
2108
|
readonly base: Text;
|
|
2107
2109
|
protected _texture: CanvasTexture;
|
|
2108
2110
|
protected _textureMap: Map<string, {
|
|
@@ -3256,4 +3258,4 @@ interface RenderOptions {
|
|
|
3256
3258
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3257
3259
|
|
|
3258
3260
|
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, CanvasContext, CanvasItem, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DrawboardEffect, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GaussianBlurEffect, Geometry, GifLoader, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, Meta, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, RawWeakMap, Rect2, RefCounted, Renderer, Resource, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, SceneTree, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, Window, ZoomBlurEffect, alignMap, assets, boxSizingMap, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, directionMap, displayMap, ease, easeIn, easeInOut, easeOut, edgeMap, flexDirectionMap, flexWrapMap, frag, getDefaultCssPropertyValue, gutterMap, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, justifyMap, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, overflowMap, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, positionTypeMap, render, timingFunctions, uid };
|
|
3259
|
-
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, ZoomBlurEffectProperties };
|
|
3261
|
+
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, TextDrawMode, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, ZoomBlurEffectProperties };
|