Merge tag '1.4.4' into develop
1.4.4
This commit is contained in:
commit
a98f1d04af
@ -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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-client",
|
||||
"version": "1.4.3",
|
||||
"version": "1.4.4",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-client",
|
||||
"version": "1.4.3",
|
||||
"version": "1.4.4",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-ops",
|
||||
"version": "1.4.3",
|
||||
"version": "1.4.4",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "mnml"
|
||||
version = "1.4.3"
|
||||
version = "1.4.4"
|
||||
authors = ["ntr <ntr@smokestack.io>"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -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)?;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user