hue-point.js

total 0
used 0
limit 0
/* title: Example categories: basic dragging files: head point pointlist stage mouse dragging ../point_src/easing.js --- */ class MainStage extends Stage { // canvas = document.getElementById('playspace'); canvas = 'playspace' mounted(){ this.point = new Point({x: 250, y: 150 , radius: 20, rotation: 45}) this.dragging.add(this.point) } draw(ctx){ this.clear(ctx) let p = this.point let r = p.rotation let s = clamp((p.x*.24) - 50, 0, 100) let se = quadEaseOut(s * .01) * 100 let l = 100 - clamp((p.y*.24) - 50, 0, 100) let le = quadEaseOut(l * .01) * 100 let color = `hsl(${r}deg ${se}% ${le}%)` this.point.pen.indicator(ctx, {color, width: 4}) } } stage = MainStage.go(/*{ loop: true }*/)
Run
Meta Data
title Example
imports ()
files ('head', 'point', 'pointlist', 'stage', 'mouse', 'dragging', '../point_src/easing.js')
unused_keys ()
unknown_keys ('categories',)
categories ['basic', 'dragging']
filepath_exists True
path hue-point.js
filepath hue-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/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/easing.js')
markdown {'html': '', 'content': 'title: Example\ncategories: basic\n dragging\nfiles:\n head\n point\n pointlist\n stage\n mouse\n dragging\n ../point_src/easing.js\n---'}