Angular 7.2.15 + three 0.105.2 not working after three.js upgrade

I have updated angular from V-7.2.5 to V-7.2.15 and three.js from V-0.101.2 to V-0.105.2 and I have got all sort of errors that I don’t know how to fix:

THREE.Box3 method .getSize() gives “error TS2554: Expected 1 arguments, but got 0.

.material.dispose() gives “error TS2339: Property ‘dispose’ does not exist on type ‘Material | Material[]’.

.material.color.set(0x00cc00); gives “error TS2339: Property ‘color’ does not exist on type ‘Material’.

.object.material gives “error TS2339: Property ‘material’ does not exist on type ‘Object3D’.

there are some fixes suggested for some of the errors that I don’t think are right, like typecasting some of the variable as any to force three to recognise methods. The result is that three js does not behave correctly.

Unfortunately the official documentation still describe the “old ways” for disposing material or does not explain how to initialise expected argument in order for the old code to work.

Did anybody managed to have the latest version of angular and three.js working together? Can you point me to a solution?

Thank you,


A material is disposed like so:


The type declaration in Material.d.ts looks like so:

dispose(): void;

Are you sure your IDE/Editor uses the latest TS files?