-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example code does not work #31
Comments
Because this manual - a piece of deprecated shit >_< |
HI @evolveinua , I can understand that you are frustrated but you must be careful not to direct it at the people who can help. This guide is great and has helped out many pixi users, you must remember that @kittykatattack has made this guide for free of his own back so really he owes us nothing. Instead it will be better to work together to figure out the issue and find a solution to your problem so that we can then share it with the community. If you can share your code I'm sure we can help to solve the issue. Cheers Mat |
i would suggest you use chrome dev editor chrome dev editor you can import your js test into this. As the tutorial says the pixi.js items require a webserver this is because the CORS policy blocks loading file resources directly from local storage reference issue |
@evolveinua Yes, programming can be very frustrating! But we're here to help, so if you can break down your questions into smaller steps or provide us some examples of your course code, we'll do our best to help walk you through the problems you're having 😄. |
Hi, @kittykatattack I'm having the exact same problem. I'm still new to PIXI so I don't really understand the issue. Can you help me out? I only have the code shown in the tutorial.
Thanks! |
@ickyrr Hi! Are you running your code inside a web server? |
@kittykatattack , yep, I was, previously. I was too tired I did not think of webpack dev server much sooner. It works now, thanks! A great tutorial BTW. |
Great news! 😄 |
@kittykatattack i am new to pixi and getting error Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded. while loading image .what i has to do |
PIXI.loader .add("pictures/Mech1Walk.png") .load(setup);
(why did author omit PIXI. prefix???)
`function setup() {
var texture = PIXI.TextureCache["images/tileset.png"];
var rectangle = new PIXI.Rectangle(1, 1, 64, 64);
texture.frame = rectangle;
var robot = new PIXI.Sprite(texture);
robot.x = 100;
robot.y = 100;
stage.addChild(robot);
renderer.render(stage);
}`
Gives me this error:
Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at ... (path to my picture);
The text was updated successfully, but these errors were encountered: