feat: Enhance asset and human event handling with animation and loop capabilities
This commit is contained in:
@@ -15,6 +15,7 @@ interface BuilderState {
|
||||
|
||||
// Floor Asset
|
||||
selectedFloorAsset: Object3D | null;
|
||||
loopAnimation: boolean;
|
||||
|
||||
// Wall Settings
|
||||
selectedWall: Object3D | null;
|
||||
@@ -64,6 +65,7 @@ interface BuilderState {
|
||||
|
||||
// Setters - Floor Asset
|
||||
setSelectedFloorAsset: (asset: Object3D | null) => void;
|
||||
setLoopAnimation: (loop: boolean) => void;
|
||||
|
||||
// Setters - Wall
|
||||
setSelectedWall: (wall: Object3D | null) => void;
|
||||
@@ -118,6 +120,7 @@ export const useBuilderStore = create<BuilderState>()(
|
||||
deletableWallAsset: null,
|
||||
|
||||
selectedFloorAsset: null,
|
||||
loopAnimation: true,
|
||||
|
||||
selectedWall: null,
|
||||
wallThickness: 0.5,
|
||||
@@ -197,6 +200,12 @@ export const useBuilderStore = create<BuilderState>()(
|
||||
});
|
||||
},
|
||||
|
||||
setLoopAnimation(loopAnimation: boolean) {
|
||||
set((state) => {
|
||||
state.loopAnimation = loopAnimation;
|
||||
});
|
||||
},
|
||||
|
||||
// === Setters: Wall ===
|
||||
|
||||
setSelectedWall: (wall: Object3D | null) => {
|
||||
|
||||
Reference in New Issue
Block a user