draggable-ngon-example.js

total 0
used 0
limit 0
/* title: Most Minimal Example categories: minimal files: head point stage mouse dragging --- The minimal requirements include the _head_, _stage_, and the _point_ And it's draggable. */ class MainStage extends Stage { canvas = 'playspace' mounted() { this.point = this.center.copy().update({radius: 100}) this.dragging.add(this.point) } draw(ctx){ this.clear(ctx) this.point.pen.indicator(ctx, {color: '#444'}) this.point.pen.ngon(ctx, 3, this.point.radius, 1, '#880000', 2, Math.PI + this.point.radians) } } stage = MainStage.go(/*{ loop: true }*/)
Run
Meta Data
title Most Minimal Example
imports ()
files ('head', 'point', 'stage', 'mouse', 'dragging')
unused_keys ()
unknown_keys ('categories',)
categories ['minimal']
filepath_exists True
path draggable-ngon-example.js
filepath draggable-ngon-example.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/stage-resize.js', '../point_src/functions/resolve.js', '../point_src/stage.js', '../point_src/events.js', '../point_src/automouse.js', '../point_src/functions/clamp.js', '../point_src/distances.js', '../point_src/protractor.js', '../point_src/text/beta.js', '../point_src/dragging.js')
markdown {'html': "<p>The minimal requirements include the <em>head</em>, <em>stage</em>, and the <em>point</em>\nAnd it's draggable.</p>", 'content': "title: Most Minimal Example\ncategories: minimal\nfiles:\n head\n point\n stage\n mouse\n dragging\n---\n\nThe minimal requirements include the _head_, _stage_, and the _point_\nAnd it's draggable."}