Browse Source

Merge pull request #10232 from looeee/docs/loaders/improve

Improved documentation for Loaders
Mr.doob 8 years ago
parent
commit
5bbea01eab

+ 25 - 7
docs/api/loaders/AnimationLoader.html

@@ -10,7 +10,10 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">Class for loading an animation in JSON format.</div>
+		<div class="desc">
+			Class for loading an animation in JSON format.
+			This uses the [page:FileLoader] internally for loading files.
+		</div>
 
 		<h2>Example</h2>
 
@@ -41,23 +44,38 @@
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
 		<div>
-		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
+
+		Creates a new [name].
 		</div>
+
+		<h2>Properties</h2>
+
+		<h3>[property:LoadingManager manager]</h3>
 		<div>
-		Creates a new [name].
+			The [page:LoadingManager loadingManager]  the loader is using. Default is [page:DefaultLoadingManager].
 		</div>
 
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
-		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
+		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Animation animation].<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
-		[page:Function onError] — Will be called when load errors.<br />
+		[page:Function onError] — Will be called if load errors.<br /><br />
+
+		Begin loading from url and pass the loaded animation to onLoad.
 		</div>
+
+		<h3>[method:null parse]( [page:JSON json], [page:Function onLoad] )</h3>
 		<div>
-		Begin loading from url and pass the loaded animation to onLoad.
+		[page:JSON json] — required<br />
+		[page:Function onLoad] — Will be called when parsing completes. <br /><br />
+
+		Parse the JSON object and pass the result to onLoad. Individual clips in the object will
+		be parsed with [page:AnimationClip.parse].
 		</div>
 
 		<h2>Source</h2>

+ 15 - 4
docs/api/loaders/AudioLoader.html

@@ -10,7 +10,11 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">Class for loading an [page:String AudioBuffer].</div>
+		<div class="desc">
+			Class for loading an
+			[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer AudioBuffer].
+			This uses the [page:FileLoader] internally for loading files.
+		</div>
 
 		<h2>Example</h2>
 
@@ -58,10 +62,16 @@
 		<h3>[name]( [page:String context], [page:LoadingManager manager] )</h3>
 		<div>
 		[page:String context] — The [page:String AudioContext] for the loader to use. Default is [page:String window.AudioContext].<br />
-		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
+
+		Creates a new [name].
 		</div>
+
+		<h2>Properties</h2>
+
+		<h3>[property:LoadingManager manager]</h3>
 		<div>
-		Creates a new [name].
+			The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
 		</div>
 
 
@@ -69,7 +79,8 @@
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded text response.<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
 		[page:Function onError] — Will be called when load errors.<br />

+ 6 - 4
docs/api/loaders/BinaryTextureLoader.html

@@ -11,7 +11,8 @@
 		<h1>[name]</h1>
 
 		<div class="desc">
-		Abstract base class to load generic binary textures formats (rgbe, hdr, ...).<br /><br />
+		Abstract base class to load generic binary textures formats (rgbe, hdr, ...).
+		This uses the [page:FileLoader] internally for loading files.
 		</div>
 
 		<h2>Examples</h2>
@@ -34,9 +35,9 @@
 
 		<h2>Properties</h2>
 
-		<h3>[property:LoadingManager loadingManager]</h3>
+		<h3>[property:LoadingManager manager]</h3>
 		<div>
-		loadingManager — the LoadingManager supplied in the constructor, or the [page:LoadingManager THREE.DefaultLoadingManager].<br />
+		The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
 		</div>
 
 
@@ -44,7 +45,8 @@
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
 		[page:Function onError] — Will be called when load errors.<br />

+ 14 - 6
docs/api/loaders/BufferGeometryLoader.html

@@ -10,10 +10,15 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">A loader for loading a [page:BufferGeometry].</div>
+		<div class="desc">
+			A loader for loading a [page:BufferGeometry].
+			This uses the [page:FileLoader] internally for loading files.
+		</div>
 
 		<h2>Example</h2>
 
+		[example:webgl_geometry_colors_lookuptable WebGL / geometry / colors / lookuptable]
+
 		<code>
 		// instantiate a loader
 		var loader = new THREE.BufferGeometryLoader();
@@ -38,7 +43,7 @@
 			}
 		);
 		</code>
-		
+
 		<h2>Constructor</h2>
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
@@ -52,12 +57,17 @@
 
 		<h2>Properties</h2>
 
+		<h3>[property:LoadingManager manager]</h3>
+		<div>
+			The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
+		</div>
 
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].d<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:BufferGeometry].<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
 		[page:Function onError] — Will be called when load errors.<br />
@@ -68,9 +78,7 @@
 
 		<h3>[method:BufferGeometry parse]( [page:Object json] )</h3>
 		<div>
-		[page:Object json] — The <em>JSON</em> structure to parse.
-		</div>
-		<div>
+		[page:Object json] — The <em>JSON</em> structure to parse.<br /><br />
 		Parse a <em>JSON</em> structure and return a [page:BufferGeometry].
 		</div>
 

+ 29 - 28
docs/api/loaders/Cache.html

@@ -10,61 +10,62 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">A simple caching classe, used internaly by [page:FileLoader].</div>
-
+		<div class="desc">
+			A simple caching system, used internally by [page:FileLoader].
+		</div>
 
-		<h2>Constructor</h2>
+		<h2>Examples</h2>
 
-		<h3>[name]()</h3>
 		<div>
-		Creates a new [name].
+			[example:webgl_geometry_text_earcut WebGL / geometry / text / earcut]<br />
+			[example:webgl_interactive_instances_gpu WebGL / interactive / instances / gpu]<br />
+			[example:webgl_loader_ttf WebGL / loader / ttf]
 		</div>
 
+		<h2>Usage</h2>
+
+		<div>To enable caching across all loaders	that use [page:FileLoader], set</div>
+		<code>
+THREE.Cache.enabled = true.
+		</code>
+
 
 		<h2>Properties</h2>
 
 		<h3>[property:Boolean enabled]</h3>
-		<div>
-		Whether caching is enabled. Default is *false*.
-		</div>
+		<div>Whether caching is enabled. Default is *false*.</div>
 
 		<h3>[property:Object files]</h3>
-		<div>
-		An [page:Object object] that hold cached values.
-		</div>
+		<div>An [page:Object object] that holds cached files.</div>
 
 
 		<h2>Methods</h2>
 
-		<h3>[method:null add]( [page:String key], value )</h3>
-		<div>
-		[page:String key] — required. A string key <br />
-		[page:Object] value — A value <br />
-		</div>
+		<h3>[method:null add]( [page:String key], file )</h3>
 		<div>
-		Adds a cache entry with that key to hold the value. If this key already holds a value, it is overwritten.
+		[page:String key] — the [page:String key] to reference the cached file by.<br />
+		[page:Object file] — The file to be cached.<br /><br />
+
+		Adds a cache entry with a key to reference the file. If this key already holds a file,
+		it is overwritten.
 		</div>
 
 		<h3>[method:null get]( [page:String key] )</h3>
 		<div>
-		[page:String key] — required. A string key <br />
-		</div>
-		<div>
-		Get the value of key. If the key does not exist *undefined* is returned.
+		[page:String key] — A string key <br /><br />
+
+		Get the value of [page:String key]. If the key does not exist *undefined* is returned.
 		</div>
 
 		<h3>[method:null remove]( [page:String key] )</h3>
 		<div>
-		[page:String key] — required. A string key <br />
-		</div>
-		<div>
-		Remove the cached value associated with the key.
+		[page:String key] — A string key that references a cached file.<br /><br />
+
+		Remove the cached file associated with the key.
 		</div>
 
 		<h3>[method:null clear]()</h3>
-		<div>
-		Remove all values from the cache.
-		</div>
+		<div>Remove all values from the cache.</div>
 
 
 		<h2>Source</h2>

+ 13 - 6
docs/api/loaders/CompressedTextureLoader.html

@@ -11,7 +11,8 @@
 		<h1>[name]</h1>
 
 		<div class="desc">
-		Abstract base class for block based textures loader (dds, pvr, ...).<br /><br />
+		Abstract base class for block based textures loader (dds, pvr, ...).
+		This uses the [page:FileLoader] internally for loading files.
 		</div>
 
 		<h2>Examples</h2>
@@ -19,7 +20,7 @@
 		<div>
 			See the [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/DDSLoader.js DDSLoader]
 			and [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PVRLoader.js PVRLoader]
-			for examples of a derived classes.
+			for examples of derived classes.
 		</div>
 
 		<h2>Constructor</h2>
@@ -37,15 +38,20 @@
 
 		<h3>[property:LoadingManager manager]</h3>
 		<div>
-		manager — the LoadingManager supplied in the constructor, or the [page:LoadingManager THREE.DefaultLoadingManager].<br />
+			The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
 		</div>
 
+		<h3>[property:String path]</h3>
+		<div>The base path from which files will be loaded. See [page:.setPath]. Default is *undefined*.</div>
+
+
 
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
 		[page:Function onError] — Will be called when load errors.<br />
@@ -54,9 +60,10 @@
 		Begin loading from url and pass the loaded texture to onLoad.
 		</div>
 
-		<h3>[method:null setPath]( [page:String value] )</h3>
+		<h3>[method:FileLoader setPath]( [page:String path] )</h3>
 		<div>
-		Set the path from which to load textures.
+			Set the base path or URL from which to load files. This can be useful if
+			you are loading many textures from the same directory.
 		</div>
 
 		<h2>Source</h2>

+ 34 - 22
docs/api/loaders/CubeTextureLoader.html

@@ -10,10 +10,22 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">Class for loading a [page:CubeTexture CubeTexture].</div>
+		<div class="desc">
+			Class for loading a [page:CubeTexture CubeTexture].
+			This uses the [page:ImageLoader] internally for loading files.
+		</div>
 
 		<h2>Example</h2>
 
+		<div>
+			[example:webgl_materials_cubemap materials / cubemap]<br />
+			[example:webgl_materials_cubemap_balls_reflection materials / cubemap / balls / reflection]<br />
+			[example:webgl_materials_cubemap_balls_refraction materials / cubemap / balls / refraction]<br />
+			[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic]<br />
+			[example:webgl_materials_cubemap_dynamic2 materials / cubemap / dynamic2]<br />
+			[example:webgl_materials_cubemap_refraction materials / cubemap / refraction]
+		</div>
+
 		<code>
 var scene = new THREE.Scene();
 scene.background = new THREE.CubeTextureLoader()
@@ -28,22 +40,12 @@ scene.background = new THREE.CubeTextureLoader()
 			] );
 		</code>
 
-		<div>
-			[example:webgl_materials_cubemap materials / cubemap]<br />
-			[example:webgl_materials_cubemap_balls_reflection materials / cubemap / balls / reflection]<br />
-			[example:webgl_materials_cubemap_balls_refraction materials / cubemap / balls / refraction]<br />
-			[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic]<br />
-			[example:webgl_materials_cubemap_dynamic2 materials / cubemap / dynamic2]<br />
-			[example:webgl_materials_cubemap_refraction materials / cubemap / refraction]
-		</div>
-
 		<h2>Constructor</h2>
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
 		<div>
-		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
-		</div>
-		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
+
 		Creates a new [name].
 		</div>
 
@@ -52,16 +54,27 @@ scene.background = new THREE.CubeTextureLoader()
 
 		<h3>[property:String crossOrigin]</h3>
 		<div>
-		default — *null*.<br />
-		If set, assigns the *crossOrigin* attribute of the image to the value of *crossOrigin*, prior to starting the load.
+		If set, assigns the [link:https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes crossOrigin]
+	 attribute of the image to the value of *crossOrigin*,
+		prior to starting the load. Default is *undefined*.
 		</div>
 
+		<h3>[property:LoadingManager manager]</h3>
+		<div>
+			The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
+		</div>
+
+		<h3>[property:String path]</h3>
+		<div>The base path from which files will be loaded. See [page:.setPath]. Default is *undefined*.</div>
+
+
 
 		<h2>Methods</h2>
 
-		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
+		<h3>[method:null load]( [page:String urls], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String urls] — array of 6 urls to images, one for each side of the CubeTexture. These can also be
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URIs].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
 		[page:Function onError] — Will be called when load errors.<br />
@@ -71,13 +84,12 @@ scene.background = new THREE.CubeTextureLoader()
 		</div>
 
 		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
-		<div>
-		Set the crossOrigin attribute.
-		</div>
+		<div>		Set the [page:.crossOrigin] attribute.</div>
 
-		<h3>[method:null setPath]( [page:String value] )</h3>
+		<h3>[method:FileLoader setPath]( [page:String path] )</h3>
 		<div>
-		Set the path from which to load textures.	
+			Set the base path or URL from which to load files. This can be useful if
+			you are loading many textures from the same directory.
 		</div>
 
 		<h2>Source</h2>

+ 1 - 1
docs/api/loaders/DataTextureLoader.html

@@ -10,7 +10,7 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">This is a synonym for the [page:BinaryTextureLoader BinaryTextureLoader].
+		<div class="desc">This is an alias for the [page:BinaryTextureLoader BinaryTextureLoader].
 			See that page for details.
 		</div>
 

+ 97 - 16
docs/api/loaders/FileLoader.html

