sbiermanlytle / iioEngine

iio Engine: A JavaScript game engine for HTML5 Canvas
http://iioengine.com
455 stars 81 forks source link

Fix for warning "an attempt to set strokeStyle or fillStyle to a value that is neither a string, a CanvasGradient, or a CanvasPattern was ignored" #16

Closed Unisay closed 11 years ago

Unisay commented 11 years ago

In this example http://iioengine.com/docs/iio-basics#this box shadow is an object that has no fillStyle and strokeStyle properties defined. Because of this Firefox emits warning "context: an attempt to set strokeStyle or fillStyle to a value that is neither a string, a CanvasGradient, or a CanvasPattern was ignored" in lines 1044, 1045 on each draw cycle. This slow downs animation and pollutes firebug console. In Chromium there is no warning.

sbiermanlytle commented 11 years ago

Thanks for the fix!