splatout-stack.js

total 0
used 0
limit 0
/* --- title: Splatout files: head point pointlist mouse stage stroke dragging ../point_src/random.js ../point_src/stage-clock.js ../point_src/easing.js ../point_src/iter/lerp.js --- */ class MainStage extends Stage { canvas='playspace' // live=false mounted(){ this.p = this.center.copy() this._lastP = undefined this.p.color = random.color() this.microValue = this.clock.frameStepValue(1) // seconds this.backgroundColor = undefined; //this.randomColor() } onMousedown(e){ /* Grab Point Animate To size. Then the new background color, */ this._lastP = this.p let p = Point.from(e).update({ radius: 1 }) this.p = p p.color = random.color() let width = this.dimensions.width * 1.5 let easing = easingFunctions.get('sine', 'in') let st = this; let v = this.v = new Value(this.p.radius, width, easing) v.doneHandler = ()=>{ this.nextTick(this.switchOut.bind(this)) } this.microStep = 0 } switchOut() { console.log('doneHandler') let p = this.p this.v = undefined; } step(){ if(this.v) { this.p.radius = this.v.get(this.microStep) } this.microStep += this.microValue } draw(ctx){ this.clear(ctx) this.step() this._lastP && this._lastP.pen.fill(ctx) this.p.pen.fill(ctx) } } ;stage = MainStage.go();
Run
Meta Data
title Splatout
imports ()
files ('head', 'point', 'pointlist', 'mouse', 'stage', 'stroke', 'dragging', '../point_src/random.js', '../point_src/stage-clock.js', '../point_src/easing.js', '../point_src/iter/lerp.js')
unused_keys ()
unknown_keys ()
filepath_exists True
path splatout-stack.js
filepath splatout-stack.js
clean_files ('../point_src/core/head.js', '../point_src/pointpen.js', '../point_src/compass.js', '../point_src/center.js', '../point_src/point-content.js', '../point_src/pointdraw.js', '../point_src/relative-xy.js', '../point_src/pointcast.js', '../point_src/point.js', '../point_src/pointlistdraw.js', '../point_src/pointlistgradient.js', '../point_src/pointlistshape.js', '../point_src/pointlistgenerator.js', '../point_src/unpack.js', '../point_src/pointlist.js', '../point_src/pointlistpen.js', '../point_src/events.js', '../point_src/automouse.js', '../point_src/stage-resize.js', '../point_src/functions/resolve.js', '../point_src/stage.js', '../point_src/setunset.js', '../point_src/stroke.js', '../point_src/functions/clamp.js', '../point_src/distances.js', '../point_src/protractor.js', '../point_src/text/beta.js', '../point_src/dragging.js', '../point_src/random.js', '../point_src/stage-clock.js', '../point_src/easing.js', '../point_src/iter/lerp.js')
markdown {'html': '', 'content': '---\ntitle: Splatout\nfiles:\n head\n point\n pointlist\n mouse\n stage\n stroke\n dragging\n ../point_src/random.js\n ../point_src/stage-clock.js\n ../point_src/easing.js\n ../point_src/iter/lerp.js\n---'}