@@ -11,16 +11,48 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">A low level class for loading resources with XmlHttpRequest, used internaly by most loaders.</div>
+		<div class="desc">
+			A low level class for loading resources with XmlHttpRequest, used internaly by most loaders.
+			It can also be used directly to load any file type that does not have a loader.
+		</div>
+
+		<h2>Example</h2>
+		<div>
+			[example:webgl_loader_msgpack WebGL / loader / msgpack]<br />
+			[example:webgl_morphtargets_human WebGL / morphtargets / human]<br />
+		</div>
+		<code>
+var loader = new THREE.FileLoader();
+
+//load a text file a output the result to the console
+loader.load(
+    // resource URL
+    'example.txt',
+
+    // Function when resource is loaded
+    function ( data ) {
+        // output the text to the console
+        console.log( data )
+    },
+
+    // Function called when download progresses
+    function ( xhr ) {
+        console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+    },
+
+    // Function called when download errors
+    function ( xhr ) {
+        console.error( 'An error happened' );
+    }
+);
+		</code>
 
 		<h2>Constructor</h2>
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
 		<div>
-		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
-		</div>
-		<div>
-		Creates a new [name].
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use.
+		Default is [page:DefaultLoadingManager].
 		</div>
 
 
@@ -28,36 +60,85 @@
 
 		<h3>[property:Cache cache]</h3>
 		<div>
-		A [page:Cache cache] instance that hold the response from each request made through this loader, so each file is requested once.
+			A reference to [page:Cache Cache] that hold the response from each request made
+			through this loader, so each file is requested once.<br /><br />
+
+			<em>Note:</em>The cache must be enabled using
+			<code>THREE.Cache.enabled = true.</code>
+			This is a global property and only needs to be set once to be used by all loaders that use FileLoader internally.
+		</div>
+
+		<h3>[property:LoadingManager manager]</h3>
+		<div>
+			The [page:LoadingManager loadingManager]  the loader is using. Default is [page:DefaultLoadingManager].
 		</div>
 
+		<h3>[property:String mimeType]</h3>
+		<div>
+			The expected [link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types mimeType].
+			See [page:.setMimeType]. Default is *undefined*.
+		</div>
+
+		<h3>[property:String path]</h3>
+		<div>The base path from which files will be loaded. See [page:.setPath]. Default is *undefined*.</div>
+
 		<h3>[property:String responseType]</h3>
+		<div>The expected response type. See [page:.setResponseType]. Default is *undefined*.</div>
+
+		<h3>[property:String withCredentials]</h3>
 		<div>
-		Can be set to change the response type.
+			Whether the XMLHttpRequest uses credentials - see [page:.setWithCredentials].
+			Default is *undefined*.
 		</div>
 
 
+
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
-		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded text response.<br />
-		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
-		[page:Function onError] — Will be called when load errors.<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
+		[page:Function onLoad] — Will be called when loading completes. The argument will be the loaded response.<br />
+		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance,
+			that contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
+		[page:Function onError] — Will be called if an error occurs.<br /><br />
+
+		Load the URL and pass the response to the onLoad function.
+		</div>
+
+		<h3>[method:FileLoader setMimeType]( [page:String mimeType] )</h3>
+		<div>
+			Set the expected [link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types mimeType]
+			of the file being loaded. Note that in many cases this will be determined automatically, so by default it is *undefined*.
 		</div>
+
+		<h3>[method:FileLoader setPath]( [page:String path] )</h3>
 		<div>
-		Begin loading from url and return the [page:String text] response that will contain the data.
+			Set the base path or URL from which to load files. This can be useful if
+			you are loading many models from the same directory.
 		</div>
 
-		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
+		<h3>[method:FileLoader setResponseType]( [page:String responseType] )</h3>
 		<div>
