class Polygon { constructor (x, y, z, geometry, material, visibility, init) { this.x = x; this.y = y; this.z = z; this.shape = "StringC" this.visibility = visibility; init.apply(this); } } const objects = { polygonModels: { ground: new Polygon(0, 0, 0, "stringA", "stringB", true, function (this) { console.log(this); }), } };