github BabylonJS/Babylon.js 4.1.0

latest releases: 7.34.0, 7.33.0, 7.32.5...
4 years ago

Major updates

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)
  • PNG support for browsers not supporting SVG (RaananW)
  • Device orientation event permissions for iOS 13+ (RaananW)
  • Added DirectionalLight.autoCalcShadowZBounds to automatically compute the shadowMinZ and shadowMaxZ values (Popov72)
  • Added CascadedShadowGenerator.autoCalcDepthBounds to improve the shadow quality rendering (Popov72)
  • Improved cascade blending in CSM shadow technique (Popov72)
  • Speed optimization when cascade blending is not used in CSM shadow technique (Popov72)
  • Added RenderTargetTexture.getCustomRenderList to overload the render list at rendering time (and possibly for each layer (2DArray) / face (Cube)) (Popov72)
  • Make sure all properties of CascadedShadowMap class are serialized/parsed (Popov72)
  • Added textures/opacity.png file to the Playground (Popov72)
  • Refactored the shadow generators code (Popov72)
  • Supports clip planes with shadows (sebavan)
  • Added Workbench color scheme for VSCode (drigax & Patrick Ryan)
  • Playground switch buttons are more intuitive (#7601) (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)
  • Added support for Cascaded Shadow Maps (Popov72)
  • Added context menu to add NodeMaterial (Deltakosh)
  • Added option to switch material per mesh (Deltakosh)

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)
  • Added preview area pop up for NME (Kyle Belfort)
  • Added comments to frames in NME (Kyle Belfort)
  • Make frames resizable in NME (Kyle Belfort)
  • Implement NME Preview Area Redesign (Kyle Belfort)

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)
  • Generator type used in TrailMesh constructor is now TransformNode instead of AbstrachMesh (Popov72)
  • Added the useVertexAlpha options to MeshBuilder.CreateDashedLines (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)
  • Update glTF validator to 2.0.0-dev.3.1. (bghgary)
  • Fix an issue with disposing materials and textures too aggressively in MSFT_lod loader extension. (bghgary)
  • Added experimental support for loading KTX2 files and KHR_texture_basisu glTF extension. (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)
  • Added a parameter to CreateScreenshotUsingRenderTarget to render sprites (Popov72)

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)
  • Add SpriteManager.disableDepthWrite property (Popov72)