-		[page:String value] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
+		[page:String responseType] — Default is '' (empty string).<br /><br />
+
+		Change the response type. Valid values are:<br />
+		[page:String text], empty string (default), or any other value. Any file type, returns the unprocessed file data.<br />
+		[page:String arraybuffer] - loads the data into a [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer ArrayBuffer] and returns that.<br />
+		[page:String blob] - returns the data as a [link:https://developer.mozilla.org/en/docs/Web/API/Blob Blob].<br />
+		[page:String document] - parse the file using the [link:https://developer.mozilla.org/en-US/docs/Web/API/DOMParser DOMParser].<br />
+		[page:String json] - parse the file using [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse JSON.parse].<br />
+
 		</div>
 
-		<h3>[method:null setResponseType]( [page:String value] )</h3>
+		<h3>[method:FileLoader setWithCredentials]( [page:Boolean value] )</h3>
+		Whether the XMLHttpRequest uses credentials such as cookies, authorization headers or
+		TLS client certificates. See
+		[link:https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials XMLHttpRequest.withCredentials].<br />
+		Note that this has no effect if you are loading files locally or from the same domain.
 		<div>
-		[page:String value] — the empty string (default), "arraybuffer", "blob", "document", "json", or "text".
+
 		</div>
 
 		<h2>Source</h2>

+ 19 - 6
docs/api/loaders/FontLoader.html

@@ -12,7 +12,8 @@
 
 		<div class="desc">
 		Class for loading a font in JSON format. Returns a [page:Font Font], which is an
-		array of [page:Shape Shape]s representing the font.<br /><br />
+		array of [page:Shape Shape]s representing the font.
+		This uses the [page:FileLoader] internally for loading files. <br /><br />
 
 		You can convert fonts online using [link:https://gero3.github.io/facetype.js/ facetype.js]
 		</div>
@@ -50,23 +51,35 @@
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
 		<div>
-		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
+		Creates a new [name].
 		</div>
+
+		<h2>Properties</h2>
+
+		<h3>[property:LoadingManager manager]</h3>
 		<div>
-		Creates a new [name].
+			The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
 		</div>
 
+
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
-		[page:Function onError] — Will be called when load errors.<br />
+		[page:Function onError] — Will be called when load errors.<br /><br />
+
+		Begin loading from url and pass the loaded [page:Texture texture] to onLoad.
 		</div>
+
+		<h3>[method:Font parse]( [page:Object json] )</h3>
 		<div>
-		Begin loading from url and pass the loaded [page:Texture texture] to onLoad.
+		[page:Object json] — The <em>JSON</em> structure to parse.<br /><br />
+		Parse a <em>JSON</em> structure and return a [page:Font].
 		</div>
 
 		<h2>Source</h2>

+ 43 - 11
docs/api/loaders/ImageLoader.html

@@ -10,10 +10,20 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">A loader for loading an [page:Image].</div>
+		<div class="desc">
+			A loader for loading an [page:Image].
+
+			This uses the [page:FileLoader] internally for loading files, and is used internally by the
+			[page:CubeTextureLoader], [page:ObjectLoader] and [page:TextureLoader].
+		</div>
 
 		<h2>Example</h2>
 
+		<div>
+			[example:webgl_loader_obj WebGL / loader / obj]<br />
+			[example:webgl_shaders_ocean WebGL / shaders / ocean]
+		</div>
+
 		<code>
 		// instantiate a loader
 		var loader = new THREE.ImageLoader();
@@ -42,15 +52,13 @@
 		);
 		</code>
 
-		[example:webgl_shaders_ocean]
-		
+
 		<h2>Constructor</h2>
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
 		<div>
-		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
-		</div>
-		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
+
 		Creates a new [name].
 		</div>
 
@@ -58,14 +66,30 @@
 
 		<h3>[property:String crossOrigin]</h3>
 		<div>
-		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
+		If set, assigns the [link:https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes crossOrigin]
+	 attribute of the image to the value of *crossOrigin*, prior to starting the load. Default is *undefined*.
+		</div>
+
+		<h3>[property:LoadingManager manager]</h3>
+		<div>
+			The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
+		</div>
+
+		<h3>[property:String path]</h3>
+		<div>The base path from which files will be loaded. See [page:.setPath]. Default is *undefined*.</div>
+
+		<h3>[property:String withCredentials]</h3>
+		<div>
+			Whether the XMLHttpRequest uses credentials - see [page:.setWithCredentials].
+			Default is *undefined*.
 		</div>
 
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Image image].<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the progress event.<br />
 		[page:Function onError] — Will be called when load errors.<br />
@@ -75,12 +99,20 @@
 		</div>
 
 		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
+		<div>Set the [page:.crossOrigin] attribute.</div>
+
+		<h3>[method:FileLoader setPath]( [page:String path] )</h3>
 		<div>
-		[page:String value] — The crossOrigin string.
+			Set the base path or URL from which to load files. This can be useful if
+			you are loading many models from the same directory.
 		</div>
+
+		<h3>[method:FileLoader setWithCredentials]( [page:Boolean value] )</h3>
+		Whether the XMLHttpRequest uses credentials such as cookies, authorization headers or
+		TLS client certificates. See
+		[link:https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials XMLHttpRequest.withCredentials].<br />
+		Note that this has no effect if you are loading files locally or from the same domain.
 		<div>
-		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
-		</div>
 
 		<h2>Source</h2>
 

+ 28 - 12
docs/api/loaders/JSONLoader.html

@@ -8,13 +8,20 @@
 		<link type="text/css" rel="stylesheet" href="page.css" />
 	</head>
 	<body>
-		[page:Loader] &rarr;
 		<h1>[name]</h1>
 
-		<div class="desc">A loader for loading objects in JSON format.</div>
+		<div class="desc">
+			A loader for loading objects in JSON format.
+			This uses the [page:FileLoader] internally for loading files.
+		</div>
 
 		<h2>Example</h2>
 
+		<div>
+		[example:webgl_loader_json_blender WebGL / loader / json / blender]<br />
+		[example:webgl_loader_json_objconverter WebGL / loader / json / objconverter]
+		</div>
+
 		<code>
 		// instantiate a loader
 		var loader = new THREE.JSONLoader();
@@ -32,8 +39,6 @@
 		);
 		</code>
 
