{"action":"opened","issue":{"url":"https://api.github.com/repos/patriciogonzalezvivo/glslCanvas/issues/20","repository_url":"https://api.github.com/repos/patriciogonzalezvivo/glslCanvas","labels_url":"https://api.github.com/repos/patriciogonzalezvivo/glslCanvas/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/patriciogonzalezvivo/glslCanvas/issues/20/comments","events_url":"https://api.github.com/repos/patriciogonzalezvivo/glslCanvas/issues/20/events","html_url":"https://github.com/patriciogonzalezvivo/glslCanvas/issues/20","id":284946045,"number":20,"title":"Loading texture image from S3 results in CORS issue","user":{"login":"cmalven","id":610118,"avatar_url":"https://avatars3.githubusercontent.com/u/610118?v=4","gravatar_id":"","url":"https://api.github.com/users/cmalven","html_url":"https://github.com/cmalven","followers_url":"https://api.github.com/users/cmalven/followers","following_url":"https://api.github.com/users/cmalven/following{/other_user}","gists_url":"https://api.github.com/users/cmalven/gists{/gist_id}","starred_url":"https://api.github.com/users/cmalven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmalven/subscriptions","organizations_url":"https://api.github.com/users/cmalven/orgs","repos_url":"https://api.github.com/users/cmalven/repos","events_url":"https://api.github.com/users/cmalven/events{/privacy}","received_events_url":"https://api.github.com/users/cmalven/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-28T16:20:13Z","updated_at":"2017-12-28T16:20:13Z","closed_at":null,"author_association":"NONE","body":"First of all, glslCanvas is great. By far the easiest way I've found so far to get working shaders onto a webpage. Thanks for your work on it, and Book of Shaders.\r\n\r\nI'm tearing my hair out trying to resolve an issue I'm having loading a texture from an Amazon S3 bucket in Chrome and Safari. Firefox works just fine.\r\n\r\nI'm specifying the texture path as a `data-texture` attribute like so:\r\n\r\n```\r\n<canvas data-textures=\"http://s3-us-west-1.amazonaws.com/my-bucket/image.jpg\" width=\"900\" height=\"380\" data-fragment=\"\"></canvas>\r\n```\r\n\r\nWhen glslCanvas attempts to load the texture, I get an error:\r\n\r\n```\r\nAccess to Image at 'http://s3-us-west-1.amazonaws.com/my-bucket/image.jpg' from origin 'http://foo.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://foo.com' is therefore not allowed access.\r\n```\r\n\r\nWhen the image does load (which I've accomplished by testing with a local texture source) the shader works great. _Occasionally_, but not often, the textures _will_ successfully load without me doing anything different, which makes troubleshooting this very difficult. Every time I think \"Oh! It magically works now!\" turns out it was a fluke and I'm back to the beginning.\r\n\r\nI have the CORS on my s3 bucket set up appropriately, as well as in my sites `.htaccess`. I'm using other tools which are also using javascript to load images from the same s3 bucket, so it would seem that it may be unique to something glslCanvas is doing.\r\n\r\nAnybody else have any experience with this?"}}
{"actor":{"display_login":"cmalven"}}