← Changelog

Polygonjs 2.0.63

For-each loops, SDF glass, one attrib()

·built with Jai 0.2.029

  • Breaking The expressions ptnum(), primnum() and objnum() are replaced by entityIndex(). Write entityIndex(.POINT), entityIndex(.PRIMITIVE) or entityIndex(.OBJECT) instead.
  • Breaking The expressions objectAttrib() and stage() are merged into attrib(). Write attrib(.NAME, entityType=.OBJECT) or attrib(.NAME, entityType=.STAGE) instead.
  • Breaking geo/Curve, geo/M2DExtrude, geo/M2DRevolve and geo/SDFCreate now keep the transform of their input object. A scene that moved the result back into place by hand can drop that step.
  • New geo/ForEachBegin and geo/ForEachEnd repeat a group of nodes once per point, primitive or object, and merge what each pass produced. Creating either node from the tab menu creates the pair.
  • New geo/CopyToQuads bends a copy of a template onto every quad, following each quad’s shape however it is twisted.
  • New mat/MeshSDF can render SDF objects as glass, with refraction, absorption and dispersion. An opaque part inside a clear one shows through it.
  • New geo/SDFArc2D and code/SDFArc2D create a circular arc as a 2D SDF.
  • New The help panel has a node browser and a reference for every expression.
  • New Expressions accept named arguments, such as bbox(location=1) which returns the bounding box of a node’s input 1.
  • New attrib() can read an object’s position, rotation and scale. For instance, use attrib(0, .P, entityType=.OBJECT) to read an input object’s position.
  • Improved Spare param hints are shown under the param instead of in a tooltip, and a page can hide or disable spare params from JavaScript.
  • Improved geo/LineExpand keeps 2D input in 2D, and works in the object’s local space.
  • Improved geo/CurveProperties can compute the tangent.
  • Fixed A connection to the second input of a geo node is saved correctly.