shuffled-grid.js

total 0
used 0
limit 0
/* title: Most Minimal Example categories: minimal files: head point pointlist ../point_src/events.js mouse stage dragging stroke ../point_src/random.js ../point_src/rectangle.js --- The minimal requirements include the _head_, _stage_, and the _point_. */ addButton('Plot', { onclick(){ stage.plot() } }) addButton('shuffle', { onclick(){ stage.shuffle() } }) class MainStage extends Stage { canvas = 'playspace' mounted() { this.plot() } plot(){ this.points = PointList.generate.grid(48, 8, 100) this.points.each.radius = ()=> random.int(5,15) // random.shuffle(this.points, 2) this.dragging.set(...this.points) } shuffle(){ random.shuffle(this.points, 2) } draw(ctx){ this.clear(ctx) this.points.pen.fill(ctx, {color:'purple'}) } } // Polypoint.head.deferredProp('PointList', ) stage = MainStage.go(/*{ loop: true }*/)
Run
Meta Data
title Most Minimal Example
imports ()
files ('head', 'point', 'pointlist', '../point_src/events.js', 'mouse', 'stage', 'dragging', 'stroke', '../point_src/random.js', '../point_src/rectangle.js')
unused_keys ()
unknown_keys ('categories',)
categories ['minimal']
filepath_exists True
path shuffled-grid.js
filepath shuffled-grid.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/functions/clamp.js', '../point_src/distances.js', '../point_src/protractor.js', '../point_src/text/beta.js', '../point_src/dragging.js', '../point_src/setunset.js', '../point_src/stroke.js', '../point_src/random.js', '../point_src/rectangle.js')
markdown {'html': '<p>The minimal requirements include the <em>head</em>, <em>stage</em>, and the <em>point</em>.</p>', 'content': 'title: Most Minimal Example\ncategories: minimal\nfiles:\n head\n point\n pointlist\n ../point_src/events.js\n mouse\n stage\n dragging\n stroke\n ../point_src/random.js\n ../point_src/rectangle.js\n---\n\nThe minimal requirements include the _head_, _stage_, and the _point_.'}