Browse Source

Add setPath method to FontLoader

Luke Horvat 8 years ago
parent
commit
eb70fbc554
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/loaders/FontLoader.js

+ 8 - 0
src/loaders/FontLoader.js

@@ -19,6 +19,7 @@ Object.assign( FontLoader.prototype, {
 		var scope = this;
 
 		var loader = new FileLoader( this.manager );
+		loader.setPath( this.path );
 		loader.load( url, function ( text ) {
 
 			var json;
@@ -46,6 +47,13 @@ Object.assign( FontLoader.prototype, {
 
 		return new Font( json );
 
+	},
+
+	setPath: function ( value ) {
+
+		this.path = value;
+		return this;
+
 	}
 
 } );