Skip to content

Commit 5947c2d

Browse files
authored
ArrayCamera: Convert to es6 class. (#21407)
* refact to use es6 * refact to es6 * fix build * fix lint * fix static methods. * revert EventDispatcher.js since it is converted by someone else * revert PropertyBindings.js since it is converted by someone else * revert Camera.js and PerspectiveCamera.js, since it break the test.
1 parent 9cc3c81 commit 5947c2d

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/cameras/ArrayCamera.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import { PerspectiveCamera } from './PerspectiveCamera.js';
22

3-
function ArrayCamera( array = [] ) {
3+
class ArrayCamera extends PerspectiveCamera {
44

5-
PerspectiveCamera.call( this );
5+
constructor( array = [] ) {
66

7-
this.cameras = array;
7+
super();
88

9-
}
10-
11-
ArrayCamera.prototype = Object.assign( Object.create( PerspectiveCamera.prototype ), {
9+
this.cameras = array;
1210

13-
constructor: ArrayCamera,
11+
}
1412

15-
isArrayCamera: true
13+
}
1614

17-
} );
15+
ArrayCamera.prototype.isArrayCamera = true;
1816

1917

2018
export { ArrayCamera };

src/cameras/PerspectiveCamera.js

100755100644
File mode changed.

0 commit comments

Comments
 (0)