easel JS security restrictions on localhost machine

前端 未结 1 413
说谎
说谎 2021-01-21 12:34

I\'m learning EaselJS and I\'m getting this weird error:

Unable to get image data from canvas because the canvas has been tainted by cross-origin data. easel

相关标签:
1条回答
  • 2021-01-21 12:58

    EaselJS needs to read pixel values to determine mouse collision. I recommend using a local server like MAMP (osx) or XAMPP (win) to do local testing.

    http://www.mamp.info/en/index.html http://www.apachefriends.org/en/xampp.html

    There are some good ones as well. Internally, we use Grunt for development, and it has a Connect module that provides the same functionality. It requires a bit more setup, but has a ton of other capabilities like code minification, sass compiling, browser auto-reload, etc.

    http://gruntjs.com/ https://github.com/gruntjs/grunt-contrib-connect

    0 讨论(0)
提交回复
热议问题