Open
Conversation
Member
|
Does it show in apidocs? |
Collaborator
Author
No, the JSDoc builder currently only pulls from C++ files. It could maybe be extended to read from The JSDoc in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A JS-native math library that should be easier to extend in the future and should have less marshalling overhead than the
Vec3andQuatAPIs when doing lots of vector math (though I haven't profiled it, and it won't be any faster or slower when reading/writing from native properties likeMyAvatarorEntities)Helper functions
lerpclampquantize- LikeNumber.toFixedbut without any stringificationwithinEpsilon- LikeVec3.withinEpsilon, generalised forNumberdurationMillis- Milliseconds (for offsetting with Date.now for example) from a human-readable objectvec3- Shorthand fornew Vector3quat- Shorthand fornew Quaternioneuler- Shorthand forQuaternion.fromPitchYawRollDegreescolor- Shorthand fornew Color8New types
Vector3- Fully compatible with the existingVec3API (thoughVec3s are plain objects and don't have theVector3prototype, so they won't have any methods likeadd,length, orlerpTounless you wrap them innew Vector3)Quaternion- Fully compatible with the existingQuatAPI (same deal asVec3, compatible but needs to be wrapped to get the new prototype)Color8- 0-255 RGBA color, includes HSV, HSL, oklab, and oklch helpers (though the old deprecatedOverlaysAPI is the only place we use color objects withalphaat the moment)ColorF- 0-1 RGBA color (PolyLine vertex colors are the only thing that uses these natively as far as I know)Demo scripts
(don't mind the scary names, I ended up accidentally finding some new bugs while writing these)
Quaternion.slerpTo