|
|
@ -27,8 +27,9 @@ AFRAME.registerComponent('startfunctions', { |
|
|
|
addGames() |
|
|
|
addGames() |
|
|
|
|
|
|
|
|
|
|
|
// example of adding a game programmatically |
|
|
|
// example of adding a game programmatically |
|
|
|
|
|
|
|
/* |
|
|
|
let newEl = document.createElement('a-entity') |
|
|
|
let newEl = document.createElement('a-entity') |
|
|
|
//let gamename = "checkers" |
|
|
|
let gamename = "checkers" |
|
|
|
let gamename = "carcassone" |
|
|
|
let gamename = "carcassone" |
|
|
|
newEl.id = gamename |
|
|
|
newEl.id = gamename |
|
|
|
newEl.setAttribute(gamename, "") |
|
|
|
newEl.setAttribute(gamename, "") |
|
|
@ -39,6 +40,7 @@ AFRAME.registerComponent('startfunctions', { |
|
|
|
let biggu = document.querySelector("#biggu") |
|
|
|
let biggu = document.querySelector("#biggu") |
|
|
|
biggu.setAttribute("animation__translation", "property: position; to: 0 0 0.5; dur: 10000;") |
|
|
|
biggu.setAttribute("animation__translation", "property: position; to: 0 0 0.5; dur: 10000;") |
|
|
|
biggu.setAttribute("animation__waddle", "property: rotation; from: 0 -20 -10; to: 0 20 10; dur: 1000; loop:true; easing: linear; dir:alternate;") |
|
|
|
biggu.setAttribute("animation__waddle", "property: rotation; from: 0 -20 -10; to: 0 20 10; dur: 1000; loop:true; easing: linear; dir:alternate;") |
|
|
|
|
|
|
|
*/ |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|