amazing maze
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { MeshStandardMaterial, Color, Vector3 } from "three";
|
||||
import { Text } from "troika-three-text";
|
||||
import Utils from "@/lib/utils";
|
||||
import { assignParams } from "@/lib/MeshUtils";
|
||||
|
||||
class TextObject {
|
||||
constructor(obj, params) {
|
||||
const txt = new Text();
|
||||
// Set properties to configure:
|
||||
txt.text = obj.text;
|
||||
txt.fontSize = 0.022;
|
||||
txt.fontSize = 0.033;
|
||||
txt.lineHeight = 1.1;
|
||||
txt.maxWidth = obj.width || params.wallSize * .73;
|
||||
txt.textAlign = 'center';
|
||||
@@ -16,18 +16,19 @@ class TextObject {
|
||||
txt.anchorY = 'bottom';
|
||||
txt.curveRadius = 0;
|
||||
txt.outlineColor = 0xffffff;
|
||||
txt.outlineWidth = '15%';
|
||||
txt.outlineBlur = '50%';
|
||||
Utils.assignMeshParams(txt, obj)
|
||||
txt.outlineWidth = '1%';
|
||||
txt.depthOffset = 0.1;
|
||||
//txt.outlineBlur = '50%';
|
||||
txt.color = new Color(0xffffff);
|
||||
assignParams(txt, obj)
|
||||
let m = new MeshStandardMaterial({
|
||||
roughness: .73,
|
||||
metalness: .37,
|
||||
});
|
||||
txt.material = m;
|
||||
txt.color = new Color(0x0);
|
||||
txt.sync();
|
||||
this.txt = txt;
|
||||
this.mesh = txt;
|
||||
this.object = txt;
|
||||
// if (obj.effect == 'distance') {
|
||||
// let dstm = .8;
|
||||
// var oldBR = txt.onBeforeRender;
|
||||
|
||||
Reference in New Issue
Block a user