hunterloftis / newton

A playful, particle-based physics engine designed from the ground up for JavaScript.
917 stars 49 forks source link

Newton.Layer() is undefined #19

Open Robsteranium opened 10 years ago

Robsteranium commented 10 years ago

... although it's called internally by Simulation.Layer() when creating layers.

Ser5 commented 10 years ago

Looks like newton.js and newton.min.js are two different versions somehow. If I use newton.min.js - I get "Newton.GLRenderer is not a function" error. With newton.js there is "Newton.Layer is not a function" error.

Ontopic commented 10 years ago

The code responsible in newton.min.js for creating layers seems to be the same as in newton.js.

c.prototype.Layer=function(){var b=a.Layer();return this.layers.push(b),b}

vs

Simulator.prototype.Layer = function() {
   var newLayer = Newton.Layer();
   return this.layers.push(newLayer), newLayer;
}
tramck commented 10 years ago

+1

hunterloftis commented 10 years ago

Thanks for the heads up, I'll take a look.

HenrikJoreteg commented 10 years ago

@hunterloftis i ran into this as well. Also, could I possibly bother you to publish the latest updates to npm as well?

I'm a huge fan of what you're trying to do with this library, btw :)