Skip to content

Instantly share code, notes, and snippets.

@Azgaar
Azgaar / vue-canvas.js
Created April 16, 2018 18:33 — forked from redblobgames/vue-canvas.js
Vue component for canvas with automatic dependency tracking
/** Canvas component
A generic canvas component that calls a draw function to draw the
contents, and automatically calls it again when anything the draw
function depends on changes. Blog entry:
http://simblob.blogspot.com/2018/03/using-vue-with-canvas.html
Example:
<a-canvas width="500" height="200"
@Azgaar
Azgaar / svg-arrowhead.html
Created April 16, 2018 18:33 — forked from redblobgames/svg-arrowhead.html
SVG arrowhead example
<!DOCTYPE html>
<html>
<svg width="80%" height="80%" viewBox="-100 -100 200 200">
<!-- Need this definition to make an arrowhead, from https://www.w3.org/TR/svg-markers/ -->
<defs>
<marker id="red-arrowhead" viewBox="0 0 10 10" refX="7" refY="5" markerUnits="strokeWidth" markerWidth="4" markerHeight="3" orient="auto">
<path d="M 0 0 L 10 5 L 0 10 z" stroke="none" fill="red"/>
</marker>
</defs>