悬浮导航
This commit is contained in:
1 parent
cffbd49eff
commit
a417c9119d
31 files changed
+1577
-1326
No files matched your search
@@ -10,6 +10,7 @@ const SYSTEM_SETTINGS_CACHE_KEY = 'SpineParticle.SystemSettings.v1'
|
||||
|
||||
export type SystemSettingsState = Pick<SettingsState,
|
||||
| 'parameterPanelOnRight'
|
||||
| 'floatingMenuEnabled'
|
||||
| 'undoLimit'
|
||||
| 'showEmitter'
|
||||
| 'showBones'
|
||||
@@ -40,6 +41,7 @@ function clamp(value: unknown, min: number, max: number, fallback: number) {
|
||||
export function captureSystemSettings(settings: SettingsState): SystemSettingsState {
|
||||
return {
|
||||
parameterPanelOnRight: settings.parameterPanelOnRight,
|
||||
floatingMenuEnabled: settings.floatingMenuEnabled,
|
||||
undoLimit: settings.undoLimit,
|
||||
showEmitter: settings.showEmitter,
|
||||
showBones: settings.showBones,
|
||||
@@ -65,6 +67,7 @@ function normalizedSystemSettings(value: Partial<SystemSettingsState>, current:
|
||||
: current.axisColor
|
||||
return {
|
||||
parameterPanelOnRight: booleanValue('parameterPanelOnRight'),
|
||||
floatingMenuEnabled: booleanValue('floatingMenuEnabled'),
|
||||
undoLimit: Math.round(clamp(value.undoLimit, 1, 200, current.undoLimit)),
|
||||
showEmitter: booleanValue('showEmitter'),
|
||||
showBones: booleanValue('showBones'),
|
||||
|
||||
Reference in new issue
Block a user