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