Facebook
From Class issue, 2 Years ago, written in JavaScript.
This paste is a reply to Untitled from Small Dove - view diff
Embed
Download Paste or View Raw
Hits: 115
  1. class Polygon {
  2.     constructor (x, y, z, geometry, material, visibility, init) {
  3.         this.x = x;
  4.         this.y = y;
  5.         this.z = z;
  6.         this.shape = "StringC"
  7.         this.visibility = visibility;
  8.         init.apply(this);
  9.     }
  10. }
  11.  
  12. const objects = {
  13.     polygonModels: {
  14.         ground: new Polygon(0, 0, 0, "stringA", "stringB", true, function (this) {
  15.                         console.log(this);
  16.         }),
  17.     }
  18. };