Skip to content

Commit 6cbc606

Browse files
committed
es6: add sample
1 parent 9ae587d commit 6cbc606

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

es6.sample.js

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
import Person from "People";
1+
import exp, {pi, e} from "lib/mathplusplus";
22

3-
export default class Hulk extends Person {
4-
constructor(name) {
5-
super(name);
6-
this.hulkMode = false;
7-
}
3+
export default class SkinnedMesh extends THREE.Mesh {
4+
constructor(geometry, materials) {
5+
super(geometry, materials);
86

9-
toggle() {
10-
this.hulkMode = !this.hulkMode;
7+
this.idMatrix = SkinnedMesh.defaultMatrix();
8+
}
9+
update(camera) {
10+
//...
11+
super.update();
12+
}
13+
static defaultMatrix() {
14+
return new THREE.Matrix4();
1115
}
12-
1316
}
17+
18+
nums.forEach(v => {
19+
if (v % 5 === 0)
20+
fives.push(v);
21+
});
22+

sample.gif

1.7 MB
Loading

0 commit comments

Comments
 (0)