修改预设,力场形状显示开关
This commit is contained in:
1 parent
5f3a4a33fe
commit
4f2c980bac
9 files changed
+581
-18
No files matched your search
@@ -80,6 +80,7 @@
|
||||
</select>
|
||||
</label>
|
||||
<div class="modifier-hint">正数吸向中心 · 负数向外排斥 · 可在画布内拖动力场圆</div>
|
||||
<label class="switch-row"><input type="checkbox" v-model="sys.config.showForceFieldShape" /><span class="switch-ui"></span><span>显示形状</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modifier-item">
|
||||
@@ -100,6 +101,7 @@
|
||||
</select>
|
||||
</label>
|
||||
<div class="modifier-hint">正数逆时针 · 负数顺时针</div>
|
||||
<label class="switch-row"><input type="checkbox" v-model="sys.config.showVortexShape" /><span class="switch-ui"></span><span>显示形状</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modifier-item">
|
||||
@@ -126,6 +128,7 @@
|
||||
</select>
|
||||
</label>
|
||||
<div class="modifier-hint">延迟后从当前位置开始吸附 · 到达红色范围即死亡 · 可在画布内拖动吸附圆</div>
|
||||
<label class="switch-row"><input type="checkbox" v-model="sys.config.showAttractionShape" /><span class="switch-ui"></span><span>显示形状</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modifier-item">
|
||||
|
||||
@@ -325,10 +325,10 @@ const MODULE_RESET_KEYS: Record<Exclude<ResetModule, 'export'>, string[]> = {
|
||||
'noise', 'noiseAmt', 'noiseRange', 'noiseSpeed',
|
||||
'useGravity', 'gravity', 'gravityMode', 'gravityMin', 'gravityMax', 'gravityDirection', 'gravityCurve',
|
||||
'wind', 'windX', 'windY', 'windMode', 'windMin', 'windMax', 'windDirection', 'windCurve',
|
||||
'forceField', 'forceStrength', 'forceRadius', 'forceCenterX', 'forceCenterY', 'forceFalloff',
|
||||
'vortex', 'vortexStrength', 'vortexRadius', 'vortexCenterX', 'vortexCenterY', 'vortexFalloff',
|
||||
'forceField', 'forceStrength', 'forceRadius', 'forceCenterX', 'forceCenterY', 'forceFalloff', 'showForceFieldShape',
|
||||
'vortex', 'vortexStrength', 'vortexRadius', 'vortexCenterX', 'vortexCenterY', 'vortexFalloff', 'showVortexShape',
|
||||
'attraction', 'attractionCenterX', 'attractionCenterY', 'attractionRadius',
|
||||
'attractionDuration', 'attractionDelay', 'attractionDelayMode', 'attractionPath',
|
||||
'attractionDuration', 'attractionDelay', 'attractionDelayMode', 'attractionPath', 'showAttractionShape',
|
||||
'trail', 'trailConfigVersion', 'trailResources', 'trailResourceVersion',
|
||||
'trailTexture', 'trailTextureName', 'trailPreviewUrl', 'trailColorMode', 'trailColor',
|
||||
'trailColorGradient', 'trailAlphaMode', 'trailAlpha', 'trailAlphaCurve',
|
||||
|
||||
@@ -116,7 +116,7 @@ export function drawForceField(store: EditorStore, forceFieldGfx: Graphics | nul
|
||||
const sys = store.systems.find((item) => item.id === store.activeId)
|
||||
if (sys?.visible === false) return
|
||||
const cfg = sys?.config
|
||||
if (!cfg?.forceField || cfg.forceRadius <= 0) return
|
||||
if (!cfg?.forceField || !cfg.showForceFieldShape || cfg.forceRadius <= 0) return
|
||||
const x = cfg.forceCenterX
|
||||
const y = -cfg.forceCenterY
|
||||
const color = cfg.forceStrength >= 0 ? 0x58c7ff : 0xff6b7a
|
||||
@@ -140,7 +140,7 @@ export function drawVortex(store: EditorStore, vortexGfx: Graphics | null) {
|
||||
const sys = store.systems.find((item) => item.id === store.activeId)
|
||||
if (sys?.visible === false) return
|
||||
const cfg = sys?.config
|
||||
if (!cfg?.vortex || cfg.vortexRadius <= 0) return
|
||||
if (!cfg?.vortex || !cfg.showVortexShape || cfg.vortexRadius <= 0) return
|
||||
const x = cfg.vortexCenterX
|
||||
const y = -cfg.vortexCenterY
|
||||
const color = cfg.vortexStrength >= 0 ? 0xb97cff : 0xffa24c
|
||||
@@ -168,7 +168,7 @@ export function drawAttraction(store: EditorStore, attractionGfx: Graphics | nul
|
||||
const sys = store.systems.find((item) => item.id === store.activeId)
|
||||
if (sys?.visible === false) return
|
||||
const cfg = sys?.config
|
||||
if (!cfg?.attraction) return
|
||||
if (!cfg?.attraction || !cfg.showAttractionShape) return
|
||||
const x = cfg.attractionCenterX
|
||||
const y = -cfg.attractionCenterY
|
||||
const radius = Math.max(0, cfg.attractionRadius)
|
||||
|
||||
Reference in new issue
Block a user