CesiumGS / CesiumGS/cesium

Support numbers and quaternions in `HermiteSpline`

Open
#10,327 0 comments 0 reactions 0 assignees View on GitHub
category - math type - enhancement
Dominant language
JavaScript
Stars
15.8k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

#10314 required me to change `HermiteSpline` in order to have `CUBICSPLINE` interpolation for rotation and morph weights. The glTF is expected to supply the in- and out-tangents, so only the constructor and `evaluate` were changed. However, I didn't get to update the spline generation functions (e.g. `createNaturalCubic`). So it didn't feel right to include `Number` and `Quaternion` in the documentation.

Resolving this issue would require:
- [ ] updates to `TridiagonalSystemSolver` to accept `Quaternion` and `Number` values. Currently it expects an array of `Cartesian3` values. Haven't looked into it enough to confirm if `Quaternion` and `Number` works with the same math, but it _seems_ like it can.
- [ ] updates to `HermiteSpline`, including
- [ ] documentation
- [ ] `HermiteSpline.createC1`
- [ ] `HermiteSpline.createNaturalCubic`
- [ ] `HermiteSpline.createClampedCubic`
- [ ] additional unit tests in `HermiteSplineSpec`

Contributor guide

Open the contributing guide

Research direction

Start by reading TridiagonalSystemSolver and HermiteSpline, then inspect the existing HermiteSplineSpec tests. Determine whether the solver's current math can support Number and Quaternion values, and update the listed spline creation methods and documentation. Done means those types are supported consistently and additional unit tests cover them.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.