stage-stretch.js

total 0
used 0
limit 0
/* files: ../point_src/core/head.js ../point_src/pointpen.js ../point_src/pointdraw.js ../point_src/math.js ../point_src/point-content.js ../point_src/pointlist.js ../point_src/point.js ../point_src/stage.js --- A stage will adapt to its global size. #playspace { height: 100%; width: 100%; border: solid 1px; } When resizing the page, the `canvas` element dimensions will change. The Stage will adapt after the resize event. */ class MainStage extends Stage { // canvas = document.getElementById('playspace'); canvas = 'playspace' mounted(){ this.center.radius = 50 } draw(ctx){ this.clear(ctx) let c = this.center // c.lookAt(Point.mouse.position) c.pen.indicator(ctx, {color:'green'}) } } stage = MainStage.go()
Run
Meta Data
imports ()
files ('../point_src/core/head.js', '../point_src/pointpen.js', '../point_src/pointdraw.js', '../point_src/math.js', '../point_src/point-content.js', '../point_src/pointlist.js', '../point_src/point.js', '../point_src/stage.js')
unused_keys ('title',)
unknown_keys ()
filepath_exists True
path stage-stretch.js
filepath stage-stretch.js
clean_files ('../point_src/core/head.js', '../point_src/pointpen.js', '../point_src/pointdraw.js', '../point_src/math.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/stage-resize.js', '../point_src/functions/resolve.js', '../point_src/stage.js')
markdown {'html': '<hr />\n<p>A stage will adapt to its global size.</p>\n<pre><code>#playspace {\n height: 100%;\n width: 100%;\n border: solid 1px;\n}\n</code></pre>\n<p>When resizing the page, the <code>canvas</code> element dimensions will change.\nThe Stage will adapt after the resize event.</p>', 'content': 'files:\n ../point_src/core/head.js\n ../point_src/pointpen.js\n ../point_src/pointdraw.js\n ../point_src/math.js\n ../point_src/point-content.js\n ../point_src/pointlist.js\n ../point_src/point.js\n ../point_src/stage.js\n\n---\n\nA stage will adapt to its global size.\n\n #playspace {\n height: 100%;\n width: 100%;\n border: solid 1px;\n }\n\nWhen resizing the page, the `canvas` element dimensions will change.\nThe Stage will adapt after the resize event.'}