diff --git a/app_manifest.json b/app_manifest.json index 3a4de5f..3f31e31 100644 --- a/app_manifest.json +++ b/app_manifest.json @@ -1,5 +1,5 @@ { - "version": "16.07.32", + "version": "16.07.50", "css": [ "css/base.css", "css/layout.css", @@ -28,7 +28,25 @@ "js/structures.js", "js/items.js", "js/item_type_initializers.js", + "js/item_lifecycle_support.js", + "js/item_lifecycle_legacy_system.js", "js/item_lifecycle_runtime.js", + "js/item_update_policy.js", + "js/item_dynamic_tool_system.js", + "js/item_dynamic_ball_system.js", + "js/item_dynamic_duplicator_system.js", + "js/item_dynamic_pin_system.js", + "js/item_dynamic_zunchi_system.js", + "js/item_dynamic_system.js", + "js/item_lifecycle_decay_system.js", + "js/item_lifecycle_growth_system.js", + "js/item_lifecycle_step_frame.js", + "js/item_lifecycle_step_decay.js", + "js/item_lifecycle_step_dynamic.js", + "js/item_lifecycle_step_growth.js", + "js/item_lifecycle_step_legacy.js", + "js/item_lifecycle_pipeline.js", + "js/item_runtime.js", "js/structure_lifecycle.js", "js/item_render_runtime.js", "js/ants.js", @@ -49,7 +67,26 @@ "js/tarinai_building_behavior.js", "js/tarinai_action_definitions.js", "js/tarinai_needs_items.js", + "js/tarinai_forced_action_planner_system.js", + "js/tarinai_action_planner_system.js", + "js/tarinai_need_planner_system.js", + "js/tarinai_item_interaction_context.js", + "js/tarinai_food_interaction_system.js", + "js/tarinai_contact_item_system.js", + "js/tarinai_item_interaction_system.js", + "js/tarinai_sunbath_system.js", + "js/tarinai_cursor_care_system.js", + "js/tarinai_local_environment_system.js", + "js/tarinai_update_legacy_system.js", "js/tarinai_social_move_life.js", + "js/tarinai_update_step_frame.js", + "js/tarinai_update_step_ai.js", + "js/tarinai_update_step_environment.js", + "js/tarinai_update_step_movement.js", + "js/tarinai_update_step_health.js", + "js/tarinai_update_step_legacy.js", + "js/tarinai_update_pipeline.js", + "js/tarinai_runtime.js", "js/tarinai_render.js", "js/world.js", "js/world_view.js", @@ -61,16 +98,29 @@ "js/world_ants_system.js", "js/weather_system.js", "js/item_update_scheduler.js", + "js/simulation_runtime_helpers.js", + "js/tarinai_update_policy.js", + "js/simulation_environment_system.js", + "js/simulation_item_ant_system.js", + "js/simulation_effects_system.js", + "js/simulation_creature_system.js", + "js/simulation_maintenance_system.js", + "js/simulation_ambient_system.js", + "js/simulation_systems.js", "js/world_update_phases.js", + "js/system_order.js", + "js/simulation.js", "js/world_update.js", "js/world_tool_actions.js", "js/world_placement_log.js", "js/world_event_effects.js", + "js/command_dispatcher.js", "js/text_catalog.js", "js/ui.js", "js/ui_log.js", "js/ui_helpers.js", "js/ui_selected.js", + "js/save_schema.js", "js/snapshot_system.js", "js/restore_coordinator.js", "js/save_codec.js", @@ -106,5 +156,5 @@ "assets/sounds/*.mp3", "assets/objects/*.png" ], - "notes": "Source of truth for static loading order; generated files are index.html script/link tags and service-worker.js cache list. Item definitions are centralized in js/item_registry.js. Save compatibility migration is intentionally not retained. Snapshot restore is data-only; save and freeze are split into coordinator/codec/storage/panel/adapter modules. EventBus owns phase audio and log UI/audio notification side effects. World.update is phase-driven through js/world_update_phases.js; UI field input is split into shared/touch/mouse modules. Item construction, lifecycle, rendering, Tarinai targeting, ActionSpec definitions, consumable behavior, social action ticks, and building behavior are split into dedicated modules. Lightweight cleanup: item type constructor initialization is isolated; action selection bonus logic is shared; diagnostics no longer use removed performance-quality fields. Ground definitions, structure lifecycle, delete-tool actions, shared tooltips, and ground UI helpers are split into dedicated modules. FPS work: profiler, static/dynamic spatial buckets, item update scheduler, visible-cell rendering, chunked terrain cache, adaptive DPR, and render quality LOD are included." + "notes": "Source of truth for static loading order; generated files are index.html script/link tags and service-worker.js cache list. Item definitions are centralized in js/item_registry.js. Save compatibility migration is intentionally not retained. Snapshot restore is data-only; save and freeze are split into coordinator/codec/storage/panel/adapter modules. EventBus owns phase audio and log UI/audio notification side effects. World.update is phase-driven through js/world_update_phases.js; UI field input is split into shared/touch/mouse modules. Item construction, lifecycle, rendering, Tarinai targeting, ActionSpec definitions, consumable behavior, social action ticks, and building behavior are split into dedicated modules. Lightweight cleanup: item type constructor initialization is isolated; action selection bonus logic is shared; diagnostics no longer use removed performance-quality fields. Ground definitions, structure lifecycle, delete-tool actions, shared tooltips, and ground UI helpers are split into dedicated modules. FPS work: profiler, static/dynamic spatial buckets, item update scheduler, visible-cell rendering, chunked terrain cache, adaptive DPR, and render quality LOD are included. Boundary cleanup v1: save schema constants are centralized in js/save_schema.js and World.update now routes through js/simulation.js before the phase runner. Boundary cleanup v2: basic UI tool and selection changes route through js/command_dispatcher.js. Boundary cleanup v3: UI pointer, focus, favorite, pause, speed, and tool-size changes route through command_dispatcher; simulation order is named in js/system_order.js. Boundary cleanup v4: concrete world update phase work is extracted into js/simulation_systems.js; world_update_phases.js is now a compatibility facade. Boundary cleanup v5: simulation_systems.js is reduced to a facade; runtime helpers, environment, item/ant, effects, creature, maintenance, and ambient spawn systems are split into dedicated files. Boundary cleanup v6: item and Tarinai update entrypoints now route through js/item_runtime.js and js/tarinai_runtime.js before the legacy lifecycle implementations. Boundary cleanup v7: item update cadence is centralized in js/item_update_policy.js; Tarinai update cadence is centralized in js/tarinai_update_policy.js; scheduler and simulation helpers now consume those policies. Boundary cleanup v8: Tarinai update now routes through js/tarinai_update_pipeline.js with frame, AI, environment, movement, health, and legacy fallback steps. Boundary cleanup v9: Item lifecycle now routes through js/item_lifecycle_pipeline.js with frame, decay, dynamic, growth, and legacy fallback steps. Boundary cleanup v10: dynamic item behavior dispatch is split into js/item_dynamic_system.js plus tool, ball, duplicator, pin, and zunchi submodules; item_lifecycle_step_dynamic.js now calls that boundary. Boundary cleanup v11: fan/magnet/rotator, ball physics, duplicator loading, pin attachment, and zunchi motion/lifecycle implementations now live in the dynamic subsystem files; Item.prototype keeps thin compatibility facades. Boundary cleanup v12: item lifecycle support helpers and legacy fallback moved out of item_lifecycle_runtime.js; decay and growth implementation moved into dedicated item_lifecycle_*_system modules while lifecycle steps remain thin pipeline adapters. Boundary cleanup v13: Tarinai item interaction is extracted into js/tarinai_item_interaction_system.js; AI update step now calls that system directly while Tarinai.prototype keeps a thin compatibility facade. Boundary cleanup v14: remaining Tarinai interaction/planning cleanup is consolidated; item interaction scan/context, food consumption, and contact effects are split into dedicated modules, and resolveNeeds now routes through explicit need/action/forced planner boundaries while keeping legacy behavior as a fallback system. Boundary cleanup v15: Tarinai item interaction orchestration preserves the legacy per-candidate order by trying food consumption and then contact effects for each candidate before advancing." } diff --git a/css/base.css b/css/base.css index 39f4e77..c40b8bc 100644 --- a/css/base.css +++ b/css/base.css @@ -580,3 +580,113 @@ h1 { background: #efffde; border-color: rgba(103,178,44,0.46); } + +.rotator-editor { + position: fixed; + inset: 0; + z-index: 43; + display: grid; + place-items: center; + padding: 18px; + background: rgba(34, 29, 22, 0.34); + backdrop-filter: blur(3px); +} +.rotator-editor.hidden { display: none; } +.rotator-editor-panel { + width: min(620px, calc(100vw - 28px)); + border-radius: 14px; + padding: 14px; + background: linear-gradient(180deg, rgba(255,253,247,0.98), rgba(245,237,221,0.97)); + border: 1px solid rgba(94, 70, 42, 0.20); + box-shadow: 0 22px 60px rgba(36, 28, 20, 0.28), inset 0 1px 0 rgba(255,255,255,0.72); +} +.rotator-editor-titlebar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + margin-bottom: 10px; + padding-bottom: 8px; + border-bottom: 1px solid rgba(94, 70, 42, 0.13); +} +.rotator-editor-titlebar h2 { margin: 0; font-size: 16px; letter-spacing: .03em; } +.rotator-editor-close { + width: 30px; + height: 30px; + border-radius: 999px; + border: 1px solid rgba(84,68,48,0.16); + background: rgba(255,255,255,0.72); + color: var(--ink); + font-size: 19px; + line-height: 1; + cursor: pointer; +} +.rotator-editor-close:hover { background: rgba(255,248,232,0.96); } +.rotator-editor-controls { + display: grid; + grid-template-columns: 1fr; + gap: 8px; + margin-bottom: 8px; +} +.rotator-editor-controls label { + display: grid; + grid-template-columns: auto 1fr 72px auto; + align-items: center; + gap: 8px; + font-size: 13px; + color: var(--ink); +} +.rotator-editor-controls input[type="number"] { + width: 72px; + box-sizing: border-box; + border-radius: 8px; + border: 1px solid rgba(84,68,48,0.18); + background: rgba(255,255,255,0.84); + padding: 4px 6px; +} +.rotator-editor-tools { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-bottom: 8px; +} +.rotator-editor-tools button { + border: 1px solid rgba(84,68,48,0.16); + background: rgba(255,255,255,0.74); + color: var(--ink); + border-radius: 999px; + padding: 5px 10px; + font-size: 12px; + cursor: pointer; +} +.rotator-editor-tools button.active { + background: rgba(137, 101, 198, 0.18); + border-color: rgba(112, 80, 170, 0.38); + font-weight: 700; +} +#rotatorCanvas { + width: 100%; + height: min(58vh, 360px); + display: block; + border-radius: 12px; + border: 1px solid rgba(84,68,48,0.20); + background: #f7f3ea; + touch-action: none; + cursor: crosshair; +} +.rotator-editor-hint { + margin: 7px 2px 0; + color: var(--muted); + font-size: 12px; +} +.rotator-editor-actions { + display: flex; + justify-content: flex-end; + gap: 8px; + margin-top: 12px; +} +@media (max-width: 560px) { + .rotator-editor-panel { padding: 10px; } + .rotator-editor-controls label { grid-template-columns: 1fr; align-items: stretch; } + #rotatorCanvas { height: 320px; } +} diff --git a/css/layout.css b/css/layout.css index dc36aa9..625d2de 100644 --- a/css/layout.css +++ b/css/layout.css @@ -4,6 +4,7 @@ .tool[data-tool="ant_nest"] { --tool-icon: url("../assets/ui/tool_ant_nest.webp"); } .tool[data-tool="ball"] { --tool-icon: url("../assets/ui/tool_ball.webp"); } .tool[data-tool="delete"] { --tool-icon: url("../assets/ui/tool_delete.webp"); } +.tool[data-tool="area_delete"] { --tool-icon: url("../assets/ui/tool_delete.webp"); } .tool[data-tool="new"] { --tool-icon: url("../assets/ui/tool_new.webp"); } .tool[data-tool="poke"] { --tool-emoji: "\1F448"; } @@ -24,7 +25,8 @@ .tool[data-tool="poke"].tool-emoji-icon::before, .tool[data-tool="water_hose"].tool-emoji-icon::before { font-size: 25px; } -.tool[data-tool="delete"] { --tool-icon-zoom: 1.42; } +.tool[data-tool="delete"], +.tool[data-tool="area_delete"] { --tool-icon-zoom: 1.42; } .tool[data-tool="ball"] { --tool-icon-zoom: 1.36; } .tool[data-tool="observe"], .tool[data-tool="new"] { --tool-icon-zoom: 1.20; } diff --git a/index.html b/index.html index 9edda5e..2d2469a 100644 --- a/index.html +++ b/index.html @@ -7,11 +7,11 @@ - - - - - + + + + +