Merge tag '1.4.4' into develop

1.4.4
This commit is contained in:
ntr 2019-09-15 12:09:37 +10:00
commit a98f1d04af
7 changed files with 14 additions and 10 deletions

View File

@ -1 +1 @@
1.4.3
1.4.4

View File

@ -9,17 +9,19 @@
* treats
* constructs jiggle when clicked
* client animation bpm
* background colour changes depending on time of day
* hit animation wobble
* combat text scale + translate
* susbcriber gold name in instance
* bot game grind
* stress test
* msg pane
* game invites
* audio
## SOON
*SERVER*
* modules

View File

@ -1,6 +1,6 @@
{
"name": "mnml-client",
"version": "1.4.3",
"version": "1.4.4",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -1,6 +1,6 @@
{
"name": "mnml-client",
"version": "1.4.3",
"version": "1.4.4",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -1,6 +1,6 @@
{
"name": "mnml-ops",
"version": "1.4.3",
"version": "1.4.4",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -1,6 +1,6 @@
[package]
name = "mnml"
version = "1.4.3"
version = "1.4.4"
authors = ["ntr <ntr@smokestack.io>"]
[dependencies]

View File

@ -62,7 +62,7 @@ pub fn invader_write(id: Uuid) -> Result<Uuid, Error> {
];
let colour_dist = WeightedIndex::new(&weights)?;
write!(&mut svg, "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='-250 -250 1000 1000' width='375' height='375'><g>")?;
write!(&mut svg, "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='-500 -500 1500 1500' width='375' height='375'><g>")?;
for i in 0..50 {
let x = (i % 5) * 50;
let y = (i / 5) * 50;
@ -103,7 +103,7 @@ pub fn shapes_write(id: Uuid) -> Result<Uuid, Error> {
// distribution for lightness
// bellcurve around 75%
let l_dist = Normal::new(50.0, 10.0);
let s_dist = Normal::new(75.0, 10.0);
let s_dist = Normal::new(50.0, 20.0);
// 8 6 or 4 points in shape
// 1 head point
@ -124,7 +124,8 @@ pub fn shapes_write(id: Uuid) -> Result<Uuid, Error> {
let shape_dist = WeightedIndex::new(shapes.iter().map(|v| v.1))?;
let n_shapes_items = [
(2, 1),
(1, 1),
(2, 2),
(3, 5),
(4, 10),
(5, 10),
@ -132,7 +133,7 @@ pub fn shapes_write(id: Uuid) -> Result<Uuid, Error> {
let num_dist = WeightedIndex::new(n_shapes_items.iter().map(|v| v.1))?;
let n_shapes = num_dist.sample(&mut rng) as usize;
write!(&mut svg, "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='-500 -500 1000 1000' width='1000' height='1000'><g>")?;
write!(&mut svg, "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='-250 -250 500 500' width='1000' height='1000'><g>")?;
for i in 0..n_shapes + 1 {
let h = rng.gen_range(0, 360);
let s = s_dist.sample(&mut rng) as usize;
@ -203,6 +204,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);
let mut file = File::create(dest)?;
file.write_all(&svg)?;