-		[example:webgl_loader_json_blender]
-
 		<h2>Constructor</h2>
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
@@ -44,11 +49,25 @@
 		Creates a new [name].
 		</div>
 
+		<h2>Properties</h2>
+
+		<h3>[property:LoadingManager manager]</h3>
+		<div>
+			The [page:LoadingManager loadingManager]  the loader is using. Default is [page:DefaultLoadingManager].
+		</div>
+
+		<h3>[property:String withCredentials]</h3>
+		<div>
+			Whether the XMLHttpRequest uses credentials.
+			Default is *false*.
+		</div>
+
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required.<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI]..<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded text response.<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
 		[page:Function onError] — Will be called when load errors.<br />
@@ -59,18 +78,15 @@
 
 		<h3>[method:null setTexturePath]( [page:String texturePath] )</h3>
 		<div>
-		[page:String texturePath] — Base path for textures.
-		</div>
-		<div>
-		Set the base path for textures.
+			Set the base path or URL from which to load files. This can be useful if
+			you are loading many files from the same directory.
 		</div>
 
 		<h3>[method:Object3D parse]( [page:Object json], [page:String texturePath] )</h3>
 		<div>
 		[page:String json] — JSON object to parse.<br />
-		[page:String texturePath] — Base path for textures.
-		</div>
-		<div>
+		[page:String texturePath] — Base path for textures.<br /><br />
+
 		Parse a <em>JSON</em> structure and return an [page:object] containing the parsed [page:Geometry geometry] and [page:Array materials].
 		</div>
 

+ 26 - 9
docs/api/loaders/MaterialLoader.html

@@ -10,7 +10,10 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">A loader for loading a [page:Material] in JSON format.</div>
+		<div class="desc">
+			A loader for loading a [page:Material] in JSON format.
+			This uses the [page:FileLoader] internally for loading files.
+		</div>
 
 		<h2>Example</h2>
 
@@ -43,34 +46,48 @@
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
 		<div>
-		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
+		Creates a new [name].
 		</div>
+
+		<h2>Properties</h2>
+
+		<h3>[property:LoadingManager manager]</h3>
 		<div>
-		Creates a new [name].
+			The [page:LoadingManager loadingManager]  the loader is using. Default is [page:DefaultLoadingManager].
 		</div>
 
+		<h3>[property:Object textures]</h3>
+		<div>Object holding any textures used by the material. See [page.setTextures].</div>
+
 
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Material].<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the progress event.<br />
-		[page:Function onError] — Will be called when load errors.<br />
-		</div>
-		<div>
+		[page:Function onError] — Will be called when load errors.<br /><br />
+
 		Begin loading from url and return the [page:Material] object that will contain the data.
 		</div>
 
 		<h3>[method:Material parse]( [page:Object json] )</h3>
 		<div>
-		[page:Object json] — The json object containing the parameters of the Material.
+		[page:Object json] — The json object containing the parameters of the Material.<br /><br />
+
+		Parse a <em>JSON</em> structure and create a new [page:Material] of the type [page:String json.type] with parameters defined in the json object.
 		</div>
+
+		<h3>[method:null setTextures]( [page:Object textures] )</h3>
 		<div>
-		Parse a <em>JSON</em> structure and create a new [page:Material] of the type [page:String json.type] with parameters defined in the json object.
+		[page:Object textures] — object containing any textures used by the material.
 		</div>
 
+
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 171 - 15
docs/api/loaders/ObjectLoader.html

@@ -10,21 +10,55 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">A loader for loading a JSON resource. Unlike the [page:JSONLoader], this one make use of the <em>.type</em> attributes of objects to map them to their original classes.</div>
+		<div class="desc">
+			A loader for loading a JSON resource. Unlike the [page:JSONLoader], this one make use of the
+			<em>.type</em> attributes of objects to map them to their original classes.<br /><br />
+
+			Note that this loader can't load [page:Geometries]. Use [page:JSONLoader] instead for that.<br /><br />
+
+			This uses the [page:FileLoader] internally for loading files.
+		</div>
 
 		<h2>Example</h2>
 
