This morning I decided to upgrade to 4.1 from 4.0 and now I’m regretting that decision.
I’m seeing lots of errors. The first I’d like to deal with is being able to modify the values in the Matrix.m array. In 4.0 I could do that with no issues. Is there a recommended way to do that in 4.1?
Well this should never happen (I mean fighting to move to a new version)
The matrix code has changed to let us flag matrices as dirty. This helped a lot for performance as we do not have to scan a matrix anymore to see if it was updated
So we flagged the matrix.m as deepImutable. If you want to set a specific row you can also call setRow. Also it is still possible to call matrix._m and then call matrix._markAsUpdated();
I’m also seeing a lot of these TS2610 and TS2611 errors. (I’m using Typescript 4.0.2)
src/scripts/libs/BJS_4_1/babylon.d.ts:10729:9 - error TS2610: 'isCube' is defined as an accessor in class 'Texture', but is overridden here in 'ProceduralTexture' as an instance property.
10729 isCube: boolean;
~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:15073:13 - error TS2611: 'renderingGroupId' is defined as a property in class 'AbstractMesh', but is overridden here in 'InstancedMesh' as an accessor.
15073 get renderingGroupId(): number;
~~~~~~~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:20413:9 - error TS2610: 'isCube' is defined as an accessor in class 'Texture', but is overridden here in 'RenderTargetTexture' as an instance property.
20413 isCube: boolean;
~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:20460:9 - error TS2610: 'coordinatesMode' is defined as an accessor in class 'Texture', but is overridden here in 'RenderTargetTexture' as an instance property.
20460 coordinatesMode: number;
~~~~~~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:35131:13 - error TS2611: 'environmentTexture' is defined as a property in class 'AbstractScene', but is overridden here in 'Scene' as an accessor.
35131 get environmentTexture(): Nullable<BaseTexture>;
~~~~~~~~~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:38546:13 - error TS2611: 'upVector' is defined as a property in class 'TargetCamera', but is overridden here in 'ArcRotateCamera' as an accessor.
38546 set upVector(vec: Vector3);
~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:45901:13 - error TS2611: 'updateGizmoRotationToMatchAttachedMesh' is defined as a property in class 'Gizmo', but is overridden here in 'PositionGizmo' as an accessor.
45901 set updateGizmoRotationToMatchAttachedMesh(value: boolean);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:45911:13 - error TS2611: 'scaleRatio' is defined as a property in class 'Gizmo', but is overridden here in 'PositionGizmo' as an accessor.
45911 set scaleRatio(value: number);
~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:47107:13 - error TS2611: 'wrapU' is defined as a property in class 'RenderTargetTexture', but is overridden here in 'MultiRenderTarget' as an accessor.
47107 set wrapU(wrap: number);
~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:47112:13 - error TS2611: 'wrapV' is defined as a property in class 'RenderTargetTexture', but is overridden here in 'MultiRenderTarget' as an accessor.
47112 set wrapV(wrap: number);
~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:48352:13 - error TS2611: 'updateGizmoRotationToMatchAttachedMesh' is defined as a property in class 'Gizmo', but is overridden here in 'ScaleGizmo' as an accessor.
48352 set updateGizmoRotationToMatchAttachedMesh(value: boolean);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:48362:13 - error TS2611: 'scaleRatio' is defined as a property in class 'Gizmo', but is overridden here in 'ScaleGizmo' as an accessor.
48362 set scaleRatio(value: number);
~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:48632:13 - error TS2611: 'updateGizmoRotationToMatchAttachedMesh' is defined as a property in class 'Gizmo', but is overridden here in 'RotationGizmo' as an accessor.
48632 set updateGizmoRotationToMatchAttachedMesh(value: boolean);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:48642:13 - error TS2611: 'scaleRatio' is defined as a property in class 'Gizmo', but is overridden here in 'RotationGizmo' as an accessor.
48642 set scaleRatio(value: number);
~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:54632:9 - error TS2610: 'coordinatesMode' is defined as an accessor in class 'BaseTexture', but is overridden here in 'HDRCubeTexture' as an instance property.
54632 coordinatesMode: number;
~~~~~~~~~~~~~~~
src/scripts/libs/BJS_4_1/babylon.d.ts:55860:9 - error TS2610: 'coordinatesMode' is defined as an accessor in class 'BaseTexture', but is overridden here in 'EquiRectangularCubeTexture' as an instance property.
55860 coordinatesMode: number;
~~~~~~~~~~~~~~~