what's new.md 13 KB

4.2.0

Major updates

  • Added particle editor to the Inspector (Deltakosh)
  • Added the ShadowDepthWrapper class to support accurate shadow generation for custom as well as node material shaders. Doc (Popov72)

Updates

General

  • Refactored React refs from old string API to React.createRef() API (belfortk)
  • Scale on one axis for BoundingBoxGizmo (cedricguillemet)
  • Simplified code contributions by fully automating the dev setup with gitpod (nisarhassan12)
  • Add a CascadedShadowMap.IsSupported method and log an error instead of throwing an exception when CSM is not supported (Popov72)
  • Added initial code for DeviceInputSystem (PolygonalSun)
  • Added support for material.disableColorWrite (Deltakosh)
  • The Mesh Asset Task also accepts File as sceneInput (RaananW)
  • Added support preserving vert colors for CSG objects (PirateJC)
  • Added support in ShadowGenerator for fast fake soft transparent shadows (Popov72)

Engine

  • Allow logging of shader code when a compilation error occurs (Popov72)
  • Add back support for selecting textures based on engine capabilities (bghgary)
  • Fix Draco decoder when running on IE11 (bghgary)

NME

  • Frames are now resizable from the corners (belfortk)
  • Can now rename and re-order frame inputs and outputs (belfortk)
  • Can now edit Node port names (belfortk)
  • Updated which node ports are shown on frames by default so that only node ports connected to outside nodes are by default exposed on the frame (belfortk)

Inspector

  • Handle PBR colors as colors in linear space (Popov72)
  • Allow removing textures (Popov72)
  • Edit all textures (anisotropic, clear coat, sheen, ...) for the PBR materials (Popov72)
  • Added right click options to create PBR and Standard Materials (Deltakosh)
  • Added support for recording GIF (Deltakosh)
  • Popup Window available (To be used in Curve Editor) (pixelspace)

Cameras

  • Fixed up vector not correctly handled with stereoscopic rig (cedricguillemet)
  • Added flag to TargetCamera to invert rotation direction and multiplier to adjust speed (Exolun)
  • Added upwards and downwards keyboard input to FreeCamera (Pheater)

Sprites

  • Added support for 'sprite.useAlphaForPicking` to enable precise picking using sprite alpha (Deltakosh)

Physics

  • Fixed time steps or delta time with sub time step for Oimo.js and Cannon.js (cedricguillemet)
  • Ammo.js collision group and mask supported by impostor parameters (cedricguillemet)
  • Ammo.js IDL exposed property update and raycast vehicle stablization support (MackeyK24)
  • Recast.js plugin nav mesh and crowd agent to ref performance optimizations. (MackeyK24)
  • Added scene.physicsEnabled boolean (Deltakosh)

