|
|
|
@ -31,7 +31,7 @@ |
|
|
|
|
<!-- still experimenting, see webdav.html --> |
|
|
|
|
<script src='dependencies/webdav.js'></script> |
|
|
|
|
|
|
|
|
|
<script src='jxr.js?212345'></script> |
|
|
|
|
<script src='jxr.js?12345'></script> |
|
|
|
|
<!-- replacing with local copies as CDNs are like unpkg tend to be slow |
|
|
|
|
<script type="module" src="https://unpkg.com/immers-client/dist/destination.bundle.js"></script> |
|
|
|
|
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script> |
|
|
|
@ -134,6 +134,9 @@ function animateThenIdle(mainCharacter, animationName, timeScale='1'){ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function checkExerciseCompletion(targetNumber=2){ |
|
|
|
|
console.log('checkExerciseCompletion', targetNumber) |
|
|
|
|
// does not seem to happen... |
|
|
|
|
// does ondrop work still? |
|
|
|
|
const instructions = document.querySelector("#instructions>a-troika-text") |
|
|
|
|
let counter = 0 |
|
|
|
|
const mainCharacter = document.getElementById("biggu") |
|
|
|
@ -213,6 +216,8 @@ function startExercise(){ |
|
|
|
|
for (let i=0;i<maxFishes;i++){ |
|
|
|
|
let gltfEl = document.createElement('a-gltf-model') |
|
|
|
|
gltfEl.setAttribute("ondrop","checkExerciseCompletion()") |
|
|
|
|
// setOnDropFromAttribute() |
|
|
|
|
// might be problematic due to timing somehow... |
|
|
|
|
gltfEl.setAttribute("target","true") |
|
|
|
|
gltfEl.setAttribute("scale",".001 .001 .001") |
|
|
|
|
gltfEl.setAttribute("src","../content/winterset/Fish.glb") |
|
|
|
@ -223,6 +228,7 @@ function startExercise(){ |
|
|
|
|
//console.log("position",`${x} ${y} ${z}`) |
|
|
|
|
document.querySelector("#fishes").appendChild(gltfEl) |
|
|
|
|
} // might want to appear from the start |
|
|
|
|
setTimeout( _ => setOnDropFromAttribute(), 500) |
|
|
|
|
// audio does not match asset, should be a white bowl, not black |
|
|
|
|
|
|
|
|
|
document.getElementById("exerciseA").setAttribute("visible", false) |
|
|
|
|