Version 9.12.0 Is Broken On Playground

Yo @sebavan or @Deltakosh

So it look like there is an issue with the new 9.12.0 on the playground:

Plus when i try to buuild my library with 9.12.0. But 9.11.0 and lower build just fine

i get tons of errors:


src/pro/CharacterController.ts:320:51 - error TS2339: Property 'physicsBody' does not exist on type 'TransformNode'.

320             const bodyShape: any = this.transform.physicsBody.shape;
                                                      ~~~~~~~~~~~

src/pro/CharacterController.ts:656:74 - error TS2345: Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
  Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.

656             const capsuleparentshape = new BABYLON.PhysicsShapeContainer(this.scene);
                                                                             ~~~~~~~~~~

src/pro/CharacterController.ts:661:57 - error TS2345: Argument of type 'BABYLON.TransformNode' is not assignable to parameter of type 'TransformNode'.
  Type 'TransformNode' is missing the following properties from type 'TransformNode': _physicsBody, physicsBody, getPhysicsBody, applyImpulse, and 3 more.

661             const capsulebody = new BABYLON.PhysicsBody(entity, BABYLON.PhysicsMotionType.DYNAMIC, false, this.scene);
                                                            ~~~~~~

src/pro/CharacterController.ts:696:17 - error TS2345: Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
  Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.

696                 this.scene                                          // scene of the shape
                    ~~~~~~~~~~

src/pro/ColoredBloomPlugin.ts:46:134 - error TS2345: Argument of type 'BABYLON.Camera' is not assignable to parameter of type 'Camera'.
  Type 'Camera' is missing the following properties from type 'Camera': _useMultiviewToSingleView, _multiviewTexture, _renderingMultiview, _resizeOrCreateMultiviewTexture

46             const prefilter = new BABYLON.PostProcess("coloredBloom_prefilter", prefilterFragment, ["threshold", "tint"], [], ratio, camera, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false);
                                                                                                                                        ~~~~~~

src/pro/ColoredBloomPlugin.ts:48:24 - error TS2339: Property 'setFloat' does not exist on type 'Effect'.

48                 effect.setFloat('threshold', threshold);
                          ~~~~~~~~

src/pro/ColoredBloomPlugin.ts:49:24 - error TS2339: Property 'setFloat3' does not exist on type 'Effect'.

49                 effect.setFloat3('tint', tint[0] || 1, tint[1] || 1, tint[2] || 1);
                          ~~~~~~~~~

src/pro/ColoredBloomPlugin.ts:55:177 - error TS2345: Argument of type 'BABYLON.AbstractEngine' is not assignable to parameter of type 'AbstractEngine'.
  Type 'AbstractEngine' is missing the following properties from type 'AbstractEngine': setTextureFromPostProcess, setTextureFromPostProcessOutput, createEffectForParticles, updateVideoTexture, and 144 more.

55                 const blurH = new BABYLON.BlurPostProcess("coloredBloom_blurH_" + i, new BABYLON.Vector2(1.0, 0.0), kernel, ratio, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false);
                                                                                                                                                                                   ~~~~~~~~~~~~~~~~~

src/pro/ColoredBloomPlugin.ts:56:177 - error TS2345: Argument of type 'BABYLON.AbstractEngine' is not assignable to parameter of type 'AbstractEngine'.
  Type 'AbstractEngine' is missing the following properties from type 'AbstractEngine': setTextureFromPostProcess, setTextureFromPostProcessOutput, createEffectForParticles, updateVideoTexture, and 144 more.

56                 const blurV = new BABYLON.BlurPostProcess("coloredBloom_blurV_" + i, new BABYLON.Vector2(0.0, 1.0), kernel, ratio, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false);
                                                                                                                                                                                   ~~~~~~~~~~~~~~~~~

src/pro/ColoredBloomPlugin.ts:84:149 - error TS2345: Argument of type 'BABYLON.Camera' is not assignable to parameter of type 'Camera'.
  Type 'Camera' is missing the following properties from type 'Camera': _useMultiviewToSingleView, _multiviewTexture, _renderingMultiview, _resizeOrCreateMultiviewTexture

84             const composite = new BABYLON.PostProcess("coloredBloom_composite", compositeFragment, ["weight", "saturation"], ["bloomSampler"], 1.0, camera, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false);
                                                                                                                                                       ~~~~~~

