@leafer-in/motion-text 2.3.0 → 2.3.1

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.
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ var draw = require("@leafer-ui/draw");
4
+
5
+ var motionPath = require("@leafer-in/motion-path");
6
+
7
+ draw.Plugin.add("motion-text");
8
+
9
+ const tempPoint = {};
10
+
11
+ draw.Text.addAttr("motionText", undefined, motionPath.motionPathType);
12
+
13
+ draw.Text.prototype.__updateMotionText = function() {
14
+ const t = this;
15
+ if (!t.__.__textDrawData) return;
16
+ const data = t.__, {motion: motion, motionAround: motionAround} = data, {rows: rows, bounds: bounds} = data.__textDrawData;
17
+ let row, motionData;
18
+ const base = this.getMotionPoint(motion);
19
+ const textPath = [], pathPoint = {};
20
+ const pathElement = this.getMotionPath();
21
+ let offsetX = 0, offsetY = 0;
22
+ if (motionAround && motionAround !== "top-left") {
23
+ draw.AroundHelper.toPoint(motionAround, bounds, tempPoint);
24
+ offsetX = -tempPoint.x * t.scaleX, offsetY = -tempPoint.y * t.scaleY;
25
+ }
26
+ t.set({
27
+ x: base.x,
28
+ y: base.y
29
+ });
30
+ if (t.scale != 1) t.scale = 1;
31
+ if (t.rotation) t.rotation = 0;
32
+ for (let i = 0, len = rows.length; i < len; i++) {
33
+ row = rows[i];
34
+ if (row.data) row.data.forEach((charData, index) => {
35
+ motionData = charData.motion = this.getMotionPoint(motion, undefined, offsetX + charData.x, offsetY + row.y, pathElement);
36
+ draw.PointHelper.move(motionData, -base.x, -base.y);
37
+ draw.PointHelper.copy(pathPoint, motionData);
38
+ draw.PointHelper.toVertical(pathPoint, motionData.rotation, data.fontSize / 2);
39
+ if (!index) {
40
+ draw.PathCommandDataHelper.moveTo(textPath, motionData.x, motionData.y);
41
+ } else {
42
+ draw.PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y);
43
+ if (index === row.data.length - 1) {
44
+ motionData = this.getMotionPoint(motion, undefined, offsetX + charData.x + charData.width, offsetY + row.y + data.fontSize / 2, pathElement);
45
+ draw.PointHelper.move(motionData, -base.x, -base.y);
46
+ draw.PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y);
47
+ }
48
+ }
49
+ });
50
+ }
51
+ t.__.__pathForMotionText = textPath;
52
+ draw.PathBounds.toBounds(textPath, t.__layout.boxBounds);
53
+ draw.BoundsHelper.spread(t.__layout.boxBounds, data.fontSize);
54
+ t.__layout.contentBounds = t.__layout.boxBounds;
55
+ t.__layout.resized = "inner";
56
+ };
57
+
58
+ draw.Paint.fillMotionText = function(ui, canvas, _renderOptions) {
59
+ const data = ui.__, {rows: rows} = data.__textDrawData;
60
+ if (data.__isPlacehold && data.placeholderColor) canvas.fillStyle = data.placeholderColor;
61
+ let row, motion;
62
+ const useRotation = data.motionRotation !== false;
63
+ for (let i = 0, len = rows.length; i < len; i++) {
64
+ row = rows[i];
65
+ if (row.data) row.data.forEach(charData => {
66
+ motion = charData.motion;
67
+ if (useRotation) {
68
+ canvas.setTransform(canvas.worldTransform);
69
+ canvas.translate(motion.x, motion.y);
70
+ canvas.rotate(motion.rotation * draw.OneRadian);
71
+ canvas.fillText(charData.char, 0, 0);
72
+ } else {
73
+ canvas.fillText(charData.char, motion.x, motion.y);
74
+ }
75
+ });
76
+ }
77
+ };
@@ -0,0 +1,75 @@
1
+ import { Plugin, Text, AroundHelper, PointHelper, PathCommandDataHelper, PathBounds, BoundsHelper, Paint, OneRadian } from "@leafer-ui/draw";
2
+
3
+ import { motionPathType } from "@leafer-in/motion-path";
4
+
5
+ Plugin.add("motion-text");
6
+
7
+ const tempPoint = {};
8
+
9
+ Text.addAttr("motionText", undefined, motionPathType);
10
+
11
+ Text.prototype.__updateMotionText = function() {
12
+ const t = this;
13
+ if (!t.__.__textDrawData) return;
14
+ const data = t.__, {motion: motion, motionAround: motionAround} = data, {rows: rows, bounds: bounds} = data.__textDrawData;
15
+ let row, motionData;
16
+ const base = this.getMotionPoint(motion);
17
+ const textPath = [], pathPoint = {};
18
+ const pathElement = this.getMotionPath();
19
+ let offsetX = 0, offsetY = 0;
20
+ if (motionAround && motionAround !== "top-left") {
21
+ AroundHelper.toPoint(motionAround, bounds, tempPoint);
22
+ offsetX = -tempPoint.x * t.scaleX, offsetY = -tempPoint.y * t.scaleY;
23
+ }
24
+ t.set({
25
+ x: base.x,
26
+ y: base.y
27
+ });
28
+ if (t.scale != 1) t.scale = 1;
29
+ if (t.rotation) t.rotation = 0;
30
+ for (let i = 0, len = rows.length; i < len; i++) {
31
+ row = rows[i];
32
+ if (row.data) row.data.forEach((charData, index) => {
33
+ motionData = charData.motion = this.getMotionPoint(motion, undefined, offsetX + charData.x, offsetY + row.y, pathElement);
34
+ PointHelper.move(motionData, -base.x, -base.y);
35
+ PointHelper.copy(pathPoint, motionData);
36
+ PointHelper.toVertical(pathPoint, motionData.rotation, data.fontSize / 2);
37
+ if (!index) {
38
+ PathCommandDataHelper.moveTo(textPath, motionData.x, motionData.y);
39
+ } else {
40
+ PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y);
41
+ if (index === row.data.length - 1) {
42
+ motionData = this.getMotionPoint(motion, undefined, offsetX + charData.x + charData.width, offsetY + row.y + data.fontSize / 2, pathElement);
43
+ PointHelper.move(motionData, -base.x, -base.y);
44
+ PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y);
45
+ }
46
+ }
47
+ });
48
+ }
49
+ t.__.__pathForMotionText = textPath;
50
+ PathBounds.toBounds(textPath, t.__layout.boxBounds);
51
+ BoundsHelper.spread(t.__layout.boxBounds, data.fontSize);
52
+ t.__layout.contentBounds = t.__layout.boxBounds;
53
+ t.__layout.resized = "inner";
54
+ };
55
+
56
+ Paint.fillMotionText = function(ui, canvas, _renderOptions) {
57
+ const data = ui.__, {rows: rows} = data.__textDrawData;
58
+ if (data.__isPlacehold && data.placeholderColor) canvas.fillStyle = data.placeholderColor;
59
+ let row, motion;
60
+ const useRotation = data.motionRotation !== false;
61
+ for (let i = 0, len = rows.length; i < len; i++) {
62
+ row = rows[i];
63
+ if (row.data) row.data.forEach(charData => {
64
+ motion = charData.motion;
65
+ if (useRotation) {
66
+ canvas.setTransform(canvas.worldTransform);
67
+ canvas.translate(motion.x, motion.y);
68
+ canvas.rotate(motion.rotation * OneRadian);
69
+ canvas.fillText(charData.char, 0, 0);
70
+ } else {
71
+ canvas.fillText(charData.char, motion.x, motion.y);
72
+ }
73
+ });
74
+ }
75
+ };
@@ -0,0 +1,2 @@
1
+ import{Plugin as t,Text as o,AroundHelper as e,PointHelper as n,PathCommandDataHelper as a,PathBounds as i,BoundsHelper as r,Paint as l,OneRadian as s}from"@leafer-ui/draw";import{motionPathType as _}from"@leafer-in/motion-path";t.add("motion-text");const d={};o.addAttr("motionText",void 0,_),o.prototype.__updateMotionText=function(){const t=this;if(!t.__.__textDrawData)return;const o=t.__,{motion:l,motionAround:s}=o,{rows:_,bounds:x}=o.__textDrawData;let c,f;const y=this.getMotionPoint(l),h=[],m={},u=this.getMotionPath();let p=0,T=0;s&&"top-left"!==s&&(e.toPoint(s,x,d),p=-d.x*t.scaleX,T=-d.y*t.scaleY),t.set({x:y.x,y:y.y}),1!=t.scale&&(t.scale=1),t.rotation&&(t.rotation=0);for(let t=0,e=_.length;t<e;t++)c=_[t],c.data&&c.data.forEach((t,e)=>{f=t.motion=this.getMotionPoint(l,void 0,p+t.x,T+c.y,u),n.move(f,-y.x,-y.y),n.copy(m,f),n.toVertical(m,f.rotation,o.fontSize/2),e?(a.lineTo(h,f.x,f.y),e===c.data.length-1&&(f=this.getMotionPoint(l,void 0,p+t.x+t.width,T+c.y+o.fontSize/2,u),n.move(f,-y.x,-y.y),a.lineTo(h,f.x,f.y))):a.moveTo(h,f.x,f.y)});t.__.__pathForMotionText=h,i.toBounds(h,t.__layout.boxBounds),r.spread(t.__layout.boxBounds,o.fontSize),t.__layout.contentBounds=t.__layout.boxBounds,t.__layout.resized="inner"},l.fillMotionText=function(t,o,e){const n=t.__,{rows:a}=n.__textDrawData;let i,r;n.__isPlacehold&&n.placeholderColor&&(o.fillStyle=n.placeholderColor);const l=!1!==n.motionRotation;for(let t=0,e=a.length;t<e;t++)i=a[t],i.data&&i.data.forEach(t=>{r=t.motion,l?(o.setTransform(o.worldTransform),o.translate(r.x,r.y),o.rotate(r.rotation*s),o.fillText(t.char,0,0)):o.fillText(t.char,r.x,r.y)})};
2
+ //# sourceMappingURL=motion-text.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion-text.esm.min.js","sources":["../../../../../../src/in/packages/motion-text/src/index.ts"],"sourcesContent":["import { ITextData, ITextRowData, IText, ILeaferCanvas, IRenderOptions, IRotationPointData, IPathCommandData, IPointData } from '@leafer-ui/interface'\nimport { OneRadian, Paint, Plugin, PointHelper, Text, PathCommandDataHelper, PathBounds, BoundsHelper, AroundHelper } from '@leafer-ui/draw'\n\nimport { motionPathType } from '@leafer-in/motion-path'\n\n\nPlugin.add('motion-text')\n\nconst tempPoint = {} as IPointData\n\n\nText.addAttr('motionText', undefined, motionPathType)\n\n\nText.prototype.__updateMotionText = function () {\n\n const t = this\n\n if (!t.__.__textDrawData) return\n\n const data = t.__ as ITextData, { motion, motionAround } = data, { rows, bounds } = data.__textDrawData\n\n\n let row: ITextRowData, motionData: IRotationPointData\n\n const base = this.getMotionPoint(motion)\n\n const textPath: IPathCommandData = [], pathPoint = {} as IPointData\n\n const pathElement = this.getMotionPath()\n\n let offsetX: number = 0, offsetY: number = 0\n if (motionAround && motionAround !== 'top-left') {\n AroundHelper.toPoint(motionAround, bounds, tempPoint)\n offsetX = -tempPoint.x * t.scaleX, offsetY = -tempPoint.y * t.scaleY\n }\n\n t.set({ x: base.x, y: base.y })\n if (t.scale != 1) t.scale = 1\n if (t.rotation) t.rotation = 0\n\n for (let i = 0, len = rows.length; i < len; i++) {\n row = rows[i]\n\n if (row.data) row.data.forEach((charData, index) => {\n motionData = charData.motion = this.getMotionPoint(motion, undefined, offsetX + charData.x, offsetY + row.y, pathElement)\n PointHelper.move(motionData, -base.x, -base.y)\n\n PointHelper.copy(pathPoint, motionData)\n PointHelper.toVertical(pathPoint, motionData.rotation, data.fontSize / 2)\n\n if (!index) {\n PathCommandDataHelper.moveTo(textPath, motionData.x, motionData.y)\n } else {\n PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y)\n\n if (index === row.data.length - 1) {\n motionData = this.getMotionPoint(motion, undefined, offsetX + charData.x + charData.width, offsetY + row.y + data.fontSize / 2, pathElement)\n PointHelper.move(motionData, -base.x, -base.y)\n PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y)\n }\n }\n })\n }\n\n t.__.__pathForMotionText = textPath\n\n // 修改boxBounds\n PathBounds.toBounds(textPath, t.__layout.boxBounds)\n BoundsHelper.spread(t.__layout.boxBounds, data.fontSize)\n\n t.__layout.contentBounds = t.__layout.boxBounds\n t.__layout.resized = 'inner'\n\n}\n\nPaint.fillMotionText = function (ui: IText, canvas: ILeaferCanvas, _renderOptions: IRenderOptions): void {\n\n const data = ui.__, { rows } = data.__textDrawData // , decorationY \n if (data.__isPlacehold && data.placeholderColor) canvas.fillStyle = data.placeholderColor\n\n let row: ITextRowData, motion: IRotationPointData\n const useRotation = data.motionRotation !== false\n\n for (let i = 0, len = rows.length; i < len; i++) {\n row = rows[i]\n\n if (row.data) row.data.forEach(charData => {\n\n motion = charData.motion\n\n if (useRotation) {\n canvas.setTransform(canvas.worldTransform)\n canvas.translate(motion.x, motion.y)\n canvas.rotate(motion.rotation * OneRadian)\n canvas.fillText(charData.char, 0, 0)\n } else {\n canvas.fillText(charData.char, motion.x, motion.y)\n }\n\n })\n }\n\n}"],"names":["Plugin","add","tempPoint","Text","addAttr","undefined","motionPathType","prototype","__updateMotionText","t","this","__","__textDrawData","data","motion","motionAround","rows","bounds","row","motionData","base","getMotionPoint","textPath","pathPoint","pathElement","getMotionPath","offsetX","offsetY","AroundHelper","toPoint","x","scaleX","y","scaleY","set","scale","rotation","i","len","length","forEach","charData","index","PointHelper","move","copy","toVertical","fontSize","PathCommandDataHelper","lineTo","width","moveTo","__pathForMotionText","PathBounds","toBounds","__layout","boxBounds","BoundsHelper","spread","contentBounds","resized","Paint","fillMotionText","ui","canvas","_renderOptions","__isPlacehold","placeholderColor","fillStyle","useRotation","motionRotation","setTransform","worldTransform","translate","rotate","OneRadian","fillText","char"],"mappings":"qOAMAA,EAAOC,IAAI,eAEX,MAAMC,EAAY,CAAA,EAGlBC,EAAKC,QAAQ,kBAAcC,EAAWC,GAGtCH,EAAKI,UAAUC,mBAAqB,WAEhC,MAAMC,EAAIC,KAEV,IAAKD,EAAEE,GAAGC,eAAgB,OAE1B,MAAMC,EAAOJ,EAAEE,IAAiBG,OAAEA,EAAMC,aAAEA,GAAiBF,GAAMG,KAAEA,EAAIC,OAAEA,GAAWJ,EAAKD,eAGzF,IAAIM,EAAmBC,EAEvB,MAAMC,EAAOV,KAAKW,eAAeP,GAE3BQ,EAA6B,GAAIC,EAAY,CAAA,EAE7CC,EAAcd,KAAKe,gBAEzB,IAAIC,EAAkB,EAAGC,EAAkB,EACvCZ,GAAiC,aAAjBA,IAChBa,EAAaC,QAAQd,EAAcE,EAAQf,GAC3CwB,GAAWxB,EAAU4B,EAAIrB,EAAEsB,OAAQJ,GAAWzB,EAAU8B,EAAIvB,EAAEwB,QAGlExB,EAAEyB,IAAI,CAAEJ,EAAGV,EAAKU,EAAGE,EAAGZ,EAAKY,IACZ,GAAXvB,EAAE0B,QAAY1B,EAAE0B,MAAQ,GACxB1B,EAAE2B,WAAU3B,EAAE2B,SAAW,GAE7B,IAAK,IAAIC,EAAI,EAAGC,EAAMtB,EAAKuB,OAAQF,EAAIC,EAAKD,IACxCnB,EAAMF,EAAKqB,GAEPnB,EAAIL,MAAMK,EAAIL,KAAK2B,QAAQ,CAACC,EAAUC,KACtCvB,EAAasB,EAAS3B,OAASJ,KAAKW,eAAeP,OAAQT,EAAWqB,EAAUe,EAASX,EAAGH,EAAUT,EAAIc,EAAGR,GAC7Gm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GhB,EAAOkB,GAClCgC,EAAOU,OAAO5D,EAAOsB,SAAWuC,GAChCX,EAAOY,SAASnC,EAASoC,KAAM,EAAG,IAElCb,EAAOY,SAASnC,EAASoC,KAAM/D,EAAOgB,EAAGhB,EAAOkB,IAMhE"}
@@ -0,0 +1,70 @@
1
+ (function(draw, motionPath) {
2
+ "use strict";
3
+ draw.Plugin.add("motion-text");
4
+ const tempPoint = {};
5
+ draw.Text.addAttr("motionText", undefined, motionPath.motionPathType);
6
+ draw.Text.prototype.__updateMotionText = function() {
7
+ const t = this;
8
+ if (!t.__.__textDrawData) return;
9
+ const data = t.__, {motion: motion, motionAround: motionAround} = data, {rows: rows, bounds: bounds} = data.__textDrawData;
10
+ let row, motionData;
11
+ const base = this.getMotionPoint(motion);
12
+ const textPath = [], pathPoint = {};
13
+ const pathElement = this.getMotionPath();
14
+ let offsetX = 0, offsetY = 0;
15
+ if (motionAround && motionAround !== "top-left") {
16
+ draw.AroundHelper.toPoint(motionAround, bounds, tempPoint);
17
+ offsetX = -tempPoint.x * t.scaleX, offsetY = -tempPoint.y * t.scaleY;
18
+ }
19
+ t.set({
20
+ x: base.x,
21
+ y: base.y
22
+ });
23
+ if (t.scale != 1) t.scale = 1;
24
+ if (t.rotation) t.rotation = 0;
25
+ for (let i = 0, len = rows.length; i < len; i++) {
26
+ row = rows[i];
27
+ if (row.data) row.data.forEach((charData, index) => {
28
+ motionData = charData.motion = this.getMotionPoint(motion, undefined, offsetX + charData.x, offsetY + row.y, pathElement);
29
+ draw.PointHelper.move(motionData, -base.x, -base.y);
30
+ draw.PointHelper.copy(pathPoint, motionData);
31
+ draw.PointHelper.toVertical(pathPoint, motionData.rotation, data.fontSize / 2);
32
+ if (!index) {
33
+ draw.PathCommandDataHelper.moveTo(textPath, motionData.x, motionData.y);
34
+ } else {
35
+ draw.PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y);
36
+ if (index === row.data.length - 1) {
37
+ motionData = this.getMotionPoint(motion, undefined, offsetX + charData.x + charData.width, offsetY + row.y + data.fontSize / 2, pathElement);
38
+ draw.PointHelper.move(motionData, -base.x, -base.y);
39
+ draw.PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y);
40
+ }
41
+ }
42
+ });
43
+ }
44
+ t.__.__pathForMotionText = textPath;
45
+ draw.PathBounds.toBounds(textPath, t.__layout.boxBounds);
46
+ draw.BoundsHelper.spread(t.__layout.boxBounds, data.fontSize);
47
+ t.__layout.contentBounds = t.__layout.boxBounds;
48
+ t.__layout.resized = "inner";
49
+ };
50
+ draw.Paint.fillMotionText = function(ui, canvas, _renderOptions) {
51
+ const data = ui.__, {rows: rows} = data.__textDrawData;
52
+ if (data.__isPlacehold && data.placeholderColor) canvas.fillStyle = data.placeholderColor;
53
+ let row, motion;
54
+ const useRotation = data.motionRotation !== false;
55
+ for (let i = 0, len = rows.length; i < len; i++) {
56
+ row = rows[i];
57
+ if (row.data) row.data.forEach(charData => {
58
+ motion = charData.motion;
59
+ if (useRotation) {
60
+ canvas.setTransform(canvas.worldTransform);
61
+ canvas.translate(motion.x, motion.y);
62
+ canvas.rotate(motion.rotation * draw.OneRadian);
63
+ canvas.fillText(charData.char, 0, 0);
64
+ } else {
65
+ canvas.fillText(charData.char, motion.x, motion.y);
66
+ }
67
+ });
68
+ }
69
+ };
70
+ })(LeaferUI, LeaferIN.motionPath);
@@ -0,0 +1,2 @@
1
+ "use strict";var t=require("@leafer-ui/draw"),o=require("@leafer-in/motion-path");t.Plugin.add("motion-text");const e={};t.Text.addAttr("motionText",void 0,o.motionPathType),t.Text.prototype.__updateMotionText=function(){const o=this;if(!o.__.__textDrawData)return;const a=o.__,{motion:n,motionAround:i}=a,{rows:r,bounds:l}=a.__textDrawData;let d,s;const _=this.getMotionPoint(n),x=[],h={},u=this.getMotionPath();let c=0,y=0;i&&"top-left"!==i&&(t.AroundHelper.toPoint(i,l,e),c=-e.x*o.scaleX,y=-e.y*o.scaleY),o.set({x:_.x,y:_.y}),1!=o.scale&&(o.scale=1),o.rotation&&(o.rotation=0);for(let o=0,e=r.length;o<e;o++)d=r[o],d.data&&d.data.forEach((o,e)=>{s=o.motion=this.getMotionPoint(n,void 0,c+o.x,y+d.y,u),t.PointHelper.move(s,-_.x,-_.y),t.PointHelper.copy(h,s),t.PointHelper.toVertical(h,s.rotation,a.fontSize/2),e?(t.PathCommandDataHelper.lineTo(x,s.x,s.y),e===d.data.length-1&&(s=this.getMotionPoint(n,void 0,c+o.x+o.width,y+d.y+a.fontSize/2,u),t.PointHelper.move(s,-_.x,-_.y),t.PathCommandDataHelper.lineTo(x,s.x,s.y))):t.PathCommandDataHelper.moveTo(x,s.x,s.y)});o.__.__pathForMotionText=x,t.PathBounds.toBounds(x,o.__layout.boxBounds),t.BoundsHelper.spread(o.__layout.boxBounds,a.fontSize),o.__layout.contentBounds=o.__layout.boxBounds,o.__layout.resized="inner"},t.Paint.fillMotionText=function(o,e,a){const n=o.__,{rows:i}=n.__textDrawData;let r,l;n.__isPlacehold&&n.placeholderColor&&(e.fillStyle=n.placeholderColor);const d=!1!==n.motionRotation;for(let o=0,a=i.length;o<a;o++)r=i[o],r.data&&r.data.forEach(o=>{l=o.motion,d?(e.setTransform(e.worldTransform),e.translate(l.x,l.y),e.rotate(l.rotation*t.OneRadian),e.fillText(o.char,0,0)):e.fillText(o.char,l.x,l.y)})};
2
+ //# sourceMappingURL=motion-text.min.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion-text.min.cjs","sources":["../../../../../../src/in/packages/motion-text/src/index.ts"],"sourcesContent":["import { ITextData, ITextRowData, IText, ILeaferCanvas, IRenderOptions, IRotationPointData, IPathCommandData, IPointData } from '@leafer-ui/interface'\nimport { OneRadian, Paint, Plugin, PointHelper, Text, PathCommandDataHelper, PathBounds, BoundsHelper, AroundHelper } from '@leafer-ui/draw'\n\nimport { motionPathType } from '@leafer-in/motion-path'\n\n\nPlugin.add('motion-text')\n\nconst tempPoint = {} as IPointData\n\n\nText.addAttr('motionText', undefined, motionPathType)\n\n\nText.prototype.__updateMotionText = function () {\n\n const t = this\n\n if (!t.__.__textDrawData) return\n\n const data = t.__ as ITextData, { motion, motionAround } = data, { rows, bounds } = data.__textDrawData\n\n\n let row: ITextRowData, motionData: IRotationPointData\n\n const base = this.getMotionPoint(motion)\n\n const textPath: IPathCommandData = [], pathPoint = {} as IPointData\n\n const pathElement = this.getMotionPath()\n\n let offsetX: number = 0, offsetY: number = 0\n if (motionAround && motionAround !== 'top-left') {\n AroundHelper.toPoint(motionAround, bounds, tempPoint)\n offsetX = -tempPoint.x * t.scaleX, offsetY = -tempPoint.y * t.scaleY\n }\n\n t.set({ x: base.x, y: base.y })\n if (t.scale != 1) t.scale = 1\n if (t.rotation) t.rotation = 0\n\n for (let i = 0, len = rows.length; i < len; i++) {\n row = rows[i]\n\n if (row.data) row.data.forEach((charData, index) => {\n motionData = charData.motion = this.getMotionPoint(motion, undefined, offsetX + charData.x, offsetY + row.y, pathElement)\n PointHelper.move(motionData, -base.x, -base.y)\n\n PointHelper.copy(pathPoint, motionData)\n PointHelper.toVertical(pathPoint, motionData.rotation, data.fontSize / 2)\n\n if (!index) {\n PathCommandDataHelper.moveTo(textPath, motionData.x, motionData.y)\n } else {\n PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y)\n\n if (index === row.data.length - 1) {\n motionData = this.getMotionPoint(motion, undefined, offsetX + charData.x + charData.width, offsetY + row.y + data.fontSize / 2, pathElement)\n PointHelper.move(motionData, -base.x, -base.y)\n PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y)\n }\n }\n })\n }\n\n t.__.__pathForMotionText = textPath\n\n // 修改boxBounds\n PathBounds.toBounds(textPath, t.__layout.boxBounds)\n BoundsHelper.spread(t.__layout.boxBounds, data.fontSize)\n\n t.__layout.contentBounds = t.__layout.boxBounds\n t.__layout.resized = 'inner'\n\n}\n\nPaint.fillMotionText = function (ui: IText, canvas: ILeaferCanvas, _renderOptions: IRenderOptions): void {\n\n const data = ui.__, { rows } = data.__textDrawData // , decorationY \n if (data.__isPlacehold && data.placeholderColor) canvas.fillStyle = data.placeholderColor\n\n let row: ITextRowData, motion: IRotationPointData\n const useRotation = data.motionRotation !== false\n\n for (let i = 0, len = rows.length; i < len; i++) {\n row = rows[i]\n\n if (row.data) row.data.forEach(charData => {\n\n motion = charData.motion\n\n if (useRotation) {\n canvas.setTransform(canvas.worldTransform)\n canvas.translate(motion.x, motion.y)\n canvas.rotate(motion.rotation * OneRadian)\n canvas.fillText(charData.char, 0, 0)\n } else {\n canvas.fillText(charData.char, motion.x, motion.y)\n }\n\n })\n }\n\n}"],"names":["Plugin","add","tempPoint","Text","addAttr","undefined","motionPathType","prototype","__updateMotionText","t","this","__","__textDrawData","data","motion","motionAround","rows","bounds","row","motionData","base","getMotionPoint","textPath","pathPoint","pathElement","getMotionPath","offsetX","offsetY","AroundHelper","toPoint","x","scaleX","y","scaleY","set","scale","rotation","i","len","length","forEach","charData","index","PointHelper","move","copy","toVertical","fontSize","PathCommandDataHelper","lineTo","width","moveTo","__pathForMotionText","PathBounds","toBounds","__layout","boxBounds","BoundsHelper","spread","contentBounds","resized","Paint","fillMotionText","ui","canvas","_renderOptions","__isPlacehold","placeholderColor","fillStyle","useRotation","motionRotation","setTransform","worldTransform","translate","rotate","OneRadian","fillText","char"],"mappings":"kFAMAA,EAAAA,OAAOC,IAAI,eAEX,MAAMC,EAAY,CAAA,EAGlBC,EAAAA,KAAKC,QAAQ,kBAAcC,EAAWC,kBAGtCH,EAAAA,KAAKI,UAAUC,mBAAqB,WAEhC,MAAMC,EAAIC,KAEV,IAAKD,EAAEE,GAAGC,eAAgB,OAE1B,MAAMC,EAAOJ,EAAEE,IAAiBG,OAAEA,EAAMC,aAAEA,GAAiBF,GAAMG,KAAEA,EAAIC,OAAEA,GAAWJ,EAAKD,eAGzF,IAAIM,EAAmBC,EAEvB,MAAMC,EAAOV,KAAKW,eAAeP,GAE3BQ,EAA6B,GAAIC,EAAY,CAAA,EAE7CC,EAAcd,KAAKe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B+B,EAAAA,WAAWC,SAAShC,EAAUb,EAAE8C,SAASC,WACzCC,EAAAA,aAAaC,OAAOjD,EAAE8C,SAASC,UAAW3C,EAAKkC,UAE/CtC,EAAE8C,SAASI,cAAgBlD,EAAE8C,SAASC,UACtC/C,EAAE8C,SAASK,QAAU,OAEzB,EAEAC,EAAAA,MAAMC,eAAiB,SAAUC,EAAWC,EAAuBC,GAE/D,MAAMpD,EAAOkD,EAAGpD,IAAIK,KAAEA,GAASH,EAAKD,eAGpC,IAAIM,EAAmBJ,EAFnBD,EAAKqD,eAAiBrD,EAAKsD,mBAAkBH,EAAOI,UAAYvD,EAAKsD,kBAGzE,MAAME,GAAsC,IAAxBxD,EAAKyD,eAEzB,IAAK,IAAIjC,EAAI,EAAGC,EAAMtB,EAAKuB,OAAQF,EAAIC,EAAKD,IACxCnB,EAAMF,EAAKqB,GAEPnB,EAAIL,MAAMK,EAAIL,KAAK2B,QAAQC,IAE3B3B,EAAS2B,EAAS3B,OAEduD,GACAL,EAAOO,aAAaP,EAAOQ,gBAC3BR,EAAOS,UAAU3D,EAAOgB,EAAGhB,EAAOkB,GAClCgC,EAAOU,OAAO5D,EAAOsB,SAAWuC,EAAAA,WAChCX,EAAOY,SAASnC,EAASoC,KAAM,EAAG,IAElCb,EAAOY,SAASnC,EAASoC,KAAM/D,EAAOgB,EAAGhB,EAAOkB,IAMhE"}
@@ -0,0 +1,2 @@
1
+ !function(t,o){"use strict";t.Plugin.add("motion-text");const e={};t.Text.addAttr("motionText",void 0,o.motionPathType),t.Text.prototype.__updateMotionText=function(){const o=this;if(!o.__.__textDrawData)return;const n=o.__,{motion:a,motionAround:i}=n,{rows:l,bounds:r}=n.__textDrawData;let s,d;const _=this.getMotionPoint(a),x=[],c={},h=this.getMotionPath();let u=0,y=0;i&&"top-left"!==i&&(t.AroundHelper.toPoint(i,r,e),u=-e.x*o.scaleX,y=-e.y*o.scaleY),o.set({x:_.x,y:_.y}),1!=o.scale&&(o.scale=1),o.rotation&&(o.rotation=0);for(let o=0,e=l.length;o<e;o++)s=l[o],s.data&&s.data.forEach((o,e)=>{d=o.motion=this.getMotionPoint(a,void 0,u+o.x,y+s.y,h),t.PointHelper.move(d,-_.x,-_.y),t.PointHelper.copy(c,d),t.PointHelper.toVertical(c,d.rotation,n.fontSize/2),e?(t.PathCommandDataHelper.lineTo(x,d.x,d.y),e===s.data.length-1&&(d=this.getMotionPoint(a,void 0,u+o.x+o.width,y+s.y+n.fontSize/2,h),t.PointHelper.move(d,-_.x,-_.y),t.PathCommandDataHelper.lineTo(x,d.x,d.y))):t.PathCommandDataHelper.moveTo(x,d.x,d.y)});o.__.__pathForMotionText=x,t.PathBounds.toBounds(x,o.__layout.boxBounds),t.BoundsHelper.spread(o.__layout.boxBounds,n.fontSize),o.__layout.contentBounds=o.__layout.boxBounds,o.__layout.resized="inner"},t.Paint.fillMotionText=function(o,e,n){const a=o.__,{rows:i}=a.__textDrawData;let l,r;a.__isPlacehold&&a.placeholderColor&&(e.fillStyle=a.placeholderColor);const s=!1!==a.motionRotation;for(let o=0,n=i.length;o<n;o++)l=i[o],l.data&&l.data.forEach(o=>{r=o.motion,s?(e.setTransform(e.worldTransform),e.translate(r.x,r.y),e.rotate(r.rotation*t.OneRadian),e.fillText(o.char,0,0)):e.fillText(o.char,r.x,r.y)})}}(LeaferUI,LeaferIN.motionPath);
2
+ //# sourceMappingURL=motion-text.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion-text.min.js","sources":["../../../../../../src/in/packages/motion-text/src/index.ts"],"sourcesContent":["import { ITextData, ITextRowData, IText, ILeaferCanvas, IRenderOptions, IRotationPointData, IPathCommandData, IPointData } from '@leafer-ui/interface'\nimport { OneRadian, Paint, Plugin, PointHelper, Text, PathCommandDataHelper, PathBounds, BoundsHelper, AroundHelper } from '@leafer-ui/draw'\n\nimport { motionPathType } from '@leafer-in/motion-path'\n\n\nPlugin.add('motion-text')\n\nconst tempPoint = {} as IPointData\n\n\nText.addAttr('motionText', undefined, motionPathType)\n\n\nText.prototype.__updateMotionText = function () {\n\n const t = this\n\n if (!t.__.__textDrawData) return\n\n const data = t.__ as ITextData, { motion, motionAround } = data, { rows, bounds } = data.__textDrawData\n\n\n let row: ITextRowData, motionData: IRotationPointData\n\n const base = this.getMotionPoint(motion)\n\n const textPath: IPathCommandData = [], pathPoint = {} as IPointData\n\n const pathElement = this.getMotionPath()\n\n let offsetX: number = 0, offsetY: number = 0\n if (motionAround && motionAround !== 'top-left') {\n AroundHelper.toPoint(motionAround, bounds, tempPoint)\n offsetX = -tempPoint.x * t.scaleX, offsetY = -tempPoint.y * t.scaleY\n }\n\n t.set({ x: base.x, y: base.y })\n if (t.scale != 1) t.scale = 1\n if (t.rotation) t.rotation = 0\n\n for (let i = 0, len = rows.length; i < len; i++) {\n row = rows[i]\n\n if (row.data) row.data.forEach((charData, index) => {\n motionData = charData.motion = this.getMotionPoint(motion, undefined, offsetX + charData.x, offsetY + row.y, pathElement)\n PointHelper.move(motionData, -base.x, -base.y)\n\n PointHelper.copy(pathPoint, motionData)\n PointHelper.toVertical(pathPoint, motionData.rotation, data.fontSize / 2)\n\n if (!index) {\n PathCommandDataHelper.moveTo(textPath, motionData.x, motionData.y)\n } else {\n PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y)\n\n if (index === row.data.length - 1) {\n motionData = this.getMotionPoint(motion, undefined, offsetX + charData.x + charData.width, offsetY + row.y + data.fontSize / 2, pathElement)\n PointHelper.move(motionData, -base.x, -base.y)\n PathCommandDataHelper.lineTo(textPath, motionData.x, motionData.y)\n }\n }\n })\n }\n\n t.__.__pathForMotionText = textPath\n\n // 修改boxBounds\n PathBounds.toBounds(textPath, t.__layout.boxBounds)\n BoundsHelper.spread(t.__layout.boxBounds, data.fontSize)\n\n t.__layout.contentBounds = t.__layout.boxBounds\n t.__layout.resized = 'inner'\n\n}\n\nPaint.fillMotionText = function (ui: IText, canvas: ILeaferCanvas, _renderOptions: IRenderOptions): void {\n\n const data = ui.__, { rows } = data.__textDrawData // , decorationY \n if (data.__isPlacehold && data.placeholderColor) canvas.fillStyle = data.placeholderColor\n\n let row: ITextRowData, motion: IRotationPointData\n const useRotation = data.motionRotation !== false\n\n for (let i = 0, len = rows.length; i < len; i++) {\n row = rows[i]\n\n if (row.data) row.data.forEach(charData => {\n\n motion = charData.motion\n\n if (useRotation) {\n canvas.setTransform(canvas.worldTransform)\n canvas.translate(motion.x, motion.y)\n canvas.rotate(motion.rotation * OneRadian)\n canvas.fillText(charData.char, 0, 0)\n } else {\n canvas.fillText(charData.char, motion.x, motion.y)\n }\n\n })\n }\n\n}"],"names":["Plugin","add","tempPoint","Text","addAttr","undefined","motionPathType","prototype","__updateMotionText","t","this","__","__textDrawData","data","motion","motionAround","rows","bounds","row","motionData","base","getMotionPoint","textPath","pathPoint","pathElement","getMotionPath","offsetX","offsetY","AroundHelper","toPoint","x","scaleX","y","scaleY","set","scale","rotation","i","len","length","forEach","charData","index","PointHelper","move","copy","toVertical","fontSize","PathCommandDataHelper","lineTo","width","moveTo","__pathForMotionText","PathBounds","toBounds","__layout","boxBounds","BoundsHelper","spread","contentBounds","resized","Paint","fillMotionText","ui","canvas","_renderOptions","__isPlacehold","placeholderColor","fillStyle","useRotation","motionRotation","setTransform","worldTransform","translate","rotate","OneRadian","fillText","char"],"mappings":"4BAMAA,EAAAA,OAAOC,IAAI,eAEX,MAAMC,EAAY,CAAA,EAGlBC,EAAAA,KAAKC,QAAQ,kBAAcC,EAAWC,kBAGtCH,EAAAA,KAAKI,UAAUC,mBAAqB,WAEhC,MAAMC,EAAIC,KAEV,IAAKD,EAAEE,GAAGC,eAAgB,OAE1B,MAAMC,EAAOJ,EAAEE,IAAiBG,OAAEA,EAAMC,aAAEA,GAAiBF,GAAMG,KAAEA,EAAIC,OAAEA,GAAWJ,EAAKD,eAGzF,IAAIM,EAAmBC,EAEvB,MAAMC,EAAOV,KAAKW,eAAeP,GAE3BQ,EAA6B,GAAIC,EAAY,CAAA,EAE7CC,EAAc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9B,EAG3B+B,EAAAA,WAAWC,SAAShC,EAAUb,EAAE8C,SAASC,WACzCC,EAAAA,aAAaC,OAAOjD,EAAE8C,SAASC,UAAW3C,EAAKkC,UAE/CtC,EAAE8C,SAASI,cAAgBlD,EAAE8C,SAASC,UACtC/C,EAAE8C,SAASK,QAAU,OAEzB,EAEAC,EAAAA,MAAMC,eAAiB,SAAUC,EAAWC,EAAuBC,GAE/D,MAAMpD,EAAOkD,EAAGpD,IAAIK,KAAEA,GAASH,EAAKD,eAGpC,IAAIM,EAAmBJ,EAFnBD,EAAKqD,eAAiBrD,EAAKsD,mBAAkBH,EAAOI,UAAYvD,EAAKsD,kBAGzE,MAAME,GAAsC,IAAxBxD,EAAKyD,eAEzB,IAAK,IAAIjC,EAAI,EAAGC,EAAMtB,EAAKuB,OAAQF,EAAIC,EAAKD,IACxCnB,EAAMF,EAAKqB,GAEPnB,EAAIL,MAAMK,EAAIL,KAAK2B,QAAQC,IAE3B3B,EAAS2B,EAAS3B,OAEduD,GACAL,EAAOO,aAAaP,EAAOQ,gBAC3BR,EAAOS,UAAU3D,EAAOgB,EAAGhB,EAAOkB,GAClCgC,EAAOU,OAAO5D,EAAOsB,SAAWuC,EAAAA,WAChCX,EAAOY,SAASnC,EAASoC,KAAM,EAAG,IAElCb,EAAOY,SAASnC,EAASoC,KAAM/D,EAAOgB,EAAGhB,EAAOkB,IAMhE"}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@leafer-in/motion-text",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "@leafer-in/motion-text",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
- "main": "dist/motion-text.esm.js",
8
+ "main": "dist/motion-text.esm.min.js",
9
9
  "exports": {
10
- "import": "./dist/motion-text.esm.js",
11
- "require": "./dist/motion-text.cjs",
10
+ "import": "./dist/motion-text.esm.min.js",
11
+ "require": "./dist/motion-text.min.cjs",
12
12
  "types": "./types/index.d.ts"
13
13
  },
14
14
  "types": "types/index.d.ts",
15
- "unpkg": "dist/motion-text.js",
16
- "jsdelivr": "dist/motion-text.js",
15
+ "unpkg": "dist/motion-text.min.js",
16
+ "jsdelivr": "dist/motion-text.min.js",
17
17
  "files": [
18
18
  "src",
19
19
  "types",
@@ -34,8 +34,8 @@
34
34
  "leaferjs"
35
35
  ],
36
36
  "peerDependencies": {
37
- "@leafer-ui/draw": "^2.3.0",
38
- "@leafer-in/motion-path": "^2.3.0",
39
- "@leafer-ui/interface": "^2.3.0"
37
+ "@leafer-ui/draw": "^2.3.1",
38
+ "@leafer-in/motion-path": "^2.3.1",
39
+ "@leafer-ui/interface": "^2.3.1"
40
40
  }
41
41
  }