Upgrading

This page lists the changes that affect your code, newest first, with the steps to adapt. For every change, see the CHANGELOG on GitHub.

Unreleased

0.8.1

TensorData.euler() now returns correct angles for axial tensors whose two lowest eigenvalues are equal, when you request passive angles. No code change is needed. If you stored Euler angles for such tensors, recompute them.

0.8.0: relative orientation replaces eulerTo

This release is breaking. TensorData.eulerTo() and TensorData.equivalentEulerTo() have been removed. Use relativeOrientationTo() instead, which returns a RelativeTensorOrientation.

The old method returned one Euler triple in radians:

const [alpha, beta, gamma] = tensorA.eulerTo(tensorB, 'zyz', true);

The new method returns an object that describes every valid solution:

const orientation = tensorA.relativeOrientationTo(tensorB, {sequence: 'zyz', active: true});
const [alpha, beta, gamma] = orientation.configurations[0].euler;

configurations is only filled for discrete orientations. Check orientation.orientationClass first. For 'continuous' or 'indeterminate' orientations, use freeRotation and the RelativeTensorOrientation reference in the API reference instead of a list of angles.

0.7.0

This release is not breaking, but two points may affect your code:

0.6.0: three.js 0.178

crystvis-js moved from three.js 0.137 to 0.178. Most users see only small changes in lighting and colour. If you add your own three.js objects, shaders, or textures to a viewer, change the following:

Materials can look slightly different after the change, so check your visualisations and retune lights if needed. Where possible, use the crystvis-js APIs rather than three.js objects directly.