playcanvas / playcanvas/engine
Allow creating a curve from values only
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
This is a feature request to allow creating a curve only by supplying values. It is tedious creating an extra loop and calculating the normalized distance/time. It doesn't seem like one could create a curve without those, so why not let it be part of the curve itself? It would be nice, if pc.Curve would handle it on developer's behalf.
One option is to create an empty curve and have a method that would take an array of values, which calculates and populates the curve keys.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the pc.Curve implementation and its existing key-construction API. Read how curve keys currently store values and normalized distance/time, then define the values-only creation path described in the issue. Done means a curve can accept an array of values and populate its keys without caller-side looping or normalization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100