Added crest mode

This commit is contained in:
Devine Lu Linvega
2019-01-10 10:43:17 +12:00
parent 8c6d338b1a
commit 29b5b0fa66
4 changed files with 29 additions and 18 deletions

View File

@@ -2,7 +2,7 @@
function Tool (dotgrid) {
this.index = 0
this.settings = { size: { width: 300, height: 300 } }
this.settings = { size: { width: 300, height: 300 }, crest: false }
this.layers = [[], [], []]
this.styles = [
{ thickness: 10, strokeLinecap: 'round', strokeLinejoin: 'round', color: '#f00', fill: 'none', mirror_style: 0, transform: 'rotate(45)' },
@@ -200,6 +200,12 @@ function Tool (dotgrid) {
dotgrid.renderer.update()
}
this.toggleCrest = function () {
this.settings.crest = this.settings.crest !== true
dotgrid.interface.update(true)
dotgrid.renderer.update()
}
this.misc = function (type) {
dotgrid.picker.start()
}