coupled-direction-points.js

total 0
used 0
limit 0
/* title: Coupled Direction category: binding files: head point stage dragging pointlist mouse --- The second point will always mirror the first point */ class MainStage extends Stage { canvas='playspace' // live=false live = true mounted(){ this.point = new Point(300, 400, 100) this.point2 = new Point(600, 400, 100) this.projection = this.point.project() this.projection2 = this.point2.project() this.dragging.add(this.point, this.point2, this.projection, this.projection2) } coupling() { this.point.lookAt(this.projection) this.point.radius = this.point.distanceTo(this.projection) this.point2.rotation = this.point.rotation + 180 this.point2.radius = this.point.radius } draw(ctx){ this.clear(ctx) this.coupling() let pos = this.mouse.position pos.pen.circle(ctx) this.point.pen.indicator(ctx) this.point2.pen.indicator(ctx) this.projection.pen.fill(ctx, '#33DDAA') // this.projection2.pen.fill(ctx, '#33DDAA') } } ;stage = MainStage.go();
Run
Meta Data
title Coupled Direction
imports ()
files ('head', 'point', 'stage', 'dragging', 'pointlist', 'mouse')
unused_keys ()
unknown_keys ('category',)
category ['binding']
filepath_exists True
path coupled-direction-points.js
filepath coupled-direction-points.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/functions/clamp.js', '../point_src/distances.js', '../point_src/protractor.js', '../point_src/text/beta.js', '../point_src/dragging.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')
markdown {'html': '<p>The second point will always mirror the first point</p>', 'content': 'title: Coupled Direction\ncategory: binding\nfiles:\n head\n point\n stage\n dragging\n pointlist\n mouse\n---\n\nThe second point will always mirror the first point'}