src/pro/ColoredBloomPlugin.ts:86:24 - error TS2339: Property 'setFloat' does not exist on type 'Effect'.

86                 effect.setFloat('weight', weight);
                          ~~~~~~~~

src/pro/ColoredBloomPlugin.ts:87:24 - error TS2339: Property 'setFloat' does not exist on type 'Effect'.

87                 effect.setFloat('saturation', saturation);
                          ~~~~~~~~

src/pro/ColorFilterPlugin.ts:24:101 - error TS2345: Argument of type 'BABYLON.Camera' is not assignable to parameter of type 'Camera'.
  Type 'Camera' is missing the following properties from type 'Camera': _useMultiviewToSingleView, _multiviewTexture, _renderingMultiview, _resizeOrCreateMultiviewTexture

24             const post = new BABYLON.PostProcess("colorFilter", fragment, ["filterColor"], [], 1.0, camera, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false);
                                                                                                       ~~~~~~

src/pro/ColorFilterPlugin.ts:26:24 - error TS2339: Property 'setFloat4' does not exist on type 'Effect'.

26                 effect.setFloat4('filterColor', color[0] || 1, color[1] || 1, color[2] || 1, color[3] != null ? color[3] : 1);
                          ~~~~~~~~~

src/pro/HavokVehicle.ts:694:57 - error TS2339: Property 'getWorldMatrix' does not exist on type 'TransformNode'.

694             const src = this._chassisBody.transformNode.getWorldMatrix();
                                                            ~~~~~~~~~~~~~~

src/pro/HavokVehicle.ts:1082:101 - error TS2339: Property 'getScene' does not exist on type 'TransformNode'.

1082             const scene = this._chassisBody.transformNode != null ? this._chassisBody.transformNode.getScene() : null;
                                                                                                         ~~~~~~~~

src/pro/HavokVehicle.ts:1329:101 - error TS2339: Property 'getScene' does not exist on type 'TransformNode'.

1329             const scene = this._chassisBody.transformNode != null ? this._chassisBody.transformNode.getScene() : null;
                                                                                                         ~~~~~~~~

src/pro/LensDistortionPlugin.ts:339:24 - error TS2339: Property 'setFloat' does not exist on type 'Effect'.

339                 effect.setFloat("distortionIntensity", pluginOptions.distortionIntensity);
                           ~~~~~~~~

src/pro/LensDistortionPlugin.ts:340:24 - error TS2339: Property 'setFloat' does not exist on type 'Effect'.

340                 effect.setFloat("distortionIntensityX", pluginOptions.distortionIntensityX);
                           ~~~~~~~~

src/pro/LensDistortionPlugin.ts:341:24 - error TS2339: Property 'setFloat' does not exist on type 'Effect'.

341                 effect.setFloat("distortionIntensityY", pluginOptions.distortionIntensityY);
                           ~~~~~~~~

src/pro/LensDistortionPlugin.ts:342:24 - error TS2339: Property 'setVector2' does not exist on type 'Effect'.

342                 effect.setVector2("distortionCenter", new BABYLON.Vector2(pluginOptions.distortionCenterX, pluginOptions.distortionCenterY));
                           ~~~~~~~~~~

src/pro/LensDistortionPlugin.ts:343:24 - error TS2339: Property 'setFloat' does not exist on type 'Effect'.

343                 effect.setFloat("distortionScale", pluginOptions.distortionScale);
                           ~~~~~~~~

src/pro/LUTBlendPlugin.ts:63:141 - error TS2345: Argument of type 'BABYLON.Camera' is not assignable to parameter of type 'Camera'.
  Type 'Camera' is missing the following properties from type 'Camera': _useMultiviewToSingleView, _multiviewTexture, _renderingMultiview, _resizeOrCreateMultiviewTexture

63             const post = new BABYLON.PostProcess("lutBlend", fragment, ["mixVal", "lutTileCountA", "lutTileCountB"], ["lutA", "lutB"], 1.0, camera, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false);
                                                                                                                                               ~~~~~~

src/pro/LUTBlendPlugin.ts:81:24 - error TS2339: Property 'setFloat' does not exist on type 'Effect'.

