Yep,
this is new ES6 way of doing it
old way
var obj = {
foo: function() {},
bar: function() {}
};
new way
usually you can use old syntax, new one is optional but bit shorter
var obj = {
foo() {},
bar() {}
};
it better to skip duplication when you do something like that
function method(){};
return {
method: method
};
it may looks like
return {
method
};
same syntax you may find at es6 class definition
class MyClass {
constructor(geometry, materials) {}
update(camera) {}
get boneCount() {}
set matrixType(matrixType) {}
}
Best regards
Egor