Loader.html 2.1 KB
Newer Older
M
r59  
Mr.doob 已提交
1 2 3
<!DOCTYPE html>
<html lang="en">
	<head>
M
r72  
Mr.doob 已提交
4 5 6 7 8
		<meta charset="utf-8" />
		<base href="../../" />
		<script src="list.js"></script>
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
M
r59  
Mr.doob 已提交
9 10 11 12 13 14 15 16 17 18
	</head>
	<body>
		<h1>[name]</h1>

		<div class="desc">Base class for implementing loaders.</div>


		<h2>Constructor</h2>


M
r72  
Mr.doob 已提交
19
		<h3>[name]()</h3>
M
r59  
Mr.doob 已提交
20
		<div>
M
r66  
Mr.doob 已提交
21
		Creates a new [name]. This should be called as base class.
M
r59  
Mr.doob 已提交
22 23 24 25 26
		</div>


		<h2>Properties</h2>

M
r69  
Mr.doob 已提交
27
		<h3>[property:Function onLoadStart]</h3>
M
r59  
Mr.doob 已提交
28 29 30
		<div>Will be called when load starts.</div>
		<div>The default is a function with empty body.</div>

M
r69  
Mr.doob 已提交
31
		<h3>[property:Function onLoadProgress]</h3>
M
r59  
Mr.doob 已提交
32 33
		<div>Will be called while load progresses.</div>
		<div>The default is a function with empty body.</div>
M
r70  
Mr.doob 已提交
34

M
r69  
Mr.doob 已提交
35
		<h3>[property:Function onLoadComplete]</h3>
M
r59  
Mr.doob 已提交
36 37
		<div>Will be called when load completes.</div>
		<div>The default is a function with empty body.</div>
M
r70  
Mr.doob 已提交
38

M
r69  
Mr.doob 已提交
39
		<h3>[property:string crossOrigin]</h3>
M
r59  
Mr.doob 已提交
40
		<div>
M
r66  
Mr.doob 已提交
41
		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
M
r70  
Mr.doob 已提交
42
		</div>
M
r59  
Mr.doob 已提交
43 44 45

		<h2>Methods</h2>

M
r70  
Mr.doob 已提交
46
		<h3>[method:Material createMaterial]( [page:object m], [page:string texturePath] )</h3>
M
r59  
Mr.doob 已提交
47
		<div>
M
r70  
Mr.doob 已提交
48 49
		[page:Object m] — The parameters to create the material. <br />
		[page:String texturePath] — The base path of the textures.
M
r59  
Mr.doob 已提交
50 51
		</div>
		<div>
M
r66  
Mr.doob 已提交
52
		Creates the Material based on the parameters m.
M
r59  
Mr.doob 已提交
53 54
		</div>

M
r70  
Mr.doob 已提交
55
		<h3>[method:Array initMaterials]( [page:Array materials], [page:string texturePath] )</h3>
M
r59  
Mr.doob 已提交
56
		<div>
M
r70  
Mr.doob 已提交
57 58
		[page:Array materials] — an array of parameters to create materials. <br />
		[page:String texturePath] —  The base path of the textures.
M
r59  
Mr.doob 已提交
59 60
		</div>
		<div>
M
r66  
Mr.doob 已提交
61
		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.
M
r59  
Mr.doob 已提交
62 63
		</div>

M
r70  
Mr.doob 已提交
64
		<h3>[method:String extractUrlBase]( [page:string url] )</h3>
M
r59  
Mr.doob 已提交
65
		<div>
M
r70  
Mr.doob 已提交
66
		[page:String url] —  The url to extract the base url from.
M
r59  
Mr.doob 已提交
67 68
		</div>
		<div>
M
r70  
Mr.doob 已提交
69
		Extract the base from the URL.
M
r59  
Mr.doob 已提交
70 71 72 73 74 75 76 77
		</div>


		<h2>Source</h2>

		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
	</body>
</html>