Jump to content

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


vihanagarwal
 Share

Recommended Posts

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...