various fixes
This commit is contained in:
@@ -3,8 +3,10 @@ const anime = require('animejs').default;
|
||||
function wiggle(id, idle) {
|
||||
const duration = 300;
|
||||
const target = document.getElementById(id);
|
||||
const x = (window.screen.width / anime.random(-100, 100)) * 0.1;
|
||||
const y = (window.screen.height / anime.random(-20, 100)) * 0.1;
|
||||
const x = window.screen.width * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
|
||||
const y = window.screen.height * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
|
||||
|
||||
console.log(x, y);
|
||||
return anime({
|
||||
targets: target,
|
||||
rotate: 0,
|
||||
|
||||
@@ -154,13 +154,17 @@ function Demo(args) {
|
||||
</div>
|
||||
<div class="game">
|
||||
<div class="game-construct">
|
||||
<ConstructAvatar construct={players[1].constructs[0]} />
|
||||
<ConstructAnimation construct={players[1].constructs[0]} />
|
||||
<div class="left"></div>
|
||||
<div class="right">
|
||||
<ConstructAvatar construct={players[1].constructs[0]} />
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="game-construct">
|
||||
<ConstructAvatar construct={players[1].constructs[1]} />
|
||||
<ConstructAnimation construct={players[1].constructs[1]} />
|
||||
<div class="left"></div>
|
||||
<div class="right">
|
||||
<ConstructAvatar construct={players[1].constructs[1]} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user