relative-iter.js

total 0
used 0
limit 0
/* categories: relative files: ../point_src/math.js ../point_src/core/head.js ../point_src/pointpen.js ../point_src/pointdraw.js ../point_src/point-content.js ../point_src/pointlist.js ../point_src/point.js ../point_src/events.js ../point_src/automouse.js ../point_src/stage.js ../point_src/extras.js ../point_src/random.js ../point_src/distances.js ../point_src/dragging.js ../point_src/stage-clock.js A relative motion of each point witin a random pointlist */ class MainStage extends Stage { // canvas = document.getElementById('playspace'); canvas = 'playspace' mounted(){ this.point = this.center.copy().update({radius: 20}) this.dragging.add(this.point) this.dragging.onEmptyDown = this.onEmptyDown.bind(this) this.events.wake() } onEmptyDown(ev) { console.log('onEmptyDown') this.origin = Point.from(ev) } onMousemove(ev) { } onMouseup(ev) { } step() { let speed = 6 let radius = 100 let tick = this.clock.tick * (speed * .01) this.point.rel.x = Math.sin(tick) * radius this.point.rel.y = Math.cos(tick) * radius } draw(ctx){ this.step() this.clear(ctx) let mousePoint = Point.mouse.position this.point.lookAt(mousePoint) /* Draw each point; wrapping the _draw_ call_ with our own functionality.*/ this.point.pen.indicator(ctx, { color: 'gray', width: 1}) this.origin?.pen.circle(ctx) } } stage = MainStage.go()
Run
Meta Data
imports ()
files ('../point_src/math.js', '../point_src/core/head.js', '../point_src/pointpen.js', '../point_src/pointdraw.js', '../point_src/point-content.js', '../point_src/pointlist.js', '../point_src/point.js', '../point_src/events.js', '../point_src/automouse.js', '../point_src/stage.js', '../point_src/extras.js', '../point_src/random.js', '../point_src/distances.js', '../point_src/dragging.js', '../point_src/stage-clock.js')
unused_keys ('title',)
unknown_keys ('categories',)
categories ['relative']
filepath_exists True
path relative-iter.js
filepath relative-iter.js
clean_files ('../point_src/math.js', '../point_src/core/head.js', '../point_src/pointpen.js', '../point_src/pointdraw.js', '../point_src/compass.js', '../point_src/center.js', '../point_src/point-content.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/relative-xy.js', '../point_src/pointcast.js', '../point_src/point.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/extras.js', '../point_src/random.js', '../point_src/distances.js', '../point_src/protractor.js', '../point_src/text/beta.js', '../point_src/dragging.js', '../point_src/stage-clock.js')
markdown {'html': '<p>A relative motion of each point witin a random pointlist</p>', 'content': 'categories: relative\nfiles:\n ../point_src/math.js\n ../point_src/core/head.js\n ../point_src/pointpen.js\n ../point_src/pointdraw.js\n ../point_src/point-content.js\n ../point_src/pointlist.js\n ../point_src/point.js\n ../point_src/events.js\n ../point_src/automouse.js\n ../point_src/stage.js\n ../point_src/extras.js\n ../point_src/random.js\n ../point_src/distances.js\n ../point_src/dragging.js\n ../point_src/stage-clock.js\n\n\nA relative motion of each point witin a random pointlist'}