bisect-example.js

total 0
used 0
limit 0
/* title: Bisector categories: bisect files: head point stage pointlist mouse dragging ../point_src/bisector.js --- In this example the mid-point always looks through the bisect of the two plot points. let rads = acuteBisect( pointA, midPoint, pointB ); midPoint.radians = rads; */ class MainStage extends Stage { canvas='playspace' // live=false live = true mounted(){ let a = this.pa = new Point(150, 150, 20, 90) let b = this.pb = new Point(400, 250, 20, 90) let m = this.mid = new Point(200, 300, 60, 100) this.dragging.add(a,b, m) } coupling() { } draw(ctx){ this.clear(ctx) this.mid.radians = acuteBisect(this.pa, this.mid, this.pb) this.pa.pen.fill(ctx, '#AA33CC') this.pb.pen.fill(ctx, '#AA33CC') this.mid.pen.indicator(ctx) } } ;stage = MainStage.go();
Run
Meta Data
title Bisector
imports ()
files ('head', 'point', 'stage', 'pointlist', 'mouse', 'dragging', '../point_src/bisector.js')
unused_keys ()
unknown_keys ('categories',)
categories ['bisect']
filepath_exists True
path bisect-example.js
filepath bisect-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/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/functions/clamp.js', '../point_src/distances.js', '../point_src/protractor.js', '../point_src/text/beta.js', '../point_src/dragging.js', '../point_src/bisector.js')
markdown {'html': '<p>In this example the mid-point always looks through the bisect of the two\nplot points.</p>\n<pre><code>let rads = acuteBisect(\n pointA,\n midPoint,\n pointB\n );\nmidPoint.radians = rads;\n</code></pre>', 'content': 'title: Bisector\ncategories: bisect\nfiles:\n head\n point\n stage\n pointlist\n mouse\n dragging\n ../point_src/bisector.js\n---\n\nIn this example the mid-point always looks through the bisect of the two\nplot points.\n\n let rads = acuteBisect(\n pointA,\n midPoint,\n pointB\n );\n midPoint.radians = rads;'}