what's new.md 25 KB

4.1.0

Major updates

  • WIP: Node Material (NEED DOC OR SAMPLES) (Deltakosh)
  • WIP: Node material editor (NEED OR AND VIDEOS) (Deltakosh / TrevorDev)
  • WIP: WebGPU support (NEED DOC OR SAMPLES) (Sebavan)
  • .basis texture file format support Doc (TrevorDev)
  • WIP: Recast navigation mesh and crowd of moving agents Demo (CedricGuillemet)
  • Added Points Cloud Particle System (JohnK)
  • Classes decoupling ending up with smaller bundle sizes Blog (Deltakosh)
  • Babylon.js controls Doc (Sebavan / Deltakosh)
  • WebXR updates:
    • WebXR updated to spec as of July 10th (TrevorDev)
    • WebXR webVR parity helpers (Vive, WMR, Oculus Rift) (TrevorDev)
  • Added support for Offscreen canvas Doc (Deltakosh
  • Added support for multiple canvases with one engine Doc (Deltakosh
  • Added useReverseDepthBuffer to Engine which can provide greater z depth for distant objects without the cost of a logarithmic depth buffer (BenAdams)

Updates

General

  • Add two new clip planes (5 and 6) to get a clip cube (MickPastor)
  • Added support for dual shock gamepads (Deltakosh)
  • Support Vive Focus 3Dof controller (TrevorDev)
  • Planar positioning support for GizmoManager (Balupg)
  • ScaleGizmo and AxisScaleGizmo sensitivity factor (CedricGuillemet)
  • Individual gizmos can now be enabled/disabled (Balupg)
  • Unify preparation of instance attributes. Added MaterialHelper.PushAttributesForInstances (MarkusBillharz)
  • Added support for PBR irradiance map
  • Added ability to set render camera on utility layer instead of using the latest active camera (TrevorDev)
  • Move normalizeToUnitCube to transformNode instead of abstract mesh and add predicate to exclude sub objects when scaling (TrevorDev)
  • Method to check if device orientation is available (TrevorDev)
  • Added support for sound sprites Doc (Deltakosh)
  • Display Oculus Quest controller when using a Quest in WebVR (TrevorDev)
  • Added startAndReleaseDragOnPointerEvents property to pointerDragBehavior which can be set to false for custom drag triggering (TrevorDev)
  • Added optional picking predicate to pointerDragBehavior for filtering affected meshes (Exolun)
  • Added accessor functions for PointerDragBehavior._options (Popov72)
  • Effect renderer to render one or multiple shader effects to a texture (TrevorDev)
  • Added url parameters to web request modifiers (PierreLeBlond)
  • Added VRExperienceHelper.exitVROnDoubleTap (Deltakosh)
  • Added Scene.getTextureByUniqueID (aWeirdo)
  • Added support for 180 VR videos in VideoDome (RaananW)
  • Added optional parameter to use Euler angles in planeRotationGizmo (CedricGuillemet)
  • Added AnimationGroup.onAnimationGroupLoopObservable (Deltakosh)
  • Supports custom materials to generate glow through referenceMeshToUseItsOwnMaterial in the GlowLayer (sebavan)
  • Added RawTexture2DArray to enable use of WebGL2 2D array textures by custom shaders (atg)
  • Added multiview support for the shader material (and the line-mesh class) (RaananW)
  • Added various (interpolation) functions to Path3D, also alignTangentsWithPath, slice, getClosestPositionTo (Poolminer)
  • Allow setting of BABYLON.Basis.JSModuleURL and BABYLON.Basis.WasmModuleURL, for hosting the Basis transcoder locally ([JasonAyre])(https://github.com/jasonyre))
  • PNG support for browsers not supporting SVG (RaananW)
  • Device orientation event permissions for iOS 13+ (RaananW)

Engine

  • Improved instanceMesh with user defined custom buffers Doc (Deltakosh)
  • Morph targets now can morph UV channel as well (Deltakosh)
  • Added MorphTarget support to the DepthRenderer, GeometryBufferRenderer and OutlineRenderer (MarkusBillharz)
  • Added preprocessors for shaders to improve how shaders are compiled for WebGL1/2 or WebGPU (Deltakosh)
  • Added enterPointerlock and exitPointerlock (Separated from enterFullscreen) (aWeirdo)
  • Added support for vertexSource and fragmentSource parameters to ShaderMaterial (Deltakosh)

Inspector

  • Added support for Euler edition only for angles (can be turned off in the new inspector settings) (Deltakosh)
  • Added an option to ignore backfaces for picking (can be turned on and off in the new inspector settings) (Deltakosh)
  • Added support for ShadowGenerator (Deltakosh)
  • Added support for scene normalization (Deltakosh)
  • Added support for morph targets (Deltakosh)
  • Added context menu to add SSAORenderingPipeline and SSAO2RenderingPipeline (Deltakosh)
  • Added support for texture creation and assignments per material (Deltakosh)
  • Added support for occlusion properties (Deltakosh)
  • Texture channels are now displayed in grayscale (Deltakosh)
  • Ambiant and metallic maps are displayed correctly on PBR material even when using ORM packed texture (Deltakosh)
  • Added support for inspectable strings (Deltakosh)
  • Added support for CreateScreenshotUsingRenderTarget (13djwright)
  • Added support for Material.depthFunction property (Popov72)
  • Added an optional config option initialTab (ycw)
  • Added support for ImportAnimations (noalak)

Tools

  • Added Tools.CreateScreenshotAsync and Tools.CreateScreenshotUsingRenderTargetAsync (mehmetoguzderin)
  • Added Color3.toHSV(), Color3.toHSVToRef() and Color3.HSVtoRGBToRef() (Deltakosh)
  • Added ShadowGenerator.onAfterShadowMapRenderObservable and ShadowGenerator.onAfterShadowMapMeshRenderObservable (Deltakosh)
  • Added support for side by side and top bottom images in the PhotoDome (Deltakosh)
  • Added playground ts-local (TypeScript support for local playground) (pjoe)
  • Added RGBD Texture tools Sebavan
  • Bumped Monaco Editor to 0.18.1 and improved TypeScript compilation pipeline in the playground (sailro)
  • Added support for clickable errors in the playground (sailro)
  • Added a color picker and previewer for BABYLON.ColorX invocations in the playground (sailro)
  • Added support for diffing snippets in the playground (sailro)
  • Added diff navigator in the playground (sailro)
  • Added custom filter to remove internals from the completion in the playground (sailro)
  • Added support for tagging deprecated members (both in editor and for completion) in the playground (sailro)

Meshes

  • Added TransformNode.instantiateHierarchy() which try to instantiate (or clone) a node and its entire hiearchy (Deltakosh)
  • Added new CreateTiledPlane and CreateTiledBox (JohnK)
  • Added absolute scaling and rotation getters (haroldma)
  • Added BILLBOARDMODE_USE_POSITION flag to billboards allowing use of camera positioning instead of orientation for mesh rotation (delaneyj)
  • Added accessor functions for SubMesh._materialDefines (Popov72)

Physics

  • Update Ammo.js library to support global collision contact callbacks (MackeyK24)
  • Update Ammo.js library to allow native capsule shape impostors (MackeyK24)
  • Update Ammo.js library to allow your own broadphase overlapping pair cache (MackeyK24)
  • Update Ammo.js library for custom impostor shapes. PhysicsImpostor.CustomImposter type and AmmoJSPlugin.OnCreateCustomShape factoty function (MackeyK24)
  • Update Ammo.js library and AmmoJS plugin to support ellipsoid (CedricGuillemet)
  • Physics update substeps (CedricGuillemet)

Loaders

  • Added support for non-float accessors in animation data for glTF loader. (bghgary)
  • Support loading cube data in the .basis loader (TrevorDev)
  • Load glTF extras into BJS metadata (pjoe)
  • Added support for morph target names via mesh.extras.targetNames when loading a glTF (zeux)
  • Added support for using HTTP range requests when loading MSFT_lod extension from a glTF binary. (bghgary)
  • Added a flag to enable/disable creation of instances for glTF loader. (bghgary)
  • Added an order property to glTF loader extensions to support reordering. (bghgary)
  • Added support for GLTF clearcoat extension Sebavan
  • Added support for GLTF specular extension Sebavan
  • Added support for GLTF sheen extension Sebavan
  • Added support for GLTF mesh quantization extension (zeux)
  • Added support for 8 bone influences to glTF loader (zeux)
  • Added support for animations import from separate files (noalak)
  • Use web workers to validate glTF to avoid blocking the main thread. (bghgary)

Materials

  • Added ShaderMaterial.setColor4Array (JonathanTron)
  • Added ShaderMaterial.setArray4 (JonathanTron)
  • Added get/set accessors for ShaderMaterial._shaderPath (Popov72)
  • Added scene.environmentIntensity to control the IBL strength overall in a scene (Sebavan)
  • Added support of image processing for WaterMaterial (julien-moreau)
  • Added pbrBRDFConfiguration.useSpecularGlossinessInputEnergyConservation to allow Specular-Workflow energy conservation to be turned off (ColorDigital-PS).
  • Added support for the freeze / unfreeze functions in ShaderMaterial (Popov72)
  • Added depthFunction new property to Material base class (Popov72)
  • Added setCompressedTextureExclusions method to Engine to allow for skipping compressed textures on certain files (abogartz)

ScreenshotTools

  • Added interface for argument size of screenshot methods (Dok11)
  • Implementation usage of precision in combination height and width params (Dok11)

Sounds

  • Added ISoundOptions.skipCodecCheck to make Sound more flexible with URLs (nbduke)
  • Added Scene.audioListenerPositionProvider property, to enable setting custom position of audio listener (Foxhoundn)

Sprites

  • SpritePackedManager extends SpriteManager so that a sprite sheet with different size sprites can be used (JohnK)
  • MultiPickSprite and multiPickSpriteWithRay added to sprites (JohnK)
  • SpritePackedManager support for JSON Objects that where not stringified, of with the frames parameter accepting Objects and Arrays (Pryme8)
  • Added SpriteMap for creation of grid-based dynamically animated sprite atlas rendering (Beta) (Pryme8)

WebXR / WebVR

  • Compliance with the mozilla WebXR emulator for chrome and firefox (RaananW)
  • Use the same icon as in VR (RaananW)
  • Gamepad object is now exposed in the WebXRController class (RaananW)
  • If canvas does not have WebXR support the scene will still render (mainly Firefox) (RaananW)
  • Added support for foveated rendering in Oculus Quest (Deltakosh)
  • Added option to configure the output canvas (RaananW)
  • Supporting multisampled multiview rendering using the oculus multiview extension (RaananW)
  • Preparing to deprecate supportsSession in favor of isSupportedSession (RaananW)
  • Added onControllerModelLoaded observable for WebXR (RaananW)
  • UI Button has options to set different session mode and reference type (RaananW)
  • Added option to change the teleportation duration in the VRExperienceHelper class (https://github.com/LeoRodz)
  • Added support to teleport the camera at constant speed in the VRExperienceHelper class (https://github.com/LeoRodz)
  • VRExperienceHelper has now an XR fallback to force XR usage (Beta) (RaananW)
  • Added option to change the teleportation easing function in the VRExperienceHelper class (https://github.com/LeoRodz)
  • Windows motion controller mapping corrected to XR (RaananW)
  • Pointer-Event simulation for screen target ray mode (RaananW)
  • New observable that triggers when a session was initialized (RaananW)
  • WebXR teleportation can now be disabled after initialized (RaananW)
  • New Features Manager for WebXR features (RaananW)
  • New features - Plane detection, Hit Test, Background remover (RaananW)

Ray

  • Added Ray.intersectsAxis to translate screen to axis coordinates without checking collisions (horusscope)

GUI

  • Added xmlLoader to load GUI layouts from XML (null0924)
  • Added disableMobilePrompt option to InputText for OculusQuest(and other android base VR devices) (shinyoshiaki)
  • Added Button.delegatePickingToChildren to let buttons delegate hit testing to embedded controls (Deltakosh)
  • Added Container.maxLayoutCycle and Container.logLayoutCycleErrors to get more control over layout cycles (Deltakosh)
  • Added StackPanel.ignoreLayoutWarnings to disable console warnings when controls with percentage size are added to a StackPanel (Deltakosh)
  • Added _getSVGAttribs functionality for loading multiple svg icons from an external svg file via icon id. Fixed bug for Chrome. Strip icon id from image url for firefox.(lockphase)
  • Scroll Viewer extended to include the use of images in the scroll bars(JohnK)

Particles

  • Added the feature expandable to the Solid Particle System (jerome)
  • Added the feature removeParticles() to the Solid Particle System (jerome)
  • Added the feature "storable particles" and insertParticlesFromArray() to the Solid Particle System (jerome)
  • Added the support for MultiMaterials to the Solid Particle System (jerome)

Navigation Mesh

Node Material

  • Added Light intensity output to LightInformationBlock (Drigax)

Serializers

  • Added support for AnimationGroup serialization (Drigax)
  • Expanded animation group serialization to include all targeted TransformNodes ([Drigax]https://github.com/drigax/)

Documentation

  • Added a note on shallow bounding of getBoundingInfo (tibotiber)
  • Added a typo fix to the ArcRotateCamera setPosition method description (schm-dt)

Bug fixes

  • Fixed Textblock line spacing evaluation when linespacing > 0 (Deltakosh)
  • Fixed Xbox One gamepad controller button schemes (MackeyK24)
  • Removing assetContainer from scene will also remove gui layers (TrevorDev)
  • A scene's input manager not adding key listeners when the canvas is already focused (Poolminer)
  • Runtime animation goToFrame when going back in time now correctly triggers future events when reached (zakhenry)
  • Fixed bug in Ray.intersectsTriangle where the barycentric coordinates bu and bv being returned is actually bv and bw. (bghgary)
  • Do not call onError when creating a texture when falling back to another loader (TrevorDev)
  • Context loss should not cause PBR materials to render black or instances to stop rendering (TrevorDev)
  • Only cast pointer ray input when pointer is locked in WebVR (TrevorDev)
  • Fix Right Hand coordinates with directional lights and shadows, hemispheric lights and spot lights (CedricGuillemet)
  • Avoid using default utility layer in gizmo manager to support multiple scenes (TrevorDev)
  • Fix bug when adding and removing observers in quick succession (sable)
  • Cannon and Ammo forceUpdate will no longer cause an unexpected exception (TrevorDev)
  • Loading the same multi-material twice and disposing one should not impact the other (TrevorDev)
  • GLTF exporter should no longer duplicate exported texture data (Drigax)
  • Avoid exception when disposing of Ammo cloth physics (TrevorDev)
  • Make planeDragGizmo usable on its own (TrevorDev)
  • Fix useObjectOrienationForDragging for pointerDragBehavior when using a single axis drag (TrevorDev)
  • Fix VR button not positioning correctly in canvas (haroldma)
  • Fix check for material needing alpha blending in OutlineRenderer (mkmc)
  • Fixed: scene's input manager's detachControl doesn't remove a wheel event listener (RamilKadyrov)
  • Fixed Solid Particle System particle's idx and idxInShape initialization (RamilKadyrov)
  • Added in ArcRotateCamera.storeState to save targetScreenOffset, in restoreState to restore it (RamilKadyrov)
  • Fixed CubeTexture to keep custom filesList when serializing/parsing (julien-moreau)
  • Fixed StandardRenderingPipeline to properly dispose post-processes from attached cameras (julien-moreau)
  • Fixed VolumetricLightScattering post-process to use a custom vertex shader instead of the depth vertex shader. (julien-moreau)
  • Fixed missing check in sceneTreeItemComponent resulting in gizmo to not end drag (CedricGuillemet)
  • Added missing callback triggers within texture loaders (PierreLeBlond)
  • Fixed TextureLinkLineComponent to no longer invert inspector-loaded textures (Drigax)
  • Fixed a single frame drop after leaving webxr on some devices (RaananW)
  • Fixed bug where vignette aspect ratio would be wrong when rendering direct to canvas
  • Fixed Path2 length computation (Poolminer)
  • Cloning of ShaderMaterial also clone shaderPath and options properties (Popov72)
  • Prevent an infinite loop when calling engine.dispose() in a scene with multiple SoundTracks defined (kirbysayshi)
  • Fixed missing properties in serialization / parsing of coneParticleEmitter (Popov72)
  • Fix a bug with exit VR and Edge (RaananW)
  • Fixed an issue with size of texture in multiview (RaananW)
  • Fixed Path3D (bi)normals computation for specific edge cases (Poolminer)
  • WebXR UI BUtton will only change to "In XR" after XR Session started (RaananW)
  • Fix bug when we call Mesh.render twice and the material is still not ready on the second call (barroij)
  • Fixed an issue with pose input in webxr (RaananW)
  • Fixed bug when parsing animation group without 'to' value (noalak)
  • isRightCamera and isLeftCamera were not set in WebXR (RaananW)
  • Sandbox will now load assets relatively path-ed to same folder(Kyle Belfort)
  • Playground will now render the returned scene from createScene() when there are multiple scenes added to engine(Kyle Belfort)
  • It was not possible to change the gaze and laser color in VR (#7323) (RaananW)

Breaking changes

  • Setting mesh.scaling to a new vector will no longer automatically call forceUpdate (this should be done manually when needed) (TrevorDev)
  • Tools.ExtractMinAndMaxIndexed and Tools.ExtractMinAndMax are now ambiant functions (available on BABYLON.extractMinAndMaxIndexed and BABYLON.extractMinAndMax) (Deltakosh)
  • Tools.QueueNewFrame was removed in favor of Engine.QueueNewFrame (Deltakosh)
  • Removed external data from Engine (addExternalData, getExternalData, getOrAddExternalDataWithFactory, removeExternalData) (Deltakosh)
  • The glTF loader extensions that map to glTF 2.0 extensions will now be disabled if the extension is not present in extensionsUsed. (bghgary)
  • The STL loader does not create light or camera automatically, please use scene.createDefaultCameraOrLight(); in your code Sebavan
  • The glTF2 exporter extension no longer ignores childless empty nodes.(drigax)