image-example.js

total 0
used 0
limit 0
/* title: Image PNG categories: image files: head point mouse stage dragging ../point_src/image.js --- Load an image using the `ImageLoader`. The image has a `position` image = new ImageLoader("../images/polypus.png") image.position.xy = [400, 400] image.draw(ctx) */ class MainStage extends Stage { canvas='playspace' live = true mounted(){ this.image = new ImageLoader("../images/polypus.png") this.dragging.add(this.image.position) this.image.position.xy = this.center.xy } draw(ctx){ this.clear(ctx) this.image.draw(ctx) } } ;stage = MainStage.go();
Run
Meta Data
title Image PNG
imports ()
files ('head', 'point', 'mouse', 'stage', 'dragging', '../point_src/image.js')
unused_keys ()
unknown_keys ('categories',)
categories ['image']
filepath_exists True
path image-example.js
filepath image-example.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/events.js', '../point_src/automouse.js', '../point_src/stage-hooks.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/image.js')
markdown {'html': '<p>Load an image using the <code>ImageLoader</code>. The image has a <code>position</code></p>\n<pre><code>image = new ImageLoader("../images/polypus.png")\nimage.position.xy = [400, 400]\nimage.draw(ctx)\n</code></pre>', 'content': 'title: Image PNG\ncategories: image\nfiles:\n head\n point\n mouse\n stage\n dragging\n ../point_src/image.js\n---\n\nLoad an image using the `ImageLoader`. The image has a `position`\n\n image = new ImageLoader("../images/polypus.png")\n image.position.xy = [400, 400]\n image.draw(ctx)'}