various fixes

This commit is contained in:
ntr 2019-09-19 15:26:06 +10:00
parent f04d179023
commit 22ad1781d8
5 changed files with 38 additions and 9 deletions

View File

@ -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,

View File

@ -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>

View File

@ -63,6 +63,23 @@ server {
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
server_name minimalstudios.com.au;
location / {
root /var/lib/mnml/public/press/;
index index.html;
try_files $uri $uri/ index.html;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/minimalstudios.com.au/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/minimalstudios.com.au/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# http -> https
server {
@ -74,3 +91,8 @@ server {
server_name minimal.gg;
return 301 https://mnml.gg$request_uri;
}
server {
server_name minimalstudios.com.au;
return 301 https://minimalstudios.com.au$request_uri;
}

View File

@ -76,7 +76,7 @@ pub fn invader_write(id: Uuid) -> Result<Uuid, Error> {
write!(&mut svg, "</g></svg>")?;
let dest = format!("/var/lib/mnml/public/imgs/{}.svg", id);
println!("molecule dest={:?}", dest);
// info!("molecule dest={:?}", dest);
let mut file = File::create(dest)?;
file.write_all(&svg)?;
@ -232,7 +232,7 @@ pub fn shapes_write(id: Uuid) -> Result<Uuid, Error> {
write!(&mut svg, "</g></svg>")?;
let dest = format!("/var/lib/mnml/public/imgs/{}.svg", id);
println!("/var/lib/mnml/public/imgs/{}.svg", id);
// println!("/var/lib/mnml/public/imgs/{}.svg", id);
let mut file = File::create(dest)?;
file.write_all(&svg)?;

View File

@ -148,7 +148,8 @@ fn fetch_instances(mut tx: Transaction) -> Result<Transaction, Error> {
}
for mut instance in instances_idle(&mut tx)? {
instance_delete(&mut tx, instance.id)?;
instance.finish();
instance_update(&mut tx, instance)?;
}
Ok(tx)