Skip to content

Commit a6186c3

Browse files
committed
VOXLoader: Convert to ES6 class.
1 parent efdcb27 commit a6186c3

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

examples/jsm/loaders/VOXLoader.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,9 @@ import {
33
Loader
44
} from '../../../build/three.module.js';
55

6-
function VOXLoader( manager ) {
6+
class VOXLoader extends Loader {
77

8-
Loader.call( this, manager );
9-
10-
}
11-
12-
VOXLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
13-
14-
constructor: VOXLoader,
15-
16-
load: function ( url, onLoad, onProgress, onError ) {
8+
load( url, onLoad, onProgress, onError ) {
179

1810
var scope = this;
1911

@@ -45,9 +37,9 @@ VOXLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
4537

4638
}, onProgress, onError );
4739

48-
},
40+
}
4941

50-
parse: function ( buffer ) {
42+
parse( buffer ) {
5143

5244
const data = new DataView( buffer );
5345

@@ -162,6 +154,6 @@ VOXLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
162154

163155
}
164156

165-
} );
157+
}
166158

167159
export { VOXLoader };

0 commit comments

Comments
 (0)