refactoring
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user