WebXR / WebVR

  • WebXR webVR parity helpers (Vive, WMR, Oculus Rift) (TrevorDev)
  • 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 (xr-standard) (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 or before created (RaananW)
  • New Features Manager for WebXR features (RaananW)
  • New features - Plane detection, Hit test, Background remover (RaananW)
  • XR Camera's API is Babylon-conform (position, rotationQuaternion, world matrix, direction etc') (#7239) (RaananW)
  • XR Input now using standard profiles and completely separated from the gamepad class (#7348) (RaananW)
  • Teleportation and controller selection are now WebXR features. (#7290) (RaananW)
  • Teleportation allows selecting direction before teleporting when using thumbstick / touchpad. (#7290) (RaananW)
  • It is now possible to force a certain profile type for the controllers (#7348) (RaananW)
  • WebXR camera is initialized on the first frame, including copying transformation from native camera (except for in AR) (#7389) (RaananW)
  • Selection has gaze mode (which can be forced) and touch-screen support (#7395) (RaananW)
  • Laser pointers can be excluded from lighting influence so that they are always visible in WebXR / WebVR (#7323) (RaananW)
  • Full support for the online motion controller repository (#7323) (RaananW)
  • New XR feature - XR Controller physics impostor for motion controllers / XR Input sources (RaananW)
  • Teleportation between different ground levels in WebXR is enabled (RaananW)
  • Utility Meshes for XR (teleportation ring, selection rays) can now be rendered using a utility layer (#7563) (RaananW)
  • Teleportation supports snap-to (anchor) points (#7441) (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)
  • Added ScrollViewer.freezeControls property to speed up rendering (Popov72)
  • Added ImageScrollBar.num90RotationInVerticalMode property to let the user rotate the pictures when in vertical mode (Popov72)
  • Modified isPointerBlocker to block mouse wheel scroll events. ScrollViewer mouse scroll no longer dependent on scene. (lockphase)

Particles

  • Added particleSystem.isLocal for CPU particles to let the particles live in emitter local space. Doc (Deltakosh)
  • 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)
  • Added support for CustomParticleEmitter. Doc (Deltakosh)
  • Added support for MeshParticleEmitter. Doc (Deltakosh)

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)

Texture Packer

  • Added TexturePacker Class (Pryme8)
  • Added TexturePackerLoader Class (Pryme8)

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)
  • Fixed bug so Playground will now download .env texture files to ./textures in .zip (Kyle Belfort)
  • It was not possible to change the gaze and laser color in VR (#7323) (RaananW)
  • Fixed issue where textures exported using Safari web browser are Y mirrored. (#7352) (Drigax)
  • Fix a bug when resizing a MRT (Popov72)
  • Fixed an infinite clone recursion bug in InstancedMesh due to DeepCopier.DeepCopy cloning parent (Poolminer)
  • Fixed an issue with multiview textures (RaananW)
  • Screenshot height and width is now forced to be integers to prevent mismatch with openGL context (jekelija)
  • Fix shadow bound calculation in CSM shadow technique (Popov72)
  • Disposing of the depthReducer used in CSM (Popov72)
  • Fixed an issue with teleportation detach and attach (#7419) (RaananW)
  • Physics compound calculations were incorrect (#7407) (RaananW)
  • Fix bug NME bug where preview area crashes on pop up when NME is opened from playground (Kyle Belfort)
  • Fixed an issue with isSessionSupported return value being ignored (#7501) (RaananW)
  • Added isRigCamera to rig cameras so they can be detected. Used to fix a bug with utility layer and WebXR (#7517) (RaananW)
  • Fixed bug in the ScrollViewer GUI class when setting a idealWidth or idealHeight on the ADT (Popov72)
  • Fixed bug in the Image GUI class where some properties were lost after a rotation by n x 90° (Popov72)
  • Fixed bug in the Image GUI class when rotating a SVG picture (Popov72)
  • Fix for bug where NME would crash if frames did not have comments (Kyle Belfort)
  • Fix wrong import of _TimeToken (Sebavan
  • Fix shadows not rendered correctly when using point lights (Popov72)
  • Prevent depth buffer clear in shadow maps (Sebavan
  • Fix for bug where the light gizmo causes lights to flip orientation (#7603) (drigax)
  • Fix for bug where directional lights are inverted when using a right handed scene coordinate system. (drigax)
  • Fix subSurface parameters not copied in the PBR clone methods (Popov72)
  • Fix for bug where round-tripped glTF imported scenes are encapsulated in a second root node (#6349)(drigax & noalak)
  • Fix HDRCubeTexture construction, generateHarmonics was not properly taken into account (Popov72)
  • VideoTexture poster respects invertY (Sebavan
  • Fix for bug where round-tripped glTF imported scenes have incorrect light orientation, and duplicated parent nodes (#7377)(drigax)
  • Fix bug in PBR sheen where the sheen effect could be a little darker than expected when using direct lighting (Popov72
  • Fix bug in PBR shader when reflectionTexture.linearSpecularLOD is true (Popov72)
  • Fix for bug where resizing the bottom of a frame at times will not work for any frame in the graph (#7377)(Kyle Belfort)
  • Fix bug in PBR sheen when used with clear coat and no env texture provided (Popov72)
  • Fix for bug where Preview Area pop up does not change background color across windows (#7377)(Kyle Belfort)
  • Fix for bug where comments would break out of frames and break resizing of frames (Kyle Belfort)
  • Fix for bug where frames without comments would display undefined at the bottom right corner (Kyle Belfort)

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)
  • Default culling strategy changed to CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY (Deltakosh)
  • MaterialHelper.BindLight and MaterialHelper.BindLights do not need the usePhysicalLight anymore (Sebavan)
  • Mesh.bakeTransformIntoVertices now preserves child world-space transforms(drigax)
  • Removed setTexturesToUse and setCompressedTextureExclusions from Engine. (bghgary)

Don't miss a new Babylon.js release

NewReleases is sending notifications on new releases.