mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
Implement query.state_time
This commit is contained in:
parent
51632d9a6d
commit
79a7a74f6e
@ -319,7 +319,6 @@ const Animator = {
|
||||
let state_time = selected_state.getStateTime();
|
||||
let blend_progress = (last_state && last_state.blend_transition) ? Math.clamp(state_time / last_state.blend_transition, 0, 1) : 1;
|
||||
let blend_value = last_state?.calculateBlendValue(blend_progress) ?? blend_progress;
|
||||
console.log(blend_progress, blend_value)
|
||||
|
||||
// Active State
|
||||
Timeline.time = state_time;
|
||||
|
@ -30,6 +30,12 @@ Animator.MolangParser.global_variables = {
|
||||
}
|
||||
return 0
|
||||
},
|
||||
get 'query.state_time'() {
|
||||
if (AnimationController.selected?.selected_state) {
|
||||
AnimationController.selected.selected_state.getStateTime();
|
||||
}
|
||||
return Timeline.time
|
||||
},
|
||||
get 'query.any_animation_finished'() {
|
||||
if (AnimationController.selected?.selected_state) {
|
||||
let state = AnimationController.selected?.selected_state
|
||||
@ -774,6 +780,9 @@ function sortAutocompleteResults(results, incomplete) {
|
||||
.addQuery({
|
||||
id: 'life_time',
|
||||
})
|
||||
.addQuery({
|
||||
id: 'state_time',
|
||||
})
|
||||
.addQuery({
|
||||
id: 'yaw_speed',
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user