koishi-plugin-chat-analyse 1.6.3 → 1.6.5
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 +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1784,7 +1784,7 @@ var Renderer = class {
|
|
|
1784
1784
|
const relativeSize = relativeFontSizes[i];
|
|
1785
1785
|
estimatedCurrentArea += Math.pow(relativeSize, 2) * wordText.length * 0.6;
|
|
1786
1786
|
}
|
|
1787
|
-
const scalingFactor = Math.sqrt(
|
|
1787
|
+
const scalingFactor = Math.sqrt(600 * 600 * 0.8 / Math.max(1, estimatedCurrentArea));
|
|
1788
1788
|
const wordList = words.map((word, i) => {
|
|
1789
1789
|
let finalSize = relativeFontSizes[i] * scalingFactor;
|
|
1790
1790
|
finalSize = Math.max(4, Math.min(128, finalSize));
|
|
@@ -2549,7 +2549,7 @@ var Config3 = import_koishi7.Schema.intersect([
|
|
|
2549
2549
|
enableSimilarActivity: import_koishi7.Schema.boolean().default(true).description("启用相似活跃分析")
|
|
2550
2550
|
}).description("高级分析配置"),
|
|
2551
2551
|
import_koishi7.Schema.object({
|
|
2552
|
-
MaxWords: import_koishi7.Schema.number().min(0).default(
|
|
2552
|
+
MaxWords: import_koishi7.Schema.number().min(0).default(0).description("最大词量"),
|
|
2553
2553
|
ellipticity: import_koishi7.Schema.number().min(0).max(1).default(1).description("长宽比"),
|
|
2554
2554
|
rotationSteps: import_koishi7.Schema.number().min(0).default(3).description("旋转步数"),
|
|
2555
2555
|
minRotation: import_koishi7.Schema.number().min(-Math.PI).max(Math.PI).default(-Math.PI / 2).description("最小旋转角"),
|