The scene view and the animation preview share one camera, the three form dialogs one base, and keys are found through one set of helpers (#85)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bf02c9e8b3
commit
2a390e52ff
22 files changed
+418
-452
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { isHandleEnabled } from '../../core/graph';
|
||||
import {
|
||||
type AnimationPlayer,
|
||||
animatableDefsOf,
|
||||
animatedKind,
|
||||
animatedKindOf,
|
||||
animationPlayheadAt,
|
||||
blendShare,
|
||||
blends,
|
||||
@@ -133,7 +133,7 @@ function drop(entity: Entity, player: AnimationPlayer): void {
|
||||
* property, is skipped.
|
||||
*/
|
||||
function bind(world: World, asset: AnimationAsset, owner: Entity): Binding[] {
|
||||
const root = world.project.assets.find((a) => a.id === asset.root);
|
||||
const root = findAsset(world.project, asset.root);
|
||||
if (!root) return [];
|
||||
const bindings: Binding[] = [];
|
||||
for (const track of asset.tracks) {
|
||||
@@ -178,7 +178,7 @@ function bind(world: World, asset: AnimationAsset, owner: Entity): Binding[] {
|
||||
*/
|
||||
function kindOn(world: World, entity: Entity, key: string): string | undefined {
|
||||
const asset = findAsset(world.project, entity.assetId);
|
||||
return asset && animatableDefsOf(world.project, asset, entity.props).find((d) => d.key === key)?.kind;
|
||||
return asset && animatedKindOf(world.project, asset, entity.props, key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user