Selaa lähdekoodia

Docs: Add code example for LoadingManager.addHandler().

Mugen87 5 vuotta sitten
vanhempi
commit
b26564e53e

+ 4 - 0
docs/api/en/loaders/managers/LoadingManager.html

@@ -167,6 +167,10 @@
 		Registers a loader with the given regular expression. Can be used to define what loader should be used in
 		order to load specific files. A typical use case is to overwrite the default loader for textures.
 		</p>
+		<code>
+// add handler for TGA textures
+manager.addHandler( /\.tga$/i, new TGALoader() );
+		</code>
 
 		<h3>[method:null getHandler]( [param:String file] )</h3>
 		<p>

+ 4 - 0
docs/api/zh/loaders/managers/LoadingManager.html

@@ -165,6 +165,10 @@
 		Registers a loader with the given regular expression. Can be used to define what loader should be used in
 		order to load specific files. A typical use case is to overwrite the default loader for textures.
 		</p>
+		<code>
+// add handler for TGA textures
+manager.addHandler( /\.tga$/i, new TGALoader() );
+		</code>
 
 		<h3>[method:LoadingManager removeHandler]( [param:Object regex] )</h3>
 		<p>