@plurid/plurid-engine 0.0.0-19 → 0.0.0-20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -269,15 +269,6 @@ declare function getTranslationMatrix(matrix3d: string): number[];
269
269
  * @returns Scalation value.
270
270
  */
271
271
  declare function getScalationValue(matrix3d: string): number;
272
- /**
273
- * Returns a a matrix3d CSS string.
274
- *
275
- * @param rotationMatrix
276
- * @param translationMatrix
277
- * @param scalationMatrix
278
- * @returns matrix3d CSS string.
279
- */
280
- declare function setTransform(rotationMatrix: number[], translationMatrix: number[], scalationMatrix: number[]): string;
281
272
  interface RotationValues {
282
273
  rotateX: number;
283
274
  rotateY: number;
@@ -305,9 +296,8 @@ declare const index$d_getTransformRotate: typeof getTransformRotate;
305
296
  declare const index$d_getTransformScale: typeof getTransformScale;
306
297
  declare const index$d_getTransformTranslate: typeof getTransformTranslate;
307
298
  declare const index$d_getTranslationMatrix: typeof getTranslationMatrix;
308
- declare const index$d_setTransform: typeof setTransform;
309
299
  declare namespace index$d {
310
- export { type index$d_RotationValues as RotationValues, type index$d_ScalationValue as ScalationValue, type index$d_TranslationValues as TranslationValues, index$d_getMatrixValues as getMatrixValues, index$d_getRotationMatrix as getRotationMatrix, index$d_getScalationValue as getScalationValue, index$d_getTransformRotate as getTransformRotate, index$d_getTransformScale as getTransformScale, index$d_getTransformTranslate as getTransformTranslate, index$d_getTranslationMatrix as getTranslationMatrix, index$d_setTransform as setTransform };
300
+ export { type index$d_RotationValues as RotationValues, type index$d_ScalationValue as ScalationValue, type index$d_TranslationValues as TranslationValues, index$d_getMatrixValues as getMatrixValues, index$d_getRotationMatrix as getRotationMatrix, index$d_getScalationValue as getScalationValue, index$d_getTransformRotate as getTransformRotate, index$d_getTransformScale as getTransformScale, index$d_getTransformTranslate as getTransformTranslate, index$d_getTranslationMatrix as getTranslationMatrix };
311
301
  }
312
302
 
313
303
  declare namespace index$c {
@@ -269,15 +269,6 @@ declare function getTranslationMatrix(matrix3d: string): number[];
269
269
  * @returns Scalation value.
270
270
  */
271
271
  declare function getScalationValue(matrix3d: string): number;
272
- /**
273
- * Returns a a matrix3d CSS string.
274
- *
275
- * @param rotationMatrix
276
- * @param translationMatrix
277
- * @param scalationMatrix
278
- * @returns matrix3d CSS string.
279
- */
280
- declare function setTransform(rotationMatrix: number[], translationMatrix: number[], scalationMatrix: number[]): string;
281
272
  interface RotationValues {
282
273
  rotateX: number;
283
274
  rotateY: number;
@@ -305,9 +296,8 @@ declare const index$d_getTransformRotate: typeof getTransformRotate;
305
296
  declare const index$d_getTransformScale: typeof getTransformScale;
306
297
  declare const index$d_getTransformTranslate: typeof getTransformTranslate;
307
298
  declare const index$d_getTranslationMatrix: typeof getTranslationMatrix;
308
- declare const index$d_setTransform: typeof setTransform;
309
299
  declare namespace index$d {
310
- export { type index$d_RotationValues as RotationValues, type index$d_ScalationValue as ScalationValue, type index$d_TranslationValues as TranslationValues, index$d_getMatrixValues as getMatrixValues, index$d_getRotationMatrix as getRotationMatrix, index$d_getScalationValue as getScalationValue, index$d_getTransformRotate as getTransformRotate, index$d_getTransformScale as getTransformScale, index$d_getTransformTranslate as getTransformTranslate, index$d_getTranslationMatrix as getTranslationMatrix, index$d_setTransform as setTransform };
300
+ export { type index$d_RotationValues as RotationValues, type index$d_ScalationValue as ScalationValue, type index$d_TranslationValues as TranslationValues, index$d_getMatrixValues as getMatrixValues, index$d_getRotationMatrix as getRotationMatrix, index$d_getScalationValue as getScalationValue, index$d_getTransformRotate as getTransformRotate, index$d_getTransformScale as getTransformScale, index$d_getTransformTranslate as getTransformTranslate, index$d_getTranslationMatrix as getTranslationMatrix };
311
301
  }
312
302
 
313
303
  declare namespace index$c {
@@ -93,6 +93,9 @@ var definePluridConfiguration = (flat = {}) => {
93
93
  if (flat.layout !== void 0) {
94
94
  space.layout = flat.layout;
95
95
  }
96
+ if (flat.spaceDimensions !== void 0) {
97
+ space.dimensions = flat.spaceDimensions;
98
+ }
96
99
  if (flat.perspective !== void 0) {
97
100
  space.perspective = flat.perspective;
98
101
  }
@@ -794,8 +797,7 @@ __export(matrix3d_exports, {
794
797
  getTransformRotate: () => getTransformRotate,
795
798
  getTransformScale: () => getTransformScale,
796
799
  getTransformTranslate: () => getTransformTranslate,
797
- getTranslationMatrix: () => getTranslationMatrix,
798
- setTransform: () => setTransform
800
+ getTranslationMatrix: () => getTranslationMatrix
799
801
  });
800
802
  function getMatrixValues(matrix3d) {
801
803
  const matrixValues = matrix3d.split("(")[1].split(")")[0].split(",");
@@ -835,9 +837,9 @@ function getScalationValue(matrix3d) {
835
837
  let temp = 0;
836
838
  let scale;
837
839
  if (valuesMatrix.length === 16) {
838
- const scaleMatrix4 = getMatrixValues(matrix3d).slice(0, 4);
840
+ const scaleMatrix3 = getMatrixValues(matrix3d).slice(0, 4);
839
841
  scale = 0;
840
- for (const el of scaleMatrix4) {
842
+ for (const el of scaleMatrix3) {
841
843
  scale += parseFloat(el) * parseFloat(el);
842
844
  }
843
845
  scale = parseFloat(Math.sqrt(scale).toPrecision(4));
@@ -847,14 +849,6 @@ function getScalationValue(matrix3d) {
847
849
  }
848
850
  return scale;
849
851
  }
850
- function setTransform(rotationMatrix, translationMatrix, scalationMatrix) {
851
- const transformMatrix = multiplyArrayOfMatrices([
852
- translationMatrix,
853
- rotationMatrix,
854
- scalationMatrix
855
- ]);
856
- return matrixArrayToCSSMatrix(transformMatrix);
857
- }
858
852
  function getTransformRotate(matrix3d) {
859
853
  const pi = Math.PI;
860
854
  const values = getRotationMatrix(matrix3d);