+		<div>
+
+			[example:webgl_animation_scene WebGL / animation / scene]<br />
+			[example:webgl_loader_json_claraio WebGL / loader / json / claraio]<br />
+			[example:webgl_loader_msgpack WebGL / loader / msgpack]
+		</div>
+
 		<code>
-		// instantiate a loader
-		var loader = new THREE.ObjectLoader();
+var loader = new THREE.ObjectLoader();
 
-		// assuming we loaded a JSON structure from elsewhere
-		var object = loader.parse( a_json_object );
+loader.load(
+    // resource URL
+    "models/json/example.json"
 
-		scene.add( object );
-		</code>
+    // pass the loaded data to the onLoad function.
+		//Here it is assumed to be an object
+    function ( obj ) {
+				//add the loaded object to the scene
+        scene.add( obj );
+    },
+
+    // Function called when download progresses
+    function ( xhr ) {
+        console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
+    },
+
+    // Function called when download errors
+    function ( xhr ) {
+        console.error( 'An error happened' );
+    }
+);
 
-		[example:webgl_loader_msgpack]
+
+// Alternatively, to parse a previously loaded JSON structure
+var object = loader.parse( a_json_object );
+
+scene.add( object );
+		</code>
 
 
 
@@ -32,21 +66,38 @@
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
 		<div>
-		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
-		</div>
-		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
+
 		Creates a new [name].
 		</div>
 
 
 		<h2>Properties</h2>
 
+		<h3>[property:String crossOrigin]</h3>
+		<div>
+		If set, assigns the [link:https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes crossOrigin]
+	 attribute of the image to the value of *crossOrigin*,
+		prior to starting the load. Default is *undefined*.
+		</div>
+
+		<h3>[property:LoadingManager manager]</h3>
+		<div>
+			The [page:LoadingManager loadingManager]  the loader is using. Default is [page:DefaultLoadingManager].
+		</div>
+
+		<h3>[property:String texturePath]</h3>
+		<div>
+			The base path or URL from which textures will be loaded. See [page:.setTexturePath].
+			Default is the empty string.
+		</div>
 
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Object3D object].<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
 		[page:Function onError] — Will be called when load errors.<br />
@@ -56,12 +107,110 @@
 		</div>
 
 
-		<h3>[method:Object3D parse]( [page:Object json] )</h3>
+		<h3>[method:Object3D parse]( [page:Object json], [page:Function onLoad]  )</h3>
 		<div>
-		[page:Object json] — required. The JSON source to parse<br />
+		[page:Object json] — required. The JSON source to parse.<br /><br />
+		[page:Function onLoad] — Will be called when parsed completes. The argument will be the parsed [page:Object3D object].<br />
+
+		Parse a <em>JSON</em> structure and return a threejs object.
+		This is used internally by [page:.load], but can also be used directly to parse
+		a previously loaded JSON structure.
 		</div>
+
+		<h3>[method:Object3D parseGeometries]( [page:Object json] )</h3>
 		<div>
