Skip to content

v2.4.3

Choose a tag to compare

@github-actions github-actions released this 23 Nov 00:38
fc56f0d

Fixed

  • gridPlanes3D().data() crashed in ccw with a TypeError when the
    number of points was not a multiple of rows(). It now throws a
    RangeError that says so.
  • lineStrips3D().data([[]]) threw on an empty strip. An empty strip now
    gets a NaN centroid, like lines3D. draw() of an empty line, line
    strip or polygon returns an empty path instead of throwing (lines and
    strips) or returning the invalid path Z (polygons).
  • perspective(0) collapsed the scene onto the rotation center and a
    negative distance mirrored it, both silently. perspective() now throws
    a RangeError for a distance that is not positive.
  • sort left the shapes unsorted when one of them had a NaN centroid, as
    an empty line, line strip or polygon has: NaN compared equal to every
    depth. A NaN centroid now sorts to the back.
  • cubes3D, planes3D and triangles3D failed with a TypeError on a
    missing point when a shape had too few points, and planes3D and
    triangles3D drew only the first four or three points of a longer one.
    data() now throws a RangeError when a cube does not have eight points,
    a plane four or a triangle three.
  • iso3D().data() always drew the sides of a box at x + w and y + d,
    the ones the standard isometric view sees. Turned any other way, for
    example with .rotateZ() or a shared .camera(), the wall showed the
    back of the box and frontPlane and sidePlane lay on hidden faces. They
    now follow viewDirection(). At the standard view the output is the same.
  • transform and every shape's data() copied each point into a plain
    object. An array datum such as [x, y, z] came back as an object without
    map or length, and a class instance without its methods, though the
    types promised both. An array now stays an array and a class instance
    keeps its prototype; plain objects are copied as before.