UNPKG

p2s

Version:

A JavaScript 2D physics engine.

32 lines (27 loc) 686 B
var ContactEquation = require('../equations/ContactEquation'); var Pool = require('./Pool'); module.exports = ContactEquationPool; /** * @class */ function ContactEquationPool() { Pool.apply(this, arguments); } ContactEquationPool.prototype = new Pool(); ContactEquationPool.prototype.constructor = ContactEquationPool; /** * @method create * @return {ContactEquation} */ ContactEquationPool.prototype.create = function () { return new ContactEquation(); }; /** * @method destroy * @param {ContactEquation} equation * @return {ContactEquationPool} */ ContactEquationPool.prototype.destroy = function (equation) { equation.bodyA = equation.bodyB = null; return this; };