olsn / Collision-Detection-for-EaselJS

Pixel Perfect and BoundingBox Collision Detector for EaselJS Bitmaps and BitmapAnimations
170 stars 53 forks source link

Security Exception #5

Open MaximeWillinger opened 10 years ago

MaximeWillinger commented 10 years ago

I got this strange error when I'm running collisions on an iPhone. I'm using images files that are in the same folder ...

SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent. in collision.js at line 156

Any idea ?

olsn commented 10 years ago

This is most likely raised by getImageData - Can you tell in what environment your are running the app? I know some cases from iOS5 + Phonegap, but those should not appear any more. (Unless that is your platform + environment) For phonegap there is an access-atribute that you can set, but that'd be just speculation right now, without knowing your System/Environment information.

MaximeWillinger commented 10 years ago

I encountered this error on an iPhone, using Phonegap. After several hours of research I have isolated the problem. The error occurs with SVG, but not with PNG ...

legendtang commented 9 years ago

Obviously this can be reproduced on latest Chrome stable on PC

olsn commented 9 years ago

@legendtang did it occure before, or just with the latest Chrome? Usually this is when the images are loaded from a different host, this is for security reasons. In some setups this might also appear when developing on localhost. I have the latest Chrome(45) installed and it works fine here, you can check this link for the live-example: http://indiegamr.com/easeljs-pixel-perfect-collision-detection-for-bitmaps-with-alpha-threshold/