ellipse-example-4.js

total 0
used 0
limit 0
/* categories: simple ellipse files: head stroke pointlist point mouse dragging stage ../point_src/line.js ../point_src/recttools.js --- */ class MainStage extends Stage { canvas='playspace' mounted(){ this.pointA = this.center.copy().update({radius: 80, radians:0}) this.pointB = this.center.copy().update({radius: 80, radians:0}) this.start = new Point(100, 300, 50, 20) this.end = new Point(100, 460, 50, -20) this.squishA = new Point(100,100, 10, 0) this.squishB = this.squishA.add(100, 50) this.rel = true this.dragging.addPoints( this.pointA, this.pointB, this.start, this.end, this.squishA, this.squishB, ) } draw(ctx){ this.clear(ctx) let p = this.pointA; p.pen.indicator(ctx) this.pointB.pen.indicator(ctx) let size = this.squishA.distance2D(this.squishB) let width = Math.abs(size.x) , height = Math.abs(size.y) let start = this.start let end = this.end start.pen.indicator(ctx) end.pen.indicator(ctx) this.squishA.pen.fill(ctx, '#990000') this.squishB.pen.fill(ctx, '#990000') let lines = twoPointBox(this.squishA, this.squishB) lines.forEach(l=>l.render(ctx)) p.pen.ellipse(ctx, { width, height , start: this.pointB.radians + start.radians , end: this.pointB.radians + end.radians , relative: this.rel }, 'red') } } ;stage = MainStage.go();
Run
Meta Data
imports ()
files ('head', 'stroke', 'pointlist', 'point', 'mouse', 'dragging', 'stage', '../point_src/line.js', '../point_src/recttools.js')
unused_keys ('title',)
unknown_keys ('categories',)
categories ['simple', 'ellipse']
filepath_exists True
path ellipse-example-4.js
filepath ellipse-example-4.js
clean_files ('../point_src/core/head.js', '../point_src/setunset.js', '../point_src/stroke.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/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/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', '../point_src/stage-resize.js', '../point_src/functions/resolve.js', '../point_src/stage.js', '../point_src/line.js', '../point_src/recttools.js')
markdown {'html': '', 'content': 'categories: simple\n ellipse\nfiles:\n head\n stroke\n pointlist\n point\n mouse\n dragging\n stage\n ../point_src/line.js\n ../point_src/recttools.js\n---'}