Loaders

  • Added support for glTF mesh instancing extension (#7521) (drigax)
  • Get the list of cameras retrieved from a gLTF file when loaded through the asset container (Popov72)
  • Fixed SceneLoader.ImportAnimations. Now targets nodes based on "targetProperty" (#7931) (phenry20)
  • Renamed KHR_mesh_instancing extension to EXT_mesh_gpu_instancing (#7945) (drigax)

Navigation

Materials

  • Added the roughness and albedoScaling parameters to PBR sheen (Popov72)
  • Updated the energy conservation factor for the clear coat layer in PBR materials (Popov72)
  • Added the transparencyMode property to the StandardMaterial class (Popov72)
  • Added to FresnelParameters constructor options and equals method (brianzinn)
  • Added AddAttribute to CustomMaterial and PBRCustomMaterial (Popov72)
  • setTexture and setTextureArray from ShaderMaterial take now a BaseTexture as input instead of a Texture, allowing to pass a CubeTexture (Popov72)
  • Allow parenthesis usage in #if expressions in shader code (Popov72)

WebXR

  • Added optional ray and mesh selection predicates to WebXRControllerPointerSelection (Exolun)
  • Implemented the new WebXR HitTest API (#7364) (RaananW)
  • Playground doesn't update FPS when in XR in main and frame (#7875) (RaananW)
  • Added support for teleportation using pointer events (RaananW)
  • AR reference space type recommendation changed to 'unbounded' (#7959) (RaananW)
  • Teleportation plugin doesn't use the touched to finish teleportation (#7916) (RaananW)
  • Support for pointer selection and teleportation in right handed systems (#7967) (RaananW)
  • Pointer Selection feature now uses selectstart and selectend events when gamepad and motion controller are not present (#7989) (RaananW)
  • Removed forced autoClear = false settings (RaananW)
  • Added a warning that WebXR can only be served over HTTPS (RaananW)
  • Default (XR-global) rendering group ID can be defined when initializing a default experience (RaananW)
  • Added support for (experimental) haptic actuators (#8068) (RaananW)

Collisions

  • Added an option to optimize collision detection performance (jsdream) - PR

Animation

  • Added support for Additive Animation Blending. Existing animations can be converted to additive using the new MakeAnimationAdditive method for Skeletons, AnimationGroups and Animations. Animations can be played additively using the new isAdditive input parameter to the begin animation methods. (c-morten)

Maths

  • Added Vector3.projectOnPlaneToRef (Deltakosh)

Particles

  • Added local space support for GPU particles (CraigFeldpsar)
  • Added ability to update also colors and uvs of solid particle vertices (jerome)

Build

  • Fixed an issue with gulp webpack, webpack stream and the viewer (RaananW)

Playground

  • Added support for code templates in the playground (sailro)

Bugs

  • Fix infinite loop in GlowLayer.unReferenceMeshFromUsingItsOwnMaterial (Popov72)
  • Fix picking issue in the Solid Particle System when MultiMaterial is enabled (jerome)
  • Fix picking issue in the Solid Particle System when expandable (jerome)
  • QuadraticErrorSimplification was not exported (RaananW)
  • Fix NME Frames bug where collapsing and moving a frame removed the nodes inside (belfortk)
  • Fix moving / disappearing controls when freezing/unfreezing the ScrollViewer (Popov72)
  • Fix: when using instances, master mesh (if displayed) does not have correct instance buffer values (Popov72)
  • Exit XR will only trigger only if state is IN_XR (RaananW)
  • Fix improper baking of transformed textures in KHR_texture_transform serializer. (drigax)
  • Fixed NME codegen: missing common properties for float-value input block. (ycw)
  • Fixed missing options for MeshBuilder.CreateBox. (ycw)
  • Fix bug in Plane.transform when matrix passed in is not a pure rotation (Popov72)
  • Fix bug in PBR when anisotropy is enabled and no bump texture is provided (Popov72)
  • Fix horizon occlusion in PBR materials (Popov72)
  • Fix wrong relative position in applyImpulse/applyForce for ammojs plugin (cedricguillemet)
  • Fixed delay calculation in Animatable.goToFrame when speedRatio != 1 (Reimund Järnfors)
  • Fix bug in PBR when translucency is enabled and an irradiance texture is provided (Popov72)
  • Fix bug in PBR with translucency when irradiance texture is 2D (Popov72)
  • Fix bug in PBR when specific combinations of parameters are used (Popov72)
  • Fix texture being inverted on the Y axis by default when using TextureAsset or AssetManager (broederj)
  • Fix TexturePacker cross-origin image requests, fix falsy default options (ludevik)
  • Fix freeze (infinite loop) when disposing a scene that loaded some specific gLTF files (Popov72)
  • Fix submesh recreation when it should not (Popov72)
  • Fix CustomMaterial and PBRCustomMaterial not setting uniforms / samplers / attributes (Popov72)
  • Fix bug in NME where deleting a node from a frame would not remove its ports on the outside of a frame
  • Fix mesh winding order inversion when merging meshes with overridden side orientation (drigax)
  • Fixed a rendering issue with GearVR in WebXR mode (RaananW)
  • Fixed error when downloading async createScene function in playground (#7926) (RaananW)
  • Fix issue where ThinEngine.prototype.createDynamicEngine is undefined when using VideoTexture with es6 packages (rvadhavk)
  • Fix issue that canvas for VirtualJoystick does not have touch-action: "none" set by default (joergplewe)
  • Fix issue that prevented user from re-loading custom meshes (belfortk)
  • Fix bug in NME where collapsed frames didn't redraw output links to outside nodes (belfortk)
  • Fix bug in NME where links were not redrawn after moving frame port (belfortk)
  • Fix bugs in NME that were causing inconsistent behavior displaying Move Node Up and Down buttons on frame ports (belfortk)
  • Fix bug in ShaderMaterial when using morph targets (Popov72)
  • Fix bug in playground where child NME windows would not close before page unload events (belfortk)
  • Fixed an issue with stereoscopic rendering (#8000) (RaananW)
  • Fix bug with multiple scenes when resizing the screen and there's a glow or highlight layer active (Popov72)
  • Fix an error when compiling with the closure compiler (ageneau)
  • Fix an error in applying texture to sides of extrudePolygon using faceUV1
  • Playground didn't work if query params were added to the URL (RaananW)
  • Fixed Path3D _distances / length computation (Poolminer)

Breaking changes

  • EffectRenderer.render now takes a RenderTargetTexture or an InternalTexture as the output texture and only a single EffectWrapper for its first argument (Popov72)
  • Sound's updateOptions takes options.length and options.offset as seconds and not milliseconds (RaananW)