0

I'm using ThreeJS and BaseJS. I want to extend THREE.Object3D into a new class. However, since it was not made with BaseJS, it does not have the function .extend. Is it possible to add these functions so that it is extensible?

John
  • 816
  • 5
  • 17
  • 1
    http://stackoverflow.com/questions/2256040/javascript-extends-class – sfletche Apr 26 '15 at 04:05
  • My problem is I did not create `THREE.Object3D`, I couldn't use `.extend` to create it. I looked at "Simple JavaScript Inheritance" but couldn't find my answer. – John Apr 26 '15 at 04:35
  • I went for `THREE.Object3D.extend = Class.extend;` and it seems to have worked. Am I doing something wrong? (using [John Resig's Simple JavaScript Inheritance](http://ejohn.org/blog/simple-javascript-inheritance/)) – John Apr 26 '15 at 04:48

0 Answers0