From 7c211d268f6dd9d8eb6a59ff32d847b0b033bf86 Mon Sep 17 00:00:00 2001 From: goynov Date: Wed, 26 Nov 2025 17:49:45 +0200 Subject: [PATCH] #31 --- .../MazeQuizGame/MazeQuizGame.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/InteractiveObjects/MazeQuizGame/MazeQuizGame.js b/src/components/InteractiveObjects/MazeQuizGame/MazeQuizGame.js index 0d6e1c4..14f7674 100644 --- a/src/components/InteractiveObjects/MazeQuizGame/MazeQuizGame.js +++ b/src/components/InteractiveObjects/MazeQuizGame/MazeQuizGame.js @@ -3,9 +3,9 @@ import Utils from "@/lib/Utils"; import { EventDispatcher } from "three"; const params = { - scale: 5, - wallSize: 5 * 1.2, - tubeSize: 5 * 1.2, + scale: 3, + wallSize: 3 * 1.2, + tubeSize: 3 * 1.2, } const imgParams = { @@ -17,20 +17,20 @@ const imgParams = { } const textParams = { - type: 'TextObject', width:0.073 * params.wallSize, + type: 'TextObject', width:0.44, fontPath:'/static/fonts/Montserrat-Regular.ttf', fontSize:0.025 } const defaults = { arrows:{ - r: len => ({ position:[-.5,.44,len+.96], rotation:[0,Math.PI, 0], ...imgParams }), - l: len => ({ position:[.5,.44,len+.96], rotation:[0,Math.PI, Math.PI], ...imgParams }), - f: len => ({ position:[0,.7,len+.96], rotation:[0,Math.PI, Math.PI/2], ...imgParams }) + r: len => ({ position:[-.5,.25,len+.9], rotation:[0,Math.PI, 0], ...imgParams }), + l: len => ({ position:[.5,.25,len+.9], rotation:[0,Math.PI, Math.PI], ...imgParams }), + f: len => ({ position:[0,.37,len+.96], rotation:[0,Math.PI, Math.PI/2], ...imgParams }) }, answers:{ r: (len, text) => ({ ...textParams, text, position:[-.5,.3,len+.9], rotation:[0,Math.PI, 0] }), l: (len, text) => ({ ...textParams, text, position:[.5,.3,len+.9], rotation:[0,Math.PI, 0] }), - f: (len, text) => ({ ...textParams, text, position:[0,.55,len+.9], rotation:[0,Math.PI, 0] }) + f: (len, text) => ({ ...textParams, anchorY:'top', text, position:[0,.3,len+.9], rotation:[0,Math.PI, 0] }) } } @@ -114,7 +114,7 @@ class MazeQuizGame extends EventDispatcher { len, userData: { question, qid }, objects:[ { - ...textParams, text: question.q, fontSize:0.033, position:[0,.33,len + .96], rotation:[0,Math.PI, 0] + ...textParams, text: question.q, fontSize:0.033, width:0.55, position:[0,.55,len + .96], rotation:[0,Math.PI, 0] } ] } @@ -147,7 +147,7 @@ class MazeQuizGame extends EventDispatcher { len: 3, objects:[ { - ...textParams, color:0xff0000, text: question.h, fontSize:0.033, position:[0,.44,3+.96], rotation:[0,Math.PI, 0] + ...textParams, color:0xff0000, text: question.h, fontSize:0.033, width:0.66, position:[0,.44,3+.96], rotation:[0,Math.PI, 0] } ] }