v2.3.0

playcanvas/enginev2.3.0Dec 3, 2024by mvaligursky

AI Summary

A major version release introducing significant API refactoring, new WebGPU features, and a camera controls update.

Key Highlights

  • Breaking changes to tone mapping and fog API settings
  • Removal of VSM8 shadow type support
  • Addition of CameraFrame API and WebGPU ClipDistances support
  • Rename of MultiCamera to CameraControls

Breaking Changes

  • Refactor API for gammaCorrection, toneMapping, and Fog settings
  • Removed support for VSM8 shadow type
  • Camera callbacks replaced by events
  • Convert gsplat material to be chunk-based

New Features

  • CameraFrame API
  • WebGPU ClipDistances support
  • gl_InstanceID support for WebGPU
  • Depth prepass generates linear depth
  • Texture can be constructed with specified mip levels
  • CameraControls (renamed from MultiCamera)

Full Release Notes

## Breaking changes
* [BREAKING] Refactor API for gammaCorrection, toneMapping and Fog settings by @mvaligursky in https://github.com/playcanvas/engine/pull/7101
* [BREAKING] Removed support for VSM8 shadow type by @mvaligursky in https://github.com/playcanvas/engine/pull/7146
* [BREAKING] Camera callbacks replaced by the events by @mvaligursky in https://github.com/playcanvas/engine/pull/7156
* [BREAKING] Convert gsplat material to be chunk-based by @slimbuck in https://github.com/playcanvas/engine/pull/7164

## Other changes
* Exposed `GraphicsDevice.maxSamples` by @mvaligursky in https://github.com/playcanvas/engine/pull/7086
* Gizmo hover disabled with no selection on mouse down by @kpal81xd in https://github.com/playcanvas/engine/pull/7092
* Exposed `Scene.sky` properties by @mvaligursky in https://github.com/playcanvas/engine/pull/7041
* Renamed ESM scripts to end with mjs by @kpal81xd in https://github.com/playcanvas/engine/pull/7102
* Small bloom render pass optimization by @mvaligursky in https://github.com/playcanvas/engine/pull/7104
* Add `RigidBodyComponent#getPosition/getRotation` to reduce `Ammo` coupling by @kungfooman in https://github.com/playcanvas/engine/pull/6948
* Adds `deprecated.js` to `sideEffects` by @marklundin in https://github.com/playcanvas/engine/pull/7114
* Add define gl_InstanceID of gl_InstanceIndex for webgpu by @AlexAPPi in https://github.com/playcanvas/engine/pull/7123
* Depth prepass generates linear depth by @mvaligursky in https://github.com/playcanvas/engine/pull/7119
* Improve JSDoc for Quat by @willeastcott in https://github.com/playcanvas/engine/pull/7126
* Removes deprecated `.wheel` in OrbitCamera by @marklundin in https://github.com/playcanvas/engine/pull/7115
* Remove no longer used `float2MantissaExponent` internal function by @mvaligursky in https://github.com/playcanvas/engine/pull/7130
* Add support for simple compare expression to preprocessor by @mvaligursky in https://github.com/playcanvas/engine/pull/7133
* Add `XrJoint#id` by @willeastcott in https://github.com/playcanvas/engine/pull/7132
* WebGPU support for ClipDistances feature by @mvaligursky in https://github.com/playcanvas/engine/pull/7134
* CameraFrame API in the engine by @mvaligursky in https://github.com/playcanvas/engine/pull/7129
* Update ESLint to latest by @willeastcott in https://github.com/playcanvas/engine/pull/7140
* Support compressed spherical harmonics by @slimbuck in https://github.com/playcanvas/engine/pull/7143
* Support for `DEPTH16` texture format and its used for PCF shadow maps by @mvaligursky in https://github.com/playcanvas/engine/pull/7142
* Per frame randomized SSAO sampling & debug mode in composite pass by @mvaligursky in https://github.com/playcanvas/engine/pull/7139
* Renamed shadow type constants, old constants are deprecated by @mvaligursky in https://github.com/playcanvas/engine/pull/7145
* Add option to `GltfExporter` to strip unused attributes by @willeastcott in https://github.com/playcanvas/engine/pull/7153
* Texture can be constructed with a specified number of mip levels by @mvaligursky in https://github.com/playcanvas/engine/pull/7160

## Fixes
* `getFrustumCorners` fix by @slimbuck in https://github.com/playcanvas/engine/pull/7077
* Gizmo rotation direction fix  by @kpal81xd in https://github.com/playcanvas/engine/pull/7076
* fix #7098 missing texture format by @MAG-AdrianMeredith in https://github.com/playcanvas/engine/pull/7099
* Fix Script schema retrieval in `ScriptHandler` by @marklundin in https://github.com/playcanvas/engine/pull/7097
* Fixed ESM `swap()` by @marklundin in https://github.com/playcanvas/engine/pull/7107
* Ply loading fix by @slimbuck in https://github.com/playcanvas/engine/pull/7110
* Fix docs for `collisionend` event by @willeastcott in https://github.com/playcanvas/engine/pull/7112
* Fix types for `Scene#skybox` and `Scene#envAtlas` by @willeastcott in https://github.com/playcanvas/engine/pull/7118
* [Fix] Improve handling of lost device on WebGL by @mvaligursky in https://github.com/playcanvas/engine/pull/7121
* Fix buffer view target overrides in glTF exporter by @willeastcott in https://github.com/playcanvas/engine/pull/7152
* Correction to docs regarding `RenderTarget.mipLevel` by @mvaligursky in https://github.com/playcanvas/engine/pull/7158
* [Fix] Remove dimensions caching from RT by @mvaligursky in https://github.com/playcanvas/engine/pull/7163

## Examples
* [BETA] ESM Multi-Camera script updates by @kpal81xd in https://github.com/playcanvas/engine/pull/7078
* Example build fixes by @kpal81xd in https://github.com/playcanvas/engine/pull/7083
* WebGPU Picker example fix by @kpal81xd in https://github.com/playcanvas/engine/pull/7094
* Example controls updates by @kpal81xd in https://github.com/playcanvas/engine/pull/7093
* Updated the Particles Snow example with depth softening by @mvaligursky in https://github.com/playcanvas/engine/pull/7106
* Update Examples Browser NPM dependencies by @willeastcott in https://github.com/playcanvas/engine/pull/7113
* Examples monaco loader fix by @kpal81xd in https://github.com/playcanvas/engine/pull/7116
* `CameraControls` (previously MultiCamera) by @kpal81xd in https://github.com/playcanvas/engine/pull/7111
* Camera controls updates by @kpal81xd in https://github.com/playcanvas/engine/pull/7141
* Camera controls fixes by @kpal81xd in https://github.com/playcanvas/engine/pull/7157
* A utility script to allow WebGL GPU capture using Xcode by @mvaligursky in https://github.com/playcanvas/engine/pull/7154
* Scale gs sort bucket size with scene size by @slimbuck in https://github.com/playcanvas/engine/pull/7155
* ESM script to dynamically pull XR controllers from CDN by @willeastcott in https://github.com/playcanvas/engine/pull/7148
* Make camera controls script play nice with XR by @willeastcott in https://github.com/playcanvas/engine/pull/7128
* Camera controls XR null check by @kpal81xd in https://github.com/playcanvas/engine/pull/7165

## New Contributors
* @AlexAPPi made their first contribution in https://github.com/playcanvas/engine/pull/7123

**Full Changelog**: https://github.com/playcanvas/engine/compare/v2.2.2...v2.3.0