Skip to content

Commit

Permalink
Merge pull request mrdoob#15923 from Mugen87/dev26
Browse files Browse the repository at this point in the history
Documentation: Add Loader.Handlers docu to Loader page.
  • Loading branch information
Mugen87 authored Mar 9, 2019
2 parents 5e00de2 + 905922b commit 1bb6d19
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/api/en/loaders/Loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@ <h3>[method:Array initMaterials]( [param:Array materials], [param:string texture
Creates an array of [page:Material] based on the array of parameters m. The index of the parameters decide the correct index of the materials.
</p>

<h2>Handlers</h2>

<p>
*[name].Handlers* is a special object normally used by other loaders like [page:GLTFLoader] or [page:MTLLoader]. It provides an
API that allows the definition of special mappings: What loaders should be used in order to load specific files. A typical use case
is to overwrite the default loader for textures.<br /><br />

Note: It's only possible to use *[name].Handlers* if the respective loader support the usage.
</p>

<h3>[method:null add]( [param:Object regex], [param:Loader loader] )</h3>
<p>
[page:Object regex] — A regular expression.<br />
[page:Loader loader] — The loader.
<p>
Registers a loader with the given regular expression.
</p>

<h3>[method:null get]( [param:String file] )</h3>
<p>
[page:String file] — The file path.
<p>
Can be used to retrieve the registered loader for the given file path.
</p>

<h2>Source</h2>

Expand Down
20 changes: 20 additions & 0 deletions docs/api/zh/loaders/Loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,26 @@ <h3>[method:Array initMaterials]( [param:Array materials], [param:string texture
基于参数数组m,来创建 [page:Material] 数组. 参数索引与材质的索引一致。
</p>

<h2>Handlers</h2>

<p>
TODO
</p>

<h3>[method:null add]( [param:Object regex], [param:Loader loader] )</h3>
<p>
[page:Object regex] — TODO<br />
[page:Loader loader] — TODO
<p>
TODO
</p>

<h3>[method:null get]( [param:String file] )</h3>
<p>
[page:String file] — TODO
<p>
TODO
</p>

<h2>Source</h2>

Expand Down

0 comments on commit 1bb6d19

Please sign in to comment.