Currently, if you accidentally use a float for minX, maxX, minY, or maxY in your model constructor, this error gets thrown:
Uncaught (in promise) TypeError: Cannot read property 'rectCache' of undefined
at Patches.patchRect (Patches.js:183)
at Patches.patchRectXY (Patches.js:204)
at Turtles.inPatchRectXY (Turtles.js:74)
at Turtles.inPatchRect (Turtles.js:66)
at Turtles.inRadius (Turtles.js:85)
at LandingPageFlockModel.flock (FlockModel.js:42)
at FlockModel.js:38
at Turtles.ask (AgentSet.js:272)
at LandingPageFlockModel.step [as step0] (FlockModel.js:37)
at LandingPageFlockModel.stepAndTick (Model.js:110)
Would be nice to catch this upstream and print a more helpful error.
Currently, if you accidentally use a float for
minX
,maxX
,minY
, ormaxY
in your model constructor, this error gets thrown:Would be nice to catch this upstream and print a more helpful error.