Hello,
After updating from 2.18.0 to the version 2.20.2 of sdv.concat.js. I’m getting this error when using the applyTransformation func:
TypeError: Cannot read property 'isMatrix4' of undefined*
TypeError: Cannot read property 'isMatrix4' of undefined*
at t.applyPluginTransformation (SceneGeometryManager.js:714)*
at module$src$api$v2$implementation$ApiSceneImplementationV2_1.default.applyTransformation (ApiSceneImplementationV2.1.js:397)
The code unchanged :
const m = new THREE.Matrix4();
m.elements = this._api.scene.getTransformation(this._api.scene.TRANSFORMATIONTYPE.PLUGIN).data;
m.makeRotationX(dir * Math.PI / 180 * 90);
this._api.scene.applyTransformation(this._api.scene.TRANSFORMATIONTYPE.PLUGIN, '', m);
To quickly fix the error I must now provide m.elements (instead of m the matrix4 object instance directly) to the function applyTransformation
However the doc seems to be the same between the two version about the object Transformation passed to the func which could be either an Array<Number, either a THREE.Matrix4
Transformation
Transformation matrix - Array containing the 16 elements of a 4x4 matrix in row-major format, or a THREE.Matrix4.
Type:
- Array. | THREE.Matrix4
Thank you.