Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import { CardinalSpline } from './CardinalSpline'; // Catmull-Rom spline matrix is a Cardinal spline with scale equal to 1/2. Then // it can inherit from CubicSpline using the matrix below or inherit from // CardinalSpline using a fixed scale equal to 0.5. // // Transformation Matrix: // 0, 2, 0, 0, // -1, 0, 1, 0, // 2, -5, 4, -1, // -1, 3, -3, 1 class CatmullRomSpline extends CardinalSpline { constructor() { super({ scale: 0.5, fixedScale: true }); } } export { CatmullRomSpline as default, CatmullRomSpline }; |