81                 effect.setFloat('mixVal', mix);
                          ~~~~~~~~


1045                 const tmp = sourceMesh.clone(`${sourceMesh.name}_DetailSourceNorm_L${layer.layerindex}`, parent, false, false) as BABYLON.Mesh | null;
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1156:107 - error TS2345: Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
  Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.

1156             const chunkRoot = new BABYLON.TransformNode(`${sourceMesh.name}_Chunks_L${layer.layerindex}`, scene);
                                                                                                               ~~~~~

src/pro/TerrainBuilder.ts:1157:13 - error TS2322: Type 'TransformNode' is not assignable to type 'Node'.
  The types returned by 'clone(...)' are incompatible between these types.
    Type 'TransformNode' is missing the following properties from type 'Node': _isDirty, _nodeDataStorage, name, id, and 83 more.

1157             chunkRoot.parent = parent;
                 ~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1195:30 - error TS2352: Conversion of type 'Mesh' to type 'BABYLON.Mesh' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type 'Mesh' is missing the following properties from type 'Mesh': _internalMeshDataInfo, useLODScreenCoverage, onMeshReadyObservable, computeBonesUsingShaders, and 460 more.

1195                 const host = normalizedSource.clone(name, chunkRoot) as BABYLON.Mesh | null;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1211:22 - error TS2339: Property 'thinInstanceEnablePicking' does not exist on type 'Mesh'.

1211                 host.thinInstanceEnablePicking = false;
                          ~~~~~~~~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1254:22 - error TS2339: Property 'thinInstanceSetBuffer' does not exist on type 'Mesh'.

1254                 host.thinInstanceSetBuffer("matrix", bufferMatrices, 16, true);
                          ~~~~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1256:26 - error TS2339: Property 'thinInstanceSetBuffer' does not exist on type 'Mesh'.

1256                     host.thinInstanceSetBuffer("color", bufferColors, 4, true);
                              ~~~~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1398:17 - error TS2740: Type 'Mesh' is missing the following properties from type 'Mesh': _internalMeshDataInfo, useLODScreenCoverage, onMeshReadyObservable, computeBonesUsingShaders, and 460 more.

