Jump to content

Asset Loader Path Issue


jamescherry0123
 Share

Recommended Posts

Hello guys,

 

I'm having some issues with AssetLoader. When I try to load my files from a directory, it just doesn't generate the path right and behaving very weirdly.

 

var path = "assets/"
var asts = [path+"bg1.jpg", path+"bg2.jpg", path+"bg3.jpg"]
 
My Pixi app is at: localhost/myapp
 
and my assets are at this url: localhost/myapp/assets
 
When I open my app, it doesn't load any assets from that directory and it shows errors in the console with invalid paths like
 
localhost/myapp/bg1.jpg
localhost/myapp/bg2.jpg
localhost/myapp/bg3.jpg
 
I just can't understand why it is ignoring my "assets" directory and looking for those files in the root. Am I doing something wrong?
 
I'll appreciate your help.
 
Thanks
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...