← Changelog

Polygonjs 2.0.56

Transparency modes, colour palettes, cursor-driven compute

·built with Jai 0.2.029

  • Breaking The advanced toggle and the depth params behind it are gone from the mat/* nodes. Use the new transparencyMode instead: OPAQUE keeps a material out of the transparent pass, BLEND puts it in. AUTO will infer what is needed on most cases.
  • Breaking The USE_OIT object attribute is now TRANSPARENCY_MODE, and it holds a mode rather than a flag. Rename it in your scenes and set it to BLEND where it used to be true. Similar to the material, AUTO will infer what is needed on most cases.
  • Breaking Type-specific params on the code/* nodes now carry an underscore. code/Clamp.inputFloat is input_Float, and geo/AttributeCreate.valueFloat is value_Float. Saved scenes need those names updated by hand, there is no migration yet.
  • New Every material has a transparencyMode: AUTO, OPAQUE, MASK or BLEND. An alpha below 1 now does something on every material, not only on the few that happened to implement it. The names match glTF alphaMode, and geo/SceneGLTF maps an imported one straight onto it.
  • New MASK mode and the new alphaCutoff param give hard-edged cutouts that still write depth, so cutouts occlude each other correctly. mat/MeshBuilder carries it today.
  • New geo/ObjectProperties sets transparencyMode per object, so one material can serve both opaque and transparent objects.
  • New Materials have a sides param: front, back or both.
  • New tex/Palette generates a colour palette and bakes it into a 1D texture. Hue travels an eased cycle while saturation and lightness sweep eased ranges, in OKLCH for perceptually even steps or in plain HSL. The result comes out as hard blocks or as a gradient blended in OKLab.
  • New The cursor and its ray are available inside compute and GPU shaders, alongside a new code/RayClosestPoint.
  • New One wasm build can drive several scenes on the same page, each with its own canvas, camera and pointer input. The editor stays single-scene and switches itself off when a page holds more than one.
  • New geo/M2DBoolean and geo/M3DBoolean get a mode. Either pair each shape from input 0 with its counterpart in input 1, or batch every shape from both inputs into a single result.
  • New geo/AttributeCreate and the code/* nodes handle S8, S32 and U8 attributes.
  • New The alpha of a mat/MeshBuilder can drive its shadow, so a faded or cut-out surface casts a matching one.
  • New tex/Image comes with presets.
  • Improved Hovering a param in the params panel shows its help as a tooltip. Polynodes carry help of their own now, so the panel is no longer blank on them.
  • Improved Hovering a connector in the network panel raises its label, so it is readable over the nodes behind it.
  • Improved The group param sits nearer the top of geo/Transform, geo/Material, geo/CADExtrude and geo/CADRevolve.
  • Improved Errors coming out of a wasm build report a usable stack trace.
  • Improved Crash logs can be uploaded from canvas and SDK builds, not only from the editor.
  • Improved code/Compare and code/TwoWaySwitch start on more useful default values.
  • Fixed Textures fed to mat/MeshBuilder have their colour space managed, so an sRGB image no longer renders with the wrong colours.
  • Fixed Deleting a node inside a code network no longer crashes the editor.
  • Fixed Custom attribute names, defined in the SDK, appear in the attribute name menus again, and they serialize correctly from the nodes that create them.
  • Fixed File > Save As was missing from SDK builds.
  • Fixed Images loaded in wasm keep their alpha channel.