bridged-loop.js

total 0
used 0
limit 0
/* title: Example categories: basic dragging files: head point pointlist stage mouse dragging stroke ../point_src/constrain-distance.js ../point_src/split.js --- */ class MainStage extends Stage { // canvas = document.getElementById('playspace'); canvas = 'playspace' mounted(){ this.points = new PointList( [250 , 50, 20, 40] , [250 , 170, 20, -90] , [250 , 290, 20, -90] ).cast() this.dragging.add(...this.points) } draw(ctx){ ctx.fillStyle = '#444' this.clear(ctx) this.tick += 1 let ps = this.points let tips = ps[0].split(2, Math.PI, Math.PI*.5) let tips1 = ps[1].split(2, Math.PI, Math.PI*.5) let tips2 = ps[2].split(2, Math.PI, Math.PI*.5) // ps[0].pen.line(ctx, tips[0]) // tips[1].pen.line(ctx, ps[2]) ;(new PointList(...tips, ...tips1, ...tips2)).pen.quadCurve(ctx, undefined,1) ctx.fill() tips.pen.indicator(ctx, 'green') tips1.pen.indicator(ctx, 'green') tips2.pen.indicator(ctx, 'green') ps.pen.indicator(ctx, 'green') // ps.pen.line(ctx, 'green') // ps.pen.quadCurve(ctx) } } stage = MainStage.go(/*{ loop: true }*/)
Run
Meta Data
title Example
imports ()
files ('head', 'point', 'pointlist', 'stage', 'mouse', 'dragging', 'stroke', '../point_src/constrain-distance.js', '../point_src/split.js')
unused_keys ()
unknown_keys ('categories',)
categories ['basic', 'dragging']
filepath_exists True
path bridged-loop.js
filepath bridged-loop.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/stage-resize.js', '../point_src/functions/resolve.js', '../point_src/stage.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/setunset.js', '../point_src/stroke.js', '../point_src/constrain-distance.js', '../point_src/split.js')
markdown {'html': '', 'content': 'title: Example\ncategories: basic\n dragging\nfiles:\n head\n point\n pointlist\n stage\n mouse\n dragging\n stroke\n ../point_src/constrain-distance.js\n ../point_src/split.js\n---'}