vihanagarwal

Sprite not rendering when I add it's image texture to a folder

6 posts in this topic

I am having a really weird issue. I am creating a sprite from an image as follows:

var grid1_texture = new PIXI.Texture.fromImage("whiteSquare.jpg");

Now this works fine and I am able to add this to the stage. I basically want to add all my images to a folder called resources. So I changed the code to this:

var grid1_texture = new PIXI.Texture.fromImage("/resources/whiteSquare.jpg");

When I do this, I can see in Brackets editor that the link is being made however, the sprites do not get rendered on the stage.

Please help!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.