tethered-point.js

total 0
used 0
limit 0
/* title: Tethered Controller Point categories: binding files: head point pointlist mouse stage dragging ../point_src/distances.js ../point_src/tethers.js ../point_src/stage-clock.js --- You can "tether" two points, such that the _parent_ will manipulate the child. This is a _semi-hierarchical link_ or I prefer to say 1.5 directional from parent to child. */ class MainStage extends Stage { canvas='playspace' live = true mounted(){ // this.createPoints() // this.dragging.add(...this.points, ...this.controlPoints) this.point = new Point(200, 200, 100) let cp = this.point.tethers.add({ x: 100, y: 50}) this.dragging.add(this.point, cp) } draw(ctx){ this.clear(ctx) if(this.clock.tick % 1 == 0) { this.point.tethers.step() } this.point.pen.indicator(ctx, {color: '#336600'}) this.point.tethers.points.pen.fill(ctx, '#33DDAA') } } ;stage = MainStage.go();
Run
Meta Data
title Tethered Controller Point
imports ()
files ('head', 'point', 'pointlist', 'mouse', 'stage', 'dragging', '../point_src/distances.js', '../point_src/tethers.js', '../point_src/stage-clock.js')
unused_keys ()
unknown_keys ('categories',)
categories ['binding']
filepath_exists True
path tethered-point.js
filepath tethered-point.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/./windings.js', '../point_src/tethers.js', '../point_src/stage-clock.js')
markdown {'html': '<p>You can "tether" two points, such that the <em>parent</em> will manipulate the child.\nThis is a <em>semi-hierarchical link</em> or I prefer to say 1.5 directional from\nparent to child.</p>', 'content': 'title: Tethered Controller Point\ncategories: binding\nfiles:\n head\n point\n pointlist\n mouse\n stage\n dragging\n ../point_src/distances.js\n ../point_src/tethers.js\n ../point_src/stage-clock.js\n---\n\nYou can "tether" two points, such that the _parent_ will manipulate the child.\nThis is a _semi-hierarchical link_ or I prefer to say 1.5 directional from\nparent to child.'}