UNPKG

fish-simulator

Version:

fish simulator using glmatrix & detect-collisions

11 lines (9 loc) 252 B
let util = module.exports = {}; util.rectPoints = (w, h, ox = 0, oy = 0) => { return [ [w / 2 + ox, h / 2 + oy], [-w / 2 + ox, h / 2 + oy], [-w / 2 + ox, -h / 2 + oy], [w / 2 + ox, -h / 2 + oy], ]; };