Skip to content

Commit

Permalink
Merge pull request #39 from davidomarf/release-0.8.1
Browse files Browse the repository at this point in the history
Release 0.8.1

## Major Changes
<!--- Describe your changes in detail -->
- Send `sketch` instead of `sketch["name"]` to the sketch page template.
- Use the random and noise seeds of the sketch to name the file of the saved image.

## Minor Changes
- Add `livereload` as required module in `setup.py`.a
  • Loading branch information
davidomarf authored Nov 4, 2019
2 parents b64e44e + 4b6fad3 commit e269a79
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = 'David Omar Flores Chavez'

# The full version, including alpha/beta/rc tags
release = 'v0.8.0'
release = 'v0.8.1'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ginpar/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def render_sketch_page(build_path, sketch, site, page_template, input_templates)
sketch_index = open(f"public/{sketch['name']}/index.html", "w+")
sketch_index.write(
page_template.render(
sketch=unkebab(sketch["name"]),
sketch=sketch,
form="<form>\n" + content + "\n</form>",
site=site,
)
Expand Down
1 change: 1 addition & 0 deletions ginpar/templates/sketch/data.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
date: {{ today }}
global_seed: True
params:
- DIMENSIONS:
attrs:
Expand Down
12 changes: 4 additions & 8 deletions ginpar/templates/sketch/sketch.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
/* You don't need to initialize your variables in here. However, if you decide
* to do it, you **must** use `var` instead of `let` or `const`.
*/

var DIMENSIONS = [2048, 2048]

/**
* Standard function of p5js
*/
function setup() {
createCanvas(DIMENSIONS[0], DIMENSIONS[1]).parent("artwork-container");

// Call draw() only once
noLoop();
// Use the same seed for every time setup is called.
// (These are generated and initialized by Ginpar)
randomSeed(RANDOM_SEED);
noiseSeed(NOISE_SEED);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import setuptools

version = '0.8.0'
version = '0.8.1'

requires = ['jinja2 >= 2.7', 'pyyaml', 'click']
requires = ['jinja2 >= 2.7', 'pyyaml', 'click', 'livereload']

setup_requires = ['wheel']

Expand Down

0 comments on commit e269a79

Please sign in to comment.