Skip to content

Commit ad4730c

Browse files
authored
Merge pull request #17535 from Mugen87/dev38
Docs: Add code example for LoadingManager.addHandler().
2 parents 4d508e7 + b26564e commit ad4730c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/api/en/loaders/managers/LoadingManager.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ <h3>[method:LoadingManager addHandler]( [param:Object regex], [param:Loader load
167167
Registers a loader with the given regular expression. Can be used to define what loader should be used in
168168
order to load specific files. A typical use case is to overwrite the default loader for textures.
169169
</p>
170+
<code>
171+
// add handler for TGA textures
172+
manager.addHandler( /\.tga$/i, new TGALoader() );
173+
</code>
170174

171175
<h3>[method:null getHandler]( [param:String file] )</h3>
172176
<p>

docs/api/zh/loaders/managers/LoadingManager.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ <h3>[method:LoadingManager addHandler]( [param:Object regex], [param:Loader load
165165
Registers a loader with the given regular expression. Can be used to define what loader should be used in
166166
order to load specific files. A typical use case is to overwrite the default loader for textures.
167167
</p>
168+
<code>
169+
// add handler for TGA textures
170+
manager.addHandler( /\.tga$/i, new TGALoader() );
171+
</code>
168172

169173
<h3>[method:LoadingManager removeHandler]( [param:Object regex] )</h3>
170174
<p>

0 commit comments

Comments
 (0)