Skip to content

Commit 022cf74

Browse files
authored
Merge pull request #16722 from Mugen87/dev30
JSM: Added module and TS files for MD2Loader and MD2Character.
2 parents ebc0d32 + 9ce7030 commit 022cf74

File tree

9 files changed

+718
-3
lines changed

9 files changed

+718
-3
lines changed

docs/manual/en/introduction/Import-via-modules.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ <h2>Importable Examples</h2>
178178
<li>KMZLoader</li>
179179
<li>KTXLoader</li>
180180
<li>LWOLoader</li>
181+
<li>MD2Loader</li>
181182
<li>MTLLoader</li>
182183
<li>OBJLoader</li>
183184
<li>PCDLoader</li>
@@ -207,6 +208,8 @@ <h2>Importable Examples</h2>
207208
</li>
208209
<li>misc
209210
<ul>
211+
<li>Car</li>
212+
<li>MD2Character</li>
210213
<li>Ocean</li>
211214
</ul>
212215
</li>

examples/js/MD2Character.js renamed to examples/js/misc/MD2Character.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ THREE.MD2Character = function () {
4646

4747
var boundingBox = new THREE.Box3();
4848
boundingBox.setFromBufferAttribute( geo.attributes.position );
49-
49+
5050
scope.root.position.y = - scope.scale * boundingBox.min.y;
5151

5252
var mesh = createPart( geo, scope.skinsBody[ 0 ] );
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import {
2+
BufferGeometry,
3+
LoadingManager
4+
} from '../../../src/Three';
5+
6+
export class MD2Loader {
7+
constructor(manager?: LoadingManager);
8+
manager: LoadingManager;
9+
path: string;
10+
11+
load(url: string, onLoad: (geometry: BufferGeometry) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void;
12+
setPath(path: string): this;
13+
parse(data: ArrayBuffer): BufferGeometry;
14+
}

0 commit comments

Comments
 (0)