@ -8,6 +8,8 @@ var config = {
@@ -8,6 +8,8 @@ var config = {
shapeWidth:100,// 8 shape of animation: width
shapeHeight:1300,// 8 shape of animation: height;
playDuration:16,// seconds. how long should audio play after dragging/pressing next. Something like audio duration / nr of images. Note that if everything is sorted interview will just continue;
textColor:"orange",
font:"bold 70px Arial",
}
// polyfill
@ -282,6 +284,12 @@ class Parade {
@@ -282,6 +284,12 @@ class Parade {
this.changeSorterImage();
}
reset(){
// for use in terminal only. Quick way to test
localStorage.clear();
location.reload();
}
play(){
// play audio for n seconds:
// extend timeout if it's already playing
@ -369,7 +377,7 @@ class Parade {
@@ -369,7 +377,7 @@ class Parade {
for(letiinthis.images){
// create the Meshes with the images in the scene
this.images[i].makeMesh(this.scene);
this.images[i].makeMesh(this.scene,this.config);
}
@ -403,7 +411,8 @@ class ParadeImage {
@@ -403,7 +411,8 @@ class ParadeImage {
this.target_position_time=time_complete;
}
makeMesh(scene){
makeMesh(scene,config){
this.mesh=newBABYLON.TransformNode();
varplaneOptions={
// TODO: should size be dynamic?
height:5.4762,
@ -411,14 +420,49 @@ class ParadeImage {
@@ -411,14 +420,49 @@ class ParadeImage {
sideOrientation:BABYLON.Mesh.DOUBLESIDE// texture should be visible from front and back