What sort of issues with ES5 are static class methods in ES6 supposed to deal with?
The Babel documentation has the following example in its section regarding ES6 classes, though it does not actually state what this pattern accomplishes.
Classes support prototype-based inheritance, super calls, instance and static methods and constructors
class SkinnedMesh extends THREE.Mesh {
constructor(geometry, materials) {
super(geometry, materials);
this.idMatrix = SkinnedMesh.defaultMatrix();
this.bones = [];
this.boneMatrices = [];
//...
}
update(camera) {
//...
super.update();
}
static defaultMatrix() {
return new THREE.Matrix4();
}
}