Loader#path

path : string

The value of path, if set, is placed before any relative file path given. For example:

load.path = "images/sprites/"; load.image("ball", "ball.png"); load.image("tree", "level1/oaktree.png"); load.image("boom", "http://server.com/explode.png");

Would load the ball file from images/sprites/ball.png and the tree from
images/sprites/level1/oaktree.png but the file boom would load from the URL
given as it's an absolute URL.

Please note that the path is added before the filename but after the baseURL (if set.)

The string must end with a "/".

Source code: loader/Loader.js (Line 103)
doc_phaser
2017-02-14 10:54:29
Comments
Leave a Comment

Please login to continue.