-		Parse a <em>JSON</em> content and return a threejs object.
+		[page:Object json] — required. The JSON source to parse.<br /><br />
+
+		This is used [page:.parse] to parse any [page:Geometry geometries] or [page:BufferGeometry buffer geometries]  in the JSON structure.
+		Internally it uses [page:JSONLoader] for geometries and [page:BufferGeometryLoader] for buffer geometries.
+		</div>
+
+		<h3>[method:Object3D parseMaterials]( [page:Object json] )</h3>
+		<div>
+		[page:Object json] — required. The JSON source to parse.<br /><br />
+
+		This is used [page:.parse] to parse any materials in the JSON structure using [page:MaterialLoader].
+		</div>
+
+		<h3>[method:Object3D parseAnimations]( [page:Object json] )</h3>
+		<div>
+		[page:Object json] — required. The JSON source to parse.<br /><br />
+
+		This is used [page:.parse] to parse any animations in the JSON structure, using [page:AnimationClip.parse].
+		</div>
+
+		<h3>[method:Object3D parseImages]( [page:Object json] )</h3>
+		<div>
+		[page:Object json] — required. The JSON source to parse.<br /><br />
+
+		This is used [page:.parse] to parse any images in the JSON structure, using [page:ImageLoader].
+		</div>
+
+		<h3>[method:Object3D parseTextures]( [page:Object json] )</h3>
+		<div>
+		[page:Object json] — required. The JSON source to parse.<br /><br />
+
+		This is used [page:.parse] to parse any textures in the JSON structure.
+		</div>
+
+		<h3>[method:Object3D parseObject]( [page:Object json] )</h3>
+		<div>
+		[page:Object json] — required. The JSON source to parse.<br /><br />
+
+		This is used [page:.parse] to parse any objects in the JSON structure.
+		Objects can be of the following types:
+
+		<ul>
+			<li>
+				[page:Scene]
+			</li>
+			<li>
+				[page:PerspectiveCamera]
+			</li>
+			<li>
+				[page:OrthographicCamera]
+			</li>
+			<li>
+				[page:AmbientLight]
+			</li>
+			<li>
+				[page:DirectionalLight]
+			</li>
+			<li>
+				[page:PointLight]
+			</li>
+			<li>
+				[page:SpotLight]
+			</li>
+			<li>
+				[page:HemisphereLight]
+			</li>
+			<li>
+				[page:Mesh]
+			</li>
+			<li>
+				[page:LOD]
+			</li>
+			<li>
+				[page:Line]
+			</li>
+			<li>
+				[page:LineSegments]
+			</li>
+			<li>
+				[page:Points]
+			</li>
+			<li>
+				[page:Sprite]
+			</li>
+			<li>
+				[page:Group]
+			</li>
+			<li>
+				[page:Object3D]
+			</li>
+
+		</ul>
 		</div>
 
 		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
@@ -69,6 +218,13 @@
 		[page:String value] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
 		</div>
 
+		<h3>[method:null setTexturePath]( [page:String value] )</h3>
+		<div>
+		[page:String value] — The base path or URL from which textures will be loaded.<br /><br />
+
+
+		</div>
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 42 - 9
docs/api/loaders/TextureLoader.html

@@ -10,7 +10,10 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">Class for loading a [page:Texture texture].</div>
+		<div class="desc">
+			Class for loading a [page:Texture texture].
+			This uses the [page:ImageLoader] internally for loading files.
+		</div>
 
 		<h2>Example</h2>
 
@@ -46,9 +49,8 @@
 
 		<h3>[name]( [page:LoadingManager manager] )</h3>
 		<div>
-		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
-		</div>
-		<div>
+		[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
+
 		Creates a new [name].
 		</div>
 
@@ -57,24 +59,55 @@
 
 		<h3>[property:String crossOrigin]</h3>
 		<div>
-		default — *null*.<br />
-		If set, assigns the *crossOrigin* attribute of the image to the value of *crossOrigin*, prior to starting the load.
+		If set, assigns the [link:https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes crossOrigin]
+	 attribute of the image to the value of *crossOrigin*, prior to starting the load. Default is *undefined*.
+		</div>
+
+
+		<h3>[property:LoadingManager manager]</h3>
+		<div>
+			The [page:LoadingManager loadingManager]  the loader is using. Default is [page:DefaultLoadingManager].
 		</div>
 
+		<h3>[property:String path]</h3>
+		<div>The base path from which files will be loaded. See [page:.setPath]. Default is *undefined*.</div>
+
+
+		<h3>[property:String withCredentials]</h3>
+		<div>
+			Whether the XMLHttpRequest uses credentials - see [page:.setWithCredentials].
+			Default is *undefined*.
+		</div>
 
 		<h2>Methods</h2>
 
 		<h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
-		[page:String url] — required<br />
+		[page:String url] — the path or URL to the file. This can also be a
+			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
-		[page:Function onError] — Will be called when load errors.<br />
+		[page:Function onError] — Will be called when load errors.<br /><br />
+
+		Begin loading from url and pass the loaded [page:Texture texture] to onLoad.
 		</div>
+
+		<h3>[method:null setCrossOrigin]( [page:String value] )</h3>
+		<div>Set the [page:.crossOrigin] attribute.</div>
+
+		<h3>[method:FileLoader setPath]( [page:String path] )</h3>
 		<div>
-		Begin loading from url and pass the loaded [page:Texture texture] to onLoad.
+			Set the base path or URL from which to load files. This can be useful if
+			you are loading many models from the same directory.
 		</div>
 
+		<h3>[method:FileLoader setWithCredentials]( [page:Boolean value] )</h3>
+		Whether the XMLHttpRequest uses credentials such as cookies, authorization headers or
+		TLS client certificates. See
+		[link:https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials XMLHttpRequest.withCredentials].<br />
+		Note that this has no effect if you are loading files locally or from the same domain.
+		<div>
+
 		<h2>Source</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]