-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: VRMAnimation #1290
Merged
Merged
feature: VRMAnimation #1290
Conversation
This file contains 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
It has a type definition for `VRMC_vrm_animation`, the extension is still draft The spec: https://github.com/vrm-c/vrm-specification/tree/0861a66eb2f2b76835322d775678047d616536b3/specification/VRMC_vrm_animation-1.0
The VRMAnimation code already existed for projects like "ChatVRM" or "bvh2vrma" We updated several interfaces and doc comments for the OSS purpose It uses the type package `@pixiv/types-vrmc-vrm-animation-1.0` we've created in the previous commit There are two examples, `loader-plugin.html` and `dnd.html`; the former is slightly easier to understand while the latter is useful to check its behaviors
Top-level await is not supported natively in eslint v7 :( https://eslint.vuejs.org/user-guide/#using-eslint-v8-x also add missing `.editorconfig` and `.eslintrc`
@typescript-eslint/no-unused-vars doesn't consider doc comments
- test job should not call jest since there is no test - it's dependant of `@pixiv/three-vrm-core`
…n `three-vrm-animation` build add `@rollup/plugin-node-resolve` to rollup config of `three-vrm-animation`
ke456-png
reviewed
Oct 19, 2023
ke456-png
reviewed
Oct 19, 2023
…lly if the target is not named This emit a warning also See: #1290 (comment)
…VRMAnimationExpressionTracks, createVRMAnimationLookAtTrack - change the name of these functions to tolerate on the exposal of functions - Change return type of these functions to make end developers able to filter out unnecessary tracks See: #1290 (comment)
… preset and custom expressions See: #1290 (comment)
…es other than hips See: #1290 (comment)
…nslation` for consistency with VRMAnimation
0b5vr
commented
Oct 25, 2023
0b5vr
commented
Oct 25, 2023
0b5vr
commented
Oct 25, 2023
…not defined There is a case that humanoid does not exist in the animation file when the file only have expressions for example
…model space translation See: vrm-c/vrm-specification#456 transfer quaternion to VRMLookAt yaw-pitch using VRMLookAtQuaternionProxy (does it look good?)
ke456-png
reviewed
Nov 27, 2023
Comment on lines
+19
to
+31
// See: https://github.com/mrdoob/three.js/blob/r158/src/core/Object3D.js#L65 | ||
const prevRotationOnChangeCallback = this.rotation._onChangeCallback; | ||
this.rotation._onChange(() => { | ||
prevRotationOnChangeCallback(); | ||
this._applyToLookAt(); | ||
}); | ||
|
||
const prevQuaternionOnChangeCallback = this.quaternion._onChangeCallback; | ||
this.quaternion._onChange(() => { | ||
prevQuaternionOnChangeCallback(); | ||
this._applyToLookAt(); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
ke456-png
reviewed
Nov 27, 2023
ke456-png
reviewed
Nov 27, 2023
ke456-png
approved these changes
Nov 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NICE! 👍
will release the |
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.
Description
Add a new module
@pixiv/three-vrm-animation
which supports the VRMC_vrm_animation extension (which is still a draft).The VRMAnimation code already existed for projects like "ChatVRM" or "bvh2vrma", but we updated several interfaces and doc comments for the OSS purpose.
There are two examples in the three-vrm-animation package,
loader-plugin.html
anddnd.html
; the former is slightly easier to understand, while the latter is helpful in checking its behaviors.APIs
@pixiv/types-vrmc-vrm-animation-1.0
VRMC_vrm_animation
extension.VRMCVRMAnimation
represents the extension root ofVRMC_vrm_animation
.@pixiv/three-vrm-animation
VRMAnimationLoaderPlugin
, a plugin ofTHREE.GLTFLoader
, loads a.vrma
binary and createsVRMAnimation
s.VRMAnimation
can be converted toTHREE.AnimationClip
usingcreateVRMAnimationClip
. Since the animation clip depends on the target model's structure,VRM
must also be specified.Points need review
createVRMAnimationClip
from methods ofVRMAnimation
? I thought it would be safer to make it loose-coupled