Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
7d2a764feThis file is pinned to the selected release. Download the original to open it in your design tool.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Loader - iThreeJs</title>
<style type="text/css">
html, body {margin:0;padding:0;}
.container {margin:30px auto;padding:20px;width:800px;border:1px solid #ddd;}
h3, p {line-height:1.5em;font-size:14px;}
h3 {text-align:center;}
img {max-width:100%;}
</style>
</head>
<body>
<div class="container">
<h3>加载器 Loader</h3>
<p>加载器Loader用来加载3D模型或其他文件,不同格式的模型使用不同的加载器。</p>
<p>所有加载器都继承自父类Loader</p>
<p>Loader的核心方法为load(url, onLoad, onProgress, onError)</p>
<ul>
<li>url - A string containing the path/URL of the model file.</li>
<li>onLoad - (optional) A function to be called after the loading is successfully completed. The function receives the loaded Object3D as an argument.</li>
<li>onProgress - (optional) A function to be called while the loading is in progress. The function receives a XMLHttpRequest instance, which contains total and loaded bytes.</li>
<li>onError - (optional) A function to be called if an error occurs during loading. The function receives error as an argument.</li>
</ul>
<p>加载管理器LoadingManager在构造加载器时被自动应用</p>
<p>加载管理器用于追踪和显示有关加载总体状态的信息,而不是处理已加载的数据</p>
<p>加载管理器的核心方法:onStart, onLoad, onProgress, onError</p>
<p>ThreeJS支持的加载器包括:</p>
<p><img src="pic/model-loaders.jpg" /></p>
</div>
</body>
</html>