koishi-plugin-chat-analyse 1.5.4 → 1.5.6
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/lib/index.js +3 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1771,7 +1771,7 @@ var Renderer = class {
|
|
|
1771
1771
|
const maxWeight = Math.max(...weights, 1);
|
|
1772
1772
|
const minWeight = Math.max(Math.min(...weights), 1);
|
|
1773
1773
|
const wordCount = words.length;
|
|
1774
|
-
let calculatedMaxFontSize = Math.round(
|
|
1774
|
+
let calculatedMaxFontSize = Math.round(1280 / Math.sqrt(wordCount));
|
|
1775
1775
|
let calculatedMinFontSize = Math.round(calculatedMaxFontSize / 6);
|
|
1776
1776
|
const maxFontSize = Math.max(4, Math.min(128, calculatedMaxFontSize));
|
|
1777
1777
|
const minFontSize = Math.max(4, Math.min(maxFontSize, calculatedMinFontSize));
|
|
@@ -2544,8 +2544,8 @@ var Config3 = import_koishi7.Schema.intersect([
|
|
|
2544
2544
|
MaxWords: import_koishi7.Schema.number().min(0).default(0).description("最大词量"),
|
|
2545
2545
|
ellipticity: import_koishi7.Schema.number().min(0).max(1).default(1).description("长宽比"),
|
|
2546
2546
|
rotationSteps: import_koishi7.Schema.number().min(0).default(3).description("旋转步数"),
|
|
2547
|
-
minRotation: import_koishi7.Schema.number().default(-Math.PI / 2).description("最小旋转角"),
|
|
2548
|
-
maxRotation: import_koishi7.Schema.number().default(Math.PI / 2).description("最大旋转角"),
|
|
2547
|
+
minRotation: import_koishi7.Schema.number().min(-Math.PI).max(Math.PI).default(-Math.PI / 2).description("最小旋转角"),
|
|
2548
|
+
maxRotation: import_koishi7.Schema.number().min(-Math.PI).max(Math.PI).default(Math.PI / 2).description("最大旋转角"),
|
|
2549
2549
|
shape: import_koishi7.Schema.string().default("square").description("词云形状"),
|
|
2550
2550
|
color: import_koishi7.Schema.string().default("random-light").description("词云颜色"),
|
|
2551
2551
|
fontFamily: import_koishi7.Schema.string().default('"Noto Sans CJK SC", Arial, sans-serif').description("词云字体"),
|