1398                 grassPrototypeMesh = BABYLON.MeshBuilder.CreatePlane(
                     ~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1401:21 - error TS2345: Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
  Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.

1401                     scene
                         ~~~~~

src/pro/TerrainBuilder.ts:1408:13 - error TS2322: Type 'TransformNode' is not assignable to type 'Node'.
  The types returned by 'clone(...)' are incompatible between these types.
    Type 'TransformNode' is missing the following properties from type 'Node': _isDirty, _nodeDataStorage, name, id, and 83 more.

1408             grassPrototypeMesh.parent = parent;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1420:66 - error TS2345: Argument of type 'Scene' is not assignable to parameter of type 'AbstractEngine | Scene'.
  Type 'Scene' is missing the following properties from type 'AbstractEngine': setTextureFromPostProcess, setTextureFromPostProcessOutput, createEffectForParticles, updateVideoTexture, and 143 more.

1420                 const texture = new BABYLON.Texture(texturePath, scene);
                                                                      ~~~~~

src/pro/TerrainBuilder.ts:1429:21 - error TS2739: Type 'Texture' is missing the following properties from type 'BaseTexture': sphericalPolynomial, forceSphericalPolynomialsRecompute, _sphericalPolynomialTargetSize

1429                     material.diffuseTexture = texture;
                         ~~~~~~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1432:21 - error TS2739: Type 'Texture' is missing the following properties from type 'BaseTexture': sphericalPolynomial, forceSphericalPolynomialsRecompute, _sphericalPolynomialTargetSize

1432                     material.diffuseTexture = texture;
                         ~~~~~~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1477:13 - error TS2322: Type 'GrassStandardMaterial | GrassBillboardMaterial' is not assignable to type 'Material'.
  Type 'GrassStandardMaterial' has no properties in common with type 'Material'.

1477             grassPrototypeMesh.material = material;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/pro/TerrainBuilder.ts:1529:55 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(name: string, scene?: Scene, options?: MeshCreationOptions): Mesh', gave the following error.
    Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
      Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.
  Overload 2 of 2, '(name: string, scene?: Scene, parent?: Node, source?: Mesh, doNotCloneChildren?: boolean, clonePhysicsImpostor?: boolean): Mesh', gave the following error.
    Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
      Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.

1529             const customMesh = new BABYLON.Mesh(name, scene);
                                                           ~~~~~


src/pro/TerrainBuilder.ts:1537:36 - error TS2345: Argument of type 'BABYLON.Mesh' is not assignable to parameter of type 'Mesh'.
  Type 'Mesh' is missing the following properties from type 'Mesh': getEmittedParticleSystems, getHierarchyEmittedParticleSystems, thinInstanceEnablePicking, thinInstanceAllowAutomaticStaticBufferRecreation, and 21 more.

1537             vertexData.applyToMesh(customMesh);
                                        ~~~~~~~~~~

src/pro/TerrainBuilder.ts:1591:55 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(name: string, scene?: Scene, options?: MeshCreationOptions): Mesh', gave the following error.
    Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
      Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.
  Overload 2 of 2, '(name: string, scene?: Scene, parent?: Node, source?: Mesh, doNotCloneChildren?: boolean, clonePhysicsImpostor?: boolean): Mesh', gave the following error.
    Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
      Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.

1591             const customMesh = new BABYLON.Mesh(name, scene);
                                                           ~~~~~


src/pro/TerrainBuilder.ts:1597:36 - error TS2345: Argument of type 'BABYLON.Mesh' is not assignable to parameter of type 'Mesh'.
  Type 'Mesh' is missing the following properties from type 'Mesh': getEmittedParticleSystems, getHierarchyEmittedParticleSystems, thinInstanceEnablePicking, thinInstanceAllowAutomaticStaticBufferRecreation, and 21 more.

1597             vertexData.applyToMesh(customMesh);
                                        ~~~~~~~~~~

src/pro/WebVideoPlayer.ts:230:108 - error TS2345: Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
  Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.

230                     this.m_videoMaterial = new BABYLON.StandardMaterial(this.transform.name + ".VideoMat", this.scene);
                                                                                                               ~~~~~~~~~~

src/pro/WebVideoPlayer.ts:235:21 - error TS2559: Type 'StandardMaterial' has no properties in common with type 'Material'.

235                     this.m_abstractMesh.material = this.m_videoMaterial;
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/pro/WebVideoPlayer.ts:247:111 - error TS2345: Argument of type 'BABYLON.Scene' is not assignable to parameter of type 'Scene'.
  Type 'Scene' is missing the following properties from type 'Scene': _pointerOverSprite, _pickedDownSprite, _tempSpritePickingRay, onNewSpriteManagerAddedObservable, and 86 more.

247                     this.m_videoTexture = new BABYLON.VideoTexture(this.transform.name + ".VideoTex", source, this.scene, this.videoMipmaps, this.videoInvert, this.videoSample, { autoUpdateTexture: true, poster: this.videoPoster });
                                                                                                                  ~~~~~~~~~~

src/pro/WebVideoPlayer.ts:269:25 - error TS2739: Type 'VideoTexture' is missing the following properties from type 'BaseTexture': sphericalPolynomial, forceSphericalPolynomialsRecompute, _sphericalPolynomialTargetSize

269                         this.m_videoMaterial.diffuseTexture = this.m_videoTexture;
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 838 errors in 59 files.

cc @ryantrem / @georgie

Looking…

Thanks for the heads up @MackeyK24 — confirmed and fixed.

This was a regression in our .d.ts generation, not in the engine runtime. Our build tool strips ES re-export statements out of the global BABYLON namespace declaration, but it wasn’t handling the type-only variants (export type * from “…”) that our recent tree-shaking refactor introduced. A single leaked export … from inside the ambient namespace breaks declaration merging for augmented classes, so BABYLON.Scene, TransformNode, etc. ended up missing their augmented members (the sprite/physics/etc. properties) — which is why you saw both the Playground red squiggle and the physicsBody / Scene not assignable to Scene build errors.

Fix is up in Fix: strip type-only re-exports from generated namespace declarations by ryantrem · Pull Request #18575 · BabylonJS/Babylon.js · GitHub and will go out in the next nightly once merged. 9.11.0 is a safe pin in the meantime.

Thanks Guys :slight_smile: