Skip to content

Instantly share code, notes, and snippets.

@talltyler
Last active December 16, 2015 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talltyler/5346400 to your computer and use it in GitHub Desktop.
Save talltyler/5346400 to your computer and use it in GitHub Desktop.
The HTML Canvas element is a work in progress that isn't really ready in many cases. I've started a running list of the busted things that I have found so far with links to more information about them and fixes if I have them.

#Things that Canvas Element is missing

###Text -Kerning/Letter Spacing is missing : [https://gist.github.com/talltyler/5345894]

-TextMetrics needs height : [https://gist.github.com/talltyler/5345959]

###Filters -Shadows have been broken in Chrome since version 15 https://code.google.com/p/chromium/issues/detail?id=100703 https://github.com/mozilla/shumway/blob/master/src/swf/filters/filter.js#L245

-Inner shadows are complicated to reproduce http://jsfiddle.net/cabanier/eav5V/ http://old.nabble.com/-canvas--inner-shadows-td33754016.html

###Bitmaps -For loops over every pixel are slow in many cases so most types of raw pixel modifications like replacements for the missing filters can't be used. These are the best that I have : found https://github.com/mozilla/shumway/blob/master/src/swf/filters/filter.js http://peternitsch.net/bitmapdata.js/colorMatrixFilter.html

-Pixel shaders or a way to run fast matrix math would speed up many things, you can do some of this in webgl but IE wont support it there is a few interesting projects using it though http://evanw.github.io/glfx.js/demo/

-Hit tests, without this every game engine has created a custom one, this has been proposed but not implemented. http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#hit-regions

###General things that might help adoption -Scene graph with events and hit detection http://www.createjs.com https://code.google.com/p/cakejs/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment