JSFiddle - React, Tailwind, and code Playground
by jfriend00
HTML
<script src="http://files.the-friend-family.com/log.js"></script>
JavaScript
var Particles = function() {
this.count = 20;
};
Particles.prototype.physicsStep = function() {
this.computeForces(); // error in Chrome
this.integrationStep(); // error in Chrome
}
Particles.prototype.computeForces = function() {
this.forces = this.count * 25;
log("running computeForces");
}
Particles.prototype.integrationStep = function() {
this.whatever = this.forces / 5;
log("running integrationStep");
}
var p = new Particles();
p.physicsStep();
log("forces = ", p.forces);
log("integration = ", p.whatever);