refactoring

This commit is contained in:
2025-11-06 18:17:56 +02:00
parent fd3f9a6d69
commit 4565782e9f
14 changed files with 113 additions and 92 deletions
@@ -3,15 +3,16 @@ import { Text } from "troika-three-text";
import { assignParams } from "@/lib/MeshUtils";
class TextObject {
constructor(obj, engine, params) {
constructor(engine, obj) {
console.log('OBJ', obj)
const txt = new Text();
// Set properties to configure:
txt.text = obj.text;
txt.fontSize = 0.033;
txt.lineHeight = 1.1;
txt.maxWidth = obj.width || params.wallSize * .73;
txt.maxWidth = obj.width;
txt.textAlign = 'center';
txt.font = params.fontPath;
txt.font = obj.fontPath;
txt.anchorX = 'center';
txt.anchorY = 'bottom';
txt.curveRadius = 0;