agentshire 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +437 -0
- package/README.zh-CN.md +441 -0
- package/ROADMAP.md +207 -0
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/VISION.md +101 -0
- package/index.ts +386 -0
- package/openclaw.plugin.json +27 -0
- package/package.json +100 -0
- package/src/bridge/AGENTS.md +136 -0
- package/src/bridge/ActivityStream.ts +184 -0
- package/src/bridge/CitizenManager.ts +280 -0
- package/src/bridge/DirectorBridge.ts +1076 -0
- package/src/bridge/EventTranslator.ts +142 -0
- package/src/bridge/NpcEventQueue.ts +61 -0
- package/src/bridge/ReconnectManager.ts +42 -0
- package/src/bridge/RouteManager.ts +270 -0
- package/src/bridge/StateTracker.ts +100 -0
- package/src/bridge/ToolVfxMapper.ts +94 -0
- package/src/bridge/__tests__/ActivityStream.test.ts +156 -0
- package/src/bridge/__tests__/CitizenManager.test.ts +174 -0
- package/src/bridge/__tests__/EventTranslator.test.ts +292 -0
- package/src/bridge/__tests__/NpcEventQueue.test.ts +92 -0
- package/src/bridge/__tests__/RouteManager.test.ts +106 -0
- package/src/bridge/data/route-config.json +36 -0
- package/src/bridge/data/route-config.ts +19 -0
- package/src/bridge/implicit-chat.ts +192 -0
- package/src/bridge/index.ts +12 -0
- package/src/contracts/agent-state.ts +87 -0
- package/src/contracts/agui.ts +212 -0
- package/src/contracts/chat.ts +67 -0
- package/src/contracts/events.ts +170 -0
- package/src/contracts/index.ts +71 -0
- package/src/contracts/media.ts +77 -0
- package/src/contracts/registry.ts +32 -0
- package/src/plugin/AGENTS.md +192 -0
- package/src/plugin/__tests__/editor-serve-megapack.test.ts +150 -0
- package/src/plugin/__tests__/hook-translator.test.ts +197 -0
- package/src/plugin/auto-config.ts +131 -0
- package/src/plugin/channel.ts +399 -0
- package/src/plugin/chat-asset-resolver.ts +75 -0
- package/src/plugin/chat-session-watcher.ts +98 -0
- package/src/plugin/citizen-agent-manager.ts +178 -0
- package/src/plugin/citizen-chat-router.ts +83 -0
- package/src/plugin/citizen-workshop-manager.ts +96 -0
- package/src/plugin/custom-asset-manager.ts +250 -0
- package/src/plugin/editor-serve.ts +1368 -0
- package/src/plugin/group-discussion.ts +223 -0
- package/src/plugin/hook-translator.ts +202 -0
- package/src/plugin/llm-agent-proxy.ts +193 -0
- package/src/plugin/outbound-adapter.ts +187 -0
- package/src/plugin/paths.ts +33 -0
- package/src/plugin/plan-manager.ts +594 -0
- package/src/plugin/runtime.ts +9 -0
- package/src/plugin/session-history.ts +838 -0
- package/src/plugin/session-log-watcher.ts +221 -0
- package/src/plugin/soul-prompt-template.ts +290 -0
- package/src/plugin/subagent-tracker.ts +205 -0
- package/src/plugin/tools.ts +493 -0
- package/src/plugin/town-session.ts +40 -0
- package/src/plugin/ws-server.ts +680 -0
- package/src/town-souls.ts +134 -0
- package/town-frontend/dist/assets/CustomAssetStore-oi8aIurt.js +2 -0
- package/town-frontend/dist/assets/GLTFLoader-BA5RqSME.js +3804 -0
- package/town-frontend/dist/assets/OrbitControls-ZmySp9sQ.js +2 -0
- package/town-frontend/dist/assets/SettingsPanel-BO52reJe.js +2 -0
- package/town-frontend/dist/assets/SkeletonUtils-BCVmgslc.js +2 -0
- package/town-frontend/dist/assets/SkillLearnCard-Dk38iDpy.js +6 -0
- package/town-frontend/dist/assets/TopicSetupPanel-DLaLHB_Z.js +2 -0
- package/town-frontend/dist/assets/Trap-Bold-CT0JBE39.woff2 +0 -0
- package/town-frontend/dist/assets/Trap-SemiBold-R4_-Ld0j.woff2 +0 -0
- package/town-frontend/dist/assets/WeatherSystem-Cb3BvHes.js +550 -0
- package/town-frontend/dist/assets/avatars/char-female-a.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-female-b.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-female-c.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-female-d.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-female-e.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-female-f.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-male-a.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-male-b.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-male-c.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-male-d.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-male-e.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-male-f.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-beaver.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-bee.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-bunny.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-cat.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-caterpillar.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-chick.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-cow.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-crab.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-deer.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-dog.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-elephant.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-fish.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-fox.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-giraffe.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-hog.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-koala.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-lion.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-monkey.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-panda.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-parrot.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-penguin.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-pig.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-polar.webp +0 -0
- package/town-frontend/dist/assets/avatars/char-pet-tiger.webp +0 -0
- package/town-frontend/dist/assets/character-catalog-DSmLtlNC.js +2 -0
- package/town-frontend/dist/assets/citizenEditor-DubGSJOQ.js +296 -0
- package/town-frontend/dist/assets/command-parser-BUd15Bmv.js +12 -0
- package/town-frontend/dist/assets/editor-B5QO0OtX.js +258 -0
- package/town-frontend/dist/assets/editor-Bk8g1NCD.css +1 -0
- package/town-frontend/dist/assets/index-BWfrufil.js +2 -0
- package/town-frontend/dist/assets/index-faS20RJk.js +6 -0
- package/town-frontend/dist/assets/logo-DJI6EtST.png +0 -0
- package/town-frontend/dist/assets/logo-title-AdKPZX5E.png +0 -0
- package/town-frontend/dist/assets/main-CqsN43aT.js +224 -0
- package/town-frontend/dist/assets/main-D7neuy3w.css +1 -0
- package/town-frontend/dist/assets/models/buildings/base.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/base.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/bench.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/bench.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/box_A.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/box_A.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/box_B.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/box_B.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_A.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_A.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_A_withoutBase.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_A_withoutBase.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_B.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_B.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_B_withoutBase.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_B_withoutBase.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_C.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_C.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_C_withoutBase.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_C_withoutBase.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_D.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_D.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_D_withoutBase.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_D_withoutBase.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_E.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_E.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_E_withoutBase.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_E_withoutBase.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_F.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_F.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_F_withoutBase.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_F_withoutBase.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_G.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_G.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_G_withoutBase.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_G_withoutBase.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_H.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_H.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/building_H_withoutBase.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/building_H_withoutBase.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/bush.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/bush.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/car_hatchback.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/car_hatchback.gltf +442 -0
- package/town-frontend/dist/assets/models/buildings/car_police.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/car_police.gltf +442 -0
- package/town-frontend/dist/assets/models/buildings/car_sedan.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/car_sedan.gltf +442 -0
- package/town-frontend/dist/assets/models/buildings/car_stationwagon.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/car_stationwagon.gltf +442 -0
- package/town-frontend/dist/assets/models/buildings/car_taxi.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/car_taxi.gltf +442 -0
- package/town-frontend/dist/assets/models/buildings/citybits_texture.png +0 -0
- package/town-frontend/dist/assets/models/buildings/dumpster.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/dumpster.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/firehydrant.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/firehydrant.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/road_corner.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/road_corner.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/road_corner_curved.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/road_corner_curved.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/road_junction.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/road_junction.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/road_straight.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/road_straight.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/road_straight_crossing.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/road_straight_crossing.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/road_tsplit.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/road_tsplit.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/streetlight.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/streetlight.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/trafficlight_A.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/trafficlight_A.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/trafficlight_B.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/trafficlight_B.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/trafficlight_C.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/trafficlight_C.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/trash_A.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/trash_A.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/trash_B.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/trash_B.gltf +136 -0
- package/town-frontend/dist/assets/models/buildings/watertower.bin +0 -0
- package/town-frontend/dist/assets/models/buildings/watertower.gltf +136 -0
- package/town-frontend/dist/assets/models/characters/Textures/colormap.png +0 -0
- package/town-frontend/dist/assets/models/characters/character-female-a.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-female-b.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-female-c.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-female-d.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-female-e.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-female-f.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-male-a.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-male-b.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-male-c.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-male-d.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-male-e.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-male-f.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-beaver.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-bee.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-bunny.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-cat.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-caterpillar.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-chick.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-cow.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-crab.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-deer.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-dog.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-elephant.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-fish.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-fox.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-giraffe.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-hog.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-koala.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-lion.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-monkey.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-panda.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-parrot.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-penguin.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-pig.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-polar.glb +0 -0
- package/town-frontend/dist/assets/models/characters/character-pet-tiger.glb +0 -0
- package/town-frontend/dist/assets/models/characters/colormap.png +0 -0
- package/town-frontend/dist/assets/models/furniture/armchair.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/armchair.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/armchair_pillows.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/armchair_pillows.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/bed_double_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/bed_double_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/bed_double_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/bed_double_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/bed_single_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/bed_single_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/bed_single_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/bed_single_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/book_set.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/book_set.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/book_single.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/book_single.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/cabinet_medium.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/cabinet_medium.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/cabinet_medium_decorated.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/cabinet_medium_decorated.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/cabinet_small.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/cabinet_small.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/cabinet_small_decorated.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/cabinet_small_decorated.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/cactus_medium_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/cactus_medium_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/cactus_medium_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/cactus_medium_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/cactus_small_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/cactus_small_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/cactus_small_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/cactus_small_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/chair_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/chair_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/chair_A_wood.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/chair_A_wood.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/chair_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/chair_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/chair_B_wood.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/chair_B_wood.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/chair_C.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/chair_C.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/chair_stool.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/chair_stool.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/chair_stool_wood.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/chair_stool_wood.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/couch.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/couch.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/couch_pillows.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/couch_pillows.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/furniturebits_texture.png +0 -0
- package/town-frontend/dist/assets/models/furniture/lamp_standing.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/lamp_standing.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/lamp_table.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/lamp_table.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_large_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_large_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_large_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_large_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_medium.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_medium.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_small_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_small_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_small_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_small_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_small_C.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_small_C.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_standing_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_standing_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_standing_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pictureframe_standing_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pillow_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pillow_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/pillow_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/pillow_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/rug_oval_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/rug_oval_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/rug_oval_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/rug_oval_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/rug_rectangle_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/rug_rectangle_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/rug_rectangle_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/rug_rectangle_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/rug_rectangle_stripes_A.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/rug_rectangle_stripes_A.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/rug_rectangle_stripes_B.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/rug_rectangle_stripes_B.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/shelf_A_big.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/shelf_A_big.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/shelf_A_small.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/shelf_A_small.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/shelf_B_large.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/shelf_B_large.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/shelf_B_large_decorated.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/shelf_B_large_decorated.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/shelf_B_small.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/shelf_B_small.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/shelf_B_small_decorated.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/shelf_B_small_decorated.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/table_low.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/table_low.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/table_medium.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/table_medium.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/table_medium_long.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/table_medium_long.gltf +136 -0
- package/town-frontend/dist/assets/models/furniture/table_small.bin +0 -0
- package/town-frontend/dist/assets/models/furniture/table_small.gltf +136 -0
- package/town-frontend/dist/assets/models/props/bench.bin +0 -0
- package/town-frontend/dist/assets/models/props/bench.gltf +136 -0
- package/town-frontend/dist/assets/models/props/bush.bin +0 -0
- package/town-frontend/dist/assets/models/props/bush.gltf +136 -0
- package/town-frontend/dist/assets/models/props/capybara.glb +0 -0
- package/town-frontend/dist/assets/models/props/car_hatchback.bin +0 -0
- package/town-frontend/dist/assets/models/props/car_hatchback.gltf +442 -0
- package/town-frontend/dist/assets/models/props/car_sedan.bin +0 -0
- package/town-frontend/dist/assets/models/props/car_sedan.gltf +442 -0
- package/town-frontend/dist/assets/models/props/car_taxi.bin +0 -0
- package/town-frontend/dist/assets/models/props/car_taxi.gltf +442 -0
- package/town-frontend/dist/assets/models/props/citybits_texture.png +0 -0
- package/town-frontend/dist/assets/models/props/dumpster.bin +0 -0
- package/town-frontend/dist/assets/models/props/dumpster.gltf +136 -0
- package/town-frontend/dist/assets/models/props/firehydrant.bin +0 -0
- package/town-frontend/dist/assets/models/props/firehydrant.gltf +136 -0
- package/town-frontend/dist/assets/models/props/streetlight.bin +0 -0
- package/town-frontend/dist/assets/models/props/streetlight.gltf +136 -0
- package/town-frontend/dist/assets/models/props/trafficlight_A.bin +0 -0
- package/town-frontend/dist/assets/models/props/trafficlight_A.gltf +136 -0
- package/town-frontend/dist/assets/models/props/trash_A.bin +0 -0
- package/town-frontend/dist/assets/models/props/trash_A.gltf +136 -0
- package/town-frontend/dist/assets/models/props/watertower.bin +0 -0
- package/town-frontend/dist/assets/models/props/watertower.gltf +136 -0
- package/town-frontend/dist/assets/models/stage-deco/Flowers_1_D.glb +0 -0
- package/town-frontend/dist/assets/models/stage-deco/Flowers_2_B.glb +0 -0
- package/town-frontend/dist/assets/models/stage-deco/Grass_A_1.glb +0 -0
- package/town-frontend/dist/assets/models/stage-deco/Park_GrassHill_A.glb +0 -0
- package/town-frontend/dist/assets/models/stage-deco/Pebles_1_A_2.glb +0 -0
- package/town-frontend/dist/assets/music/bgm_day.mp3 +0 -0
- package/town-frontend/dist/assets/music/bgm_dusk.mp3 +0 -0
- package/town-frontend/dist/assets/music/bgm_night.mp3 +0 -0
- package/town-frontend/dist/assets/music/bgm_work.mp3 +0 -0
- package/town-frontend/dist/assets/office-whiteboard-idle-CyEwBrq_.webp +0 -0
- package/town-frontend/dist/assets/preview-B6hYEQij.js +2 -0
- package/town-frontend/dist/assets/town-BKesnERP.js +8888 -0
- package/town-frontend/dist/assets/town-BnswKsjF.css +1 -0
- package/town-frontend/dist/citizen-editor.html +166 -0
- package/town-frontend/dist/editor.html +227 -0
- package/town-frontend/dist/index.html +22 -0
- package/town-frontend/dist/preview.html +56 -0
- package/town-frontend/dist/town.html +165 -0
- package/town-frontend/dist/viewer.html +91 -0
- package/town-souls/CHEN.md +130 -0
- package/town-souls/CHENGZI.md +92 -0
- package/town-souls/CITIZEN_tpl.md +16 -0
- package/town-souls/DIANDIAN.md +92 -0
- package/town-souls/HAITANG.md +94 -0
- package/town-souls/QIQI.md +119 -0
- package/town-souls/SOUL.md +141 -0
- package/town-souls/SOUL_tpl.md +135 -0
- package/town-souls/XIAOLIE.md +107 -0
- package/town-souls/YAN.md +107 -0
- package/town-workspace/IDENTITY.md +5 -0
- package/town-workspace/SOUL.md +141 -0
- package/town-workspace/project-workflow.md +81 -0
- package/town-workspace/town-defaults.json +92 -0
- package/town-workspace/town-guide.md +45 -0
|
Binary file
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"asset" : {
|
|
3
|
+
"generator" : "Khronos glTF Blender I/O v3.4.50",
|
|
4
|
+
"version" : "2.0"
|
|
5
|
+
},
|
|
6
|
+
"scene" : 0,
|
|
7
|
+
"scenes" : [
|
|
8
|
+
{
|
|
9
|
+
"name" : "Scene",
|
|
10
|
+
"nodes" : [
|
|
11
|
+
0
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"nodes" : [
|
|
16
|
+
{
|
|
17
|
+
"mesh" : 0,
|
|
18
|
+
"name" : "streetlight"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"materials" : [
|
|
22
|
+
{
|
|
23
|
+
"name" : "citybits_texture",
|
|
24
|
+
"pbrMetallicRoughness" : {
|
|
25
|
+
"baseColorTexture" : {
|
|
26
|
+
"index" : 0
|
|
27
|
+
},
|
|
28
|
+
"metallicFactor" : 0,
|
|
29
|
+
"roughnessFactor" : 0.4000000059604645
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meshes" : [
|
|
34
|
+
{
|
|
35
|
+
"name" : "Cylinder.162",
|
|
36
|
+
"primitives" : [
|
|
37
|
+
{
|
|
38
|
+
"attributes" : {
|
|
39
|
+
"POSITION" : 0,
|
|
40
|
+
"TEXCOORD_0" : 1,
|
|
41
|
+
"NORMAL" : 2
|
|
42
|
+
},
|
|
43
|
+
"indices" : 3,
|
|
44
|
+
"material" : 0
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"textures" : [
|
|
50
|
+
{
|
|
51
|
+
"sampler" : 0,
|
|
52
|
+
"source" : 0
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"images" : [
|
|
56
|
+
{
|
|
57
|
+
"mimeType" : "image/png",
|
|
58
|
+
"name" : "citybits_texture",
|
|
59
|
+
"uri" : "citybits_texture.png"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"accessors" : [
|
|
63
|
+
{
|
|
64
|
+
"bufferView" : 0,
|
|
65
|
+
"componentType" : 5126,
|
|
66
|
+
"count" : 190,
|
|
67
|
+
"max" : [
|
|
68
|
+
0.030096590518951416,
|
|
69
|
+
0.9599239826202393,
|
|
70
|
+
0.0345110222697258
|
|
71
|
+
],
|
|
72
|
+
"min" : [
|
|
73
|
+
-0.2392103672027588,
|
|
74
|
+
9.156763553619385e-06,
|
|
75
|
+
-0.034511469304561615
|
|
76
|
+
],
|
|
77
|
+
"type" : "VEC3"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"bufferView" : 1,
|
|
81
|
+
"componentType" : 5126,
|
|
82
|
+
"count" : 190,
|
|
83
|
+
"type" : "VEC2"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"bufferView" : 2,
|
|
87
|
+
"componentType" : 5126,
|
|
88
|
+
"count" : 190,
|
|
89
|
+
"type" : "VEC3"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"bufferView" : 3,
|
|
93
|
+
"componentType" : 5123,
|
|
94
|
+
"count" : 528,
|
|
95
|
+
"type" : "SCALAR"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"bufferViews" : [
|
|
99
|
+
{
|
|
100
|
+
"buffer" : 0,
|
|
101
|
+
"byteLength" : 2280,
|
|
102
|
+
"byteOffset" : 0,
|
|
103
|
+
"target" : 34962
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"buffer" : 0,
|
|
107
|
+
"byteLength" : 1520,
|
|
108
|
+
"byteOffset" : 2280,
|
|
109
|
+
"target" : 34962
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"buffer" : 0,
|
|
113
|
+
"byteLength" : 2280,
|
|
114
|
+
"byteOffset" : 3800,
|
|
115
|
+
"target" : 34962
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"buffer" : 0,
|
|
119
|
+
"byteLength" : 1056,
|
|
120
|
+
"byteOffset" : 6080,
|
|
121
|
+
"target" : 34963
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"samplers" : [
|
|
125
|
+
{
|
|
126
|
+
"magFilter" : 9729,
|
|
127
|
+
"minFilter" : 9987
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"buffers" : [
|
|
131
|
+
{
|
|
132
|
+
"byteLength" : 7136,
|
|
133
|
+
"uri" : "streetlight.bin"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"asset" : {
|
|
3
|
+
"generator" : "Khronos glTF Blender I/O v3.4.50",
|
|
4
|
+
"version" : "2.0"
|
|
5
|
+
},
|
|
6
|
+
"scene" : 0,
|
|
7
|
+
"scenes" : [
|
|
8
|
+
{
|
|
9
|
+
"name" : "Scene",
|
|
10
|
+
"nodes" : [
|
|
11
|
+
0
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"nodes" : [
|
|
16
|
+
{
|
|
17
|
+
"mesh" : 0,
|
|
18
|
+
"name" : "trafficlight_A"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"materials" : [
|
|
22
|
+
{
|
|
23
|
+
"name" : "citybits_texture",
|
|
24
|
+
"pbrMetallicRoughness" : {
|
|
25
|
+
"baseColorTexture" : {
|
|
26
|
+
"index" : 0
|
|
27
|
+
},
|
|
28
|
+
"metallicFactor" : 0,
|
|
29
|
+
"roughnessFactor" : 0.4000000059604645
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meshes" : [
|
|
34
|
+
{
|
|
35
|
+
"name" : "Cylinder.160",
|
|
36
|
+
"primitives" : [
|
|
37
|
+
{
|
|
38
|
+
"attributes" : {
|
|
39
|
+
"POSITION" : 0,
|
|
40
|
+
"TEXCOORD_0" : 1,
|
|
41
|
+
"NORMAL" : 2
|
|
42
|
+
},
|
|
43
|
+
"indices" : 3,
|
|
44
|
+
"material" : 0
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"textures" : [
|
|
50
|
+
{
|
|
51
|
+
"sampler" : 0,
|
|
52
|
+
"source" : 0
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"images" : [
|
|
56
|
+
{
|
|
57
|
+
"mimeType" : "image/png",
|
|
58
|
+
"name" : "citybits_texture",
|
|
59
|
+
"uri" : "citybits_texture.png"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"accessors" : [
|
|
63
|
+
{
|
|
64
|
+
"bufferView" : 0,
|
|
65
|
+
"componentType" : 5126,
|
|
66
|
+
"count" : 863,
|
|
67
|
+
"max" : [
|
|
68
|
+
0.0398561954498291,
|
|
69
|
+
0.7294950485229492,
|
|
70
|
+
0.11071021109819412
|
|
71
|
+
],
|
|
72
|
+
"min" : [
|
|
73
|
+
-0.13457560539245605,
|
|
74
|
+
9.156763553619385e-06,
|
|
75
|
+
-0.03985767439007759
|
|
76
|
+
],
|
|
77
|
+
"type" : "VEC3"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"bufferView" : 1,
|
|
81
|
+
"componentType" : 5126,
|
|
82
|
+
"count" : 863,
|
|
83
|
+
"type" : "VEC2"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"bufferView" : 2,
|
|
87
|
+
"componentType" : 5126,
|
|
88
|
+
"count" : 863,
|
|
89
|
+
"type" : "VEC3"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"bufferView" : 3,
|
|
93
|
+
"componentType" : 5123,
|
|
94
|
+
"count" : 1524,
|
|
95
|
+
"type" : "SCALAR"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"bufferViews" : [
|
|
99
|
+
{
|
|
100
|
+
"buffer" : 0,
|
|
101
|
+
"byteLength" : 10356,
|
|
102
|
+
"byteOffset" : 0,
|
|
103
|
+
"target" : 34962
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"buffer" : 0,
|
|
107
|
+
"byteLength" : 6904,
|
|
108
|
+
"byteOffset" : 10356,
|
|
109
|
+
"target" : 34962
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"buffer" : 0,
|
|
113
|
+
"byteLength" : 10356,
|
|
114
|
+
"byteOffset" : 17260,
|
|
115
|
+
"target" : 34962
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"buffer" : 0,
|
|
119
|
+
"byteLength" : 3048,
|
|
120
|
+
"byteOffset" : 27616,
|
|
121
|
+
"target" : 34963
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"samplers" : [
|
|
125
|
+
{
|
|
126
|
+
"magFilter" : 9729,
|
|
127
|
+
"minFilter" : 9987
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"buffers" : [
|
|
131
|
+
{
|
|
132
|
+
"byteLength" : 30664,
|
|
133
|
+
"uri" : "trafficlight_A.bin"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"asset" : {
|
|
3
|
+
"generator" : "Khronos glTF Blender I/O v3.4.50",
|
|
4
|
+
"version" : "2.0"
|
|
5
|
+
},
|
|
6
|
+
"scene" : 0,
|
|
7
|
+
"scenes" : [
|
|
8
|
+
{
|
|
9
|
+
"name" : "Scene",
|
|
10
|
+
"nodes" : [
|
|
11
|
+
0
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"nodes" : [
|
|
16
|
+
{
|
|
17
|
+
"mesh" : 0,
|
|
18
|
+
"name" : "trash_A"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"materials" : [
|
|
22
|
+
{
|
|
23
|
+
"name" : "citybits_texture",
|
|
24
|
+
"pbrMetallicRoughness" : {
|
|
25
|
+
"baseColorTexture" : {
|
|
26
|
+
"index" : 0
|
|
27
|
+
},
|
|
28
|
+
"metallicFactor" : 0,
|
|
29
|
+
"roughnessFactor" : 0.4000000059604645
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meshes" : [
|
|
34
|
+
{
|
|
35
|
+
"name" : "Icosphere.020",
|
|
36
|
+
"primitives" : [
|
|
37
|
+
{
|
|
38
|
+
"attributes" : {
|
|
39
|
+
"POSITION" : 0,
|
|
40
|
+
"TEXCOORD_0" : 1,
|
|
41
|
+
"NORMAL" : 2
|
|
42
|
+
},
|
|
43
|
+
"indices" : 3,
|
|
44
|
+
"material" : 0
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"textures" : [
|
|
50
|
+
{
|
|
51
|
+
"sampler" : 0,
|
|
52
|
+
"source" : 0
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"images" : [
|
|
56
|
+
{
|
|
57
|
+
"mimeType" : "image/png",
|
|
58
|
+
"name" : "citybits_texture",
|
|
59
|
+
"uri" : "citybits_texture.png"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"accessors" : [
|
|
63
|
+
{
|
|
64
|
+
"bufferView" : 0,
|
|
65
|
+
"componentType" : 5126,
|
|
66
|
+
"count" : 16,
|
|
67
|
+
"max" : [
|
|
68
|
+
0.06668513268232346,
|
|
69
|
+
0.052376944571733475,
|
|
70
|
+
0.0666484460234642
|
|
71
|
+
],
|
|
72
|
+
"min" : [
|
|
73
|
+
-0.060088641941547394,
|
|
74
|
+
0,
|
|
75
|
+
-0.0666484460234642
|
|
76
|
+
],
|
|
77
|
+
"type" : "VEC3"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"bufferView" : 1,
|
|
81
|
+
"componentType" : 5126,
|
|
82
|
+
"count" : 16,
|
|
83
|
+
"type" : "VEC2"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"bufferView" : 2,
|
|
87
|
+
"componentType" : 5126,
|
|
88
|
+
"count" : 16,
|
|
89
|
+
"type" : "VEC3"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"bufferView" : 3,
|
|
93
|
+
"componentType" : 5123,
|
|
94
|
+
"count" : 54,
|
|
95
|
+
"type" : "SCALAR"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"bufferViews" : [
|
|
99
|
+
{
|
|
100
|
+
"buffer" : 0,
|
|
101
|
+
"byteLength" : 192,
|
|
102
|
+
"byteOffset" : 0,
|
|
103
|
+
"target" : 34962
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"buffer" : 0,
|
|
107
|
+
"byteLength" : 128,
|
|
108
|
+
"byteOffset" : 192,
|
|
109
|
+
"target" : 34962
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"buffer" : 0,
|
|
113
|
+
"byteLength" : 192,
|
|
114
|
+
"byteOffset" : 320,
|
|
115
|
+
"target" : 34962
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"buffer" : 0,
|
|
119
|
+
"byteLength" : 108,
|
|
120
|
+
"byteOffset" : 512,
|
|
121
|
+
"target" : 34963
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"samplers" : [
|
|
125
|
+
{
|
|
126
|
+
"magFilter" : 9729,
|
|
127
|
+
"minFilter" : 9987
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"buffers" : [
|
|
131
|
+
{
|
|
132
|
+
"byteLength" : 620,
|
|
133
|
+
"uri" : "trash_A.bin"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"asset" : {
|
|
3
|
+
"generator" : "Khronos glTF Blender I/O v3.4.50",
|
|
4
|
+
"version" : "2.0"
|
|
5
|
+
},
|
|
6
|
+
"scene" : 0,
|
|
7
|
+
"scenes" : [
|
|
8
|
+
{
|
|
9
|
+
"name" : "Scene",
|
|
10
|
+
"nodes" : [
|
|
11
|
+
0
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"nodes" : [
|
|
16
|
+
{
|
|
17
|
+
"mesh" : 0,
|
|
18
|
+
"name" : "watertower"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"materials" : [
|
|
22
|
+
{
|
|
23
|
+
"name" : "citybits_texture",
|
|
24
|
+
"pbrMetallicRoughness" : {
|
|
25
|
+
"baseColorTexture" : {
|
|
26
|
+
"index" : 0
|
|
27
|
+
},
|
|
28
|
+
"metallicFactor" : 0,
|
|
29
|
+
"roughnessFactor" : 0.4000000059604645
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meshes" : [
|
|
34
|
+
{
|
|
35
|
+
"name" : "Cylinder.157",
|
|
36
|
+
"primitives" : [
|
|
37
|
+
{
|
|
38
|
+
"attributes" : {
|
|
39
|
+
"POSITION" : 0,
|
|
40
|
+
"TEXCOORD_0" : 1,
|
|
41
|
+
"NORMAL" : 2
|
|
42
|
+
},
|
|
43
|
+
"indices" : 3,
|
|
44
|
+
"material" : 0
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"textures" : [
|
|
50
|
+
{
|
|
51
|
+
"sampler" : 0,
|
|
52
|
+
"source" : 0
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"images" : [
|
|
56
|
+
{
|
|
57
|
+
"mimeType" : "image/png",
|
|
58
|
+
"name" : "citybits_texture",
|
|
59
|
+
"uri" : "citybits_texture.png"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"accessors" : [
|
|
63
|
+
{
|
|
64
|
+
"bufferView" : 0,
|
|
65
|
+
"componentType" : 5126,
|
|
66
|
+
"count" : 231,
|
|
67
|
+
"max" : [
|
|
68
|
+
0.24944306910037994,
|
|
69
|
+
0.6700000762939453,
|
|
70
|
+
0.24944306910037994
|
|
71
|
+
],
|
|
72
|
+
"min" : [
|
|
73
|
+
-0.24944308400154114,
|
|
74
|
+
-9.387731552124023e-07,
|
|
75
|
+
-0.24944308400154114
|
|
76
|
+
],
|
|
77
|
+
"type" : "VEC3"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"bufferView" : 1,
|
|
81
|
+
"componentType" : 5126,
|
|
82
|
+
"count" : 231,
|
|
83
|
+
"type" : "VEC2"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"bufferView" : 2,
|
|
87
|
+
"componentType" : 5126,
|
|
88
|
+
"count" : 231,
|
|
89
|
+
"type" : "VEC3"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"bufferView" : 3,
|
|
93
|
+
"componentType" : 5123,
|
|
94
|
+
"count" : 438,
|
|
95
|
+
"type" : "SCALAR"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"bufferViews" : [
|
|
99
|
+
{
|
|
100
|
+
"buffer" : 0,
|
|
101
|
+
"byteLength" : 2772,
|
|
102
|
+
"byteOffset" : 0,
|
|
103
|
+
"target" : 34962
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"buffer" : 0,
|
|
107
|
+
"byteLength" : 1848,
|
|
108
|
+
"byteOffset" : 2772,
|
|
109
|
+
"target" : 34962
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"buffer" : 0,
|
|
113
|
+
"byteLength" : 2772,
|
|
114
|
+
"byteOffset" : 4620,
|
|
115
|
+
"target" : 34962
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"buffer" : 0,
|
|
119
|
+
"byteLength" : 876,
|
|
120
|
+
"byteOffset" : 7392,
|
|
121
|
+
"target" : 34963
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"samplers" : [
|
|
125
|
+
{
|
|
126
|
+
"magFilter" : 9729,
|
|
127
|
+
"minFilter" : 9987
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"buffers" : [
|
|
131
|
+
{
|
|
132
|
+
"byteLength" : 8268,
|
|
133
|
+
"uri" : "watertower.bin"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var J=Object.defineProperty;var j=(n,t,e)=>t in n?J(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var h=(n,t,e)=>j(n,typeof t!="symbol"?t+"":t,e);import{g as W,i as Q,t as M}from"./index-BWfrufil.js";/* empty css */import{G as S,C as ee,F as te,A as se,D as ie,H as ne,d as F,c as ae,M as Z,f as O,V as G,R as oe,o as re,p as le,l as de,a as ce,W as he,S as pe,b as me,P as ue}from"./GLTFLoader-BA5RqSME.js";import{T as ge,E as fe,C as we}from"./CustomAssetStore-oi8aIurt.js";import{G as ye,T as ve,W as xe,N as K,C as be,V as Ee,A as Se,B as Ce,g as _,b as ke,P as Le,d as Me,E as Pe}from"./WeatherSystem-Cb3BvHes.js";import"./SkeletonUtils-BCVmgslc.js";import"./character-catalog-DSmLtlNC.js";class Ae{constructor(t,e){h(this,"assets");h(this,"scene");h(this,"lightingRefs",null);h(this,"groundGroup",new S);h(this,"modelGroup",new S);this.scene=t,this.assets=e}async build(t){return this.groundGroup.name="preview-ground",this.modelGroup.name="preview-models",this.scene.add(this.groundGroup),this.scene.add(this.modelGroup),this.buildSkyAndFog(t),this.lightingRefs=this.buildLighting(),this.buildTerrain(t),await this.buildModels(t),this.lightingRefs}buildSkyAndFog(t){this.scene.background=new ee(8900331);const e=Math.max(t.grid.cols,t.grid.rows);this.scene.fog=new te(8900331,e*.8,e*2)}buildLighting(){const t=new se(14213360,.55);this.scene.add(t);const e=new ie(16774624,1);e.position.set(20,30,-10),e.castShadow=!0,e.shadow.mapSize.set(2048,2048),e.shadow.camera.left=-40,e.shadow.camera.right=40,e.shadow.camera.top=40,e.shadow.camera.bottom=-40,e.shadow.camera.near=.5,e.shadow.camera.far=80,this.scene.add(e);const i=new ne(8900331,4876336,.35);return this.scene.add(i),{ambient:t,directional:e,hemisphere:i,streetLightPoints:[],windowLights:[]}}buildTerrain(t){var s;const{cols:e,rows:i}=t.grid;for(let c=0;c<i;c++)for(let r=0;r<e;r++){const m=(s=t.terrain[c])==null?void 0:s[r],u=(m==null?void 0:m.type)??"grass",l=ge[u]??8308816,f=new F(1,1),w=new ae({color:l}),d=new Z(f,w);d.rotation.x=-Math.PI/2,d.position.set(r+.5,0,c+.5),d.receiveShadow=!0,this.groundGroup.add(d)}}async buildModels(t){const e=[...t.buildings.map(i=>({data:i,kind:"building"})),...t.props.filter(i=>!i.animated).map(i=>({data:i,kind:"prop"})),...t.roads.map(i=>({data:i,kind:"road"}))];for(const i of e){const s=i.data,c=s.modelUrl;if(!c)continue;const r=await this.assets.loadModel(c);if(!r)continue;r.position.set(s.gridX,s.elevation??0,s.gridZ);const m=s.scale??1,u=s.flipX?-1:1,l=s.flipZ?-1:1;r.scale.set(m*u,m,m*l);const f=(s.rotationY??0)*Math.PI/180,w=(s.fixRotationX??0)*Math.PI/180,d=(s.fixRotationY??0)*Math.PI/180,p=(s.fixRotationZ??0)*Math.PI/180;r.rotation.set(w,f+d,p),r.traverse(g=>{g.isMesh&&(g.castShadow=!0,g.receiveShadow=!0)}),this.modelGroup.add(r);const y=s.lights;if(y&&this.lightingRefs)for(const g of y){const o=new O(g.color,0,g.distance,2);o.position.set(g.offsetX,g.offsetY,g.offsetZ),r.add(o),g.type==="window"||g.type==="vehicle_tail"?this.lightingRefs.windowLights.push(o):this.lightingRefs.streetLightPoints.push(o)}}}dispose(){this.groundGroup.traverse(t=>{if(t.isMesh){const e=t;e.geometry.dispose(),Array.isArray(e.material)?e.material.forEach(i=>i.dispose()):e.material.dispose()}}),this.modelGroup.traverse(t=>{if(t.isMesh){const e=t;e.geometry.dispose(),Array.isArray(e.material)?e.material.forEach(i=>i.dispose()):e.material.dispose()}}),this.scene.remove(this.groundGroup),this.scene.remove(this.modelGroup)}}class Re{constructor(t){h(this,"target",null);h(this,"keys",{w:!1,a:!1,s:!1,d:!1});h(this,"moveDir",new G);h(this,"_isWalking",!1);h(this,"speed",3);h(this,"container");h(this,"raycaster",new oe);h(this,"mouse",new re);h(this,"camera",null);h(this,"groundPlane",new le(new G(0,1,0),0));h(this,"clickMoving",!1);this.container=t,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.onClick=this.onClick.bind(this)}get isWalking(){return this._isWalking}setTarget(t){this.target=t}setCamera(t){this.camera=t}start(){window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),this.container.addEventListener("click",this.onClick)}stop(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),this.container.removeEventListener("click",this.onClick),this.keys={w:!1,a:!1,s:!1,d:!1}}onKeyDown(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement)return;const e=t.key.toLowerCase();(e==="w"||e==="arrowup")&&(this.keys.w=!0),(e==="a"||e==="arrowleft")&&(this.keys.a=!0),(e==="s"||e==="arrowdown")&&(this.keys.s=!0),(e==="d"||e==="arrowright")&&(this.keys.d=!0),(e in this.keys||["arrowup","arrowdown","arrowleft","arrowright"].includes(e))&&(this.clickMoving=!1)}onKeyUp(t){const e=t.key.toLowerCase();(e==="w"||e==="arrowup")&&(this.keys.w=!1),(e==="a"||e==="arrowleft")&&(this.keys.a=!1),(e==="s"||e==="arrowdown")&&(this.keys.s=!1),(e==="d"||e==="arrowright")&&(this.keys.d=!1)}onClick(t){if(!this.camera||!this.target)return;const e=this.container.getBoundingClientRect();this.mouse.x=(t.clientX-e.left)/e.width*2-1,this.mouse.y=-((t.clientY-e.top)/e.height)*2+1,this.raycaster.setFromCamera(this.mouse,this.camera);const i=new G;this.raycaster.ray.intersectPlane(this.groundPlane,i)&&(this.clickMoving=!0,this.target.moveTo({x:i.x,z:i.z},this.speed))}update(t){if(!this.target)return;this.moveDir.set(0,0,0),this.keys.w&&(this.moveDir.z-=1),this.keys.s&&(this.moveDir.z+=1),this.keys.a&&(this.moveDir.x-=1),this.keys.d&&(this.moveDir.x+=1);const e=this.moveDir.lengthSq()>0;if(e){this.moveDir.normalize();const s=this.target.mesh.position;if(s.x+=this.moveDir.x*this.speed*t,s.z+=this.moveDir.z*this.speed*t,this.moveDir.lengthSq()>0){const c=Math.atan2(this.moveDir.x,this.moveDir.z);this.target.mesh.rotation.y=c}}const i=this._isWalking;this._isWalking=e,this._isWalking&&!i?this.target.playAnim("walk"):!this._isWalking&&i&&!this.clickMoving&&this.target.playAnim("idle")}destroy(){this.stop(),this.target=null,this.camera=null}}class Ie{constructor(t,e){h(this,"scene");h(this,"group",new S);h(this,"vehicles",[]);h(this,"assets");this.scene=t,this.assets=e,this.group.name="preview-vehicles",this.scene.add(this.group)}async buildFromConfig(t){const e=t.props.filter(i=>i.animated&&i.vehicleRoute&&i.vehicleRoute.waypoints.length>=2);for(const i of e){const s=i.modelUrl;if(!s)continue;const c=await this.assets.loadModel(s);if(!c)continue;const r=(i.fixRotationX??0)*Math.PI/180,m=(i.fixRotationY??0)*Math.PI/180,u=(i.fixRotationZ??0)*Math.PI/180,l=new S;if(r||m||u){const o=new S;for(o.rotation.set(r,m,u);c.children.length>0;)o.add(c.children[0]);l.add(o)}else for(;c.children.length>0;)l.add(c.children[0]);const f=i.scale??1;l.scale.setScalar(f),l.traverse(o=>{o.isMesh&&(o.castShadow=!0,o.receiveShadow=!0)}),this.group.add(l);let w=null,d=null;if(i.lights){for(const o of i.lights)if(o.type==="vehicle_head")w=new O(o.color,0,o.distance),w.position.set(o.offsetX,o.offsetY,o.offsetZ),l.add(w);else if(o.type==="vehicle_tail"){const C=new F(.3,.15);d=new de({color:o.color,transparent:!0,opacity:0});const v=new Z(C,d);v.position.set(o.offsetX,o.offsetY,o.offsetZ),v.rotation.y=Math.PI,l.add(v)}}const p=i.vehicleRoute,y=p.speedMin+Math.random()*(p.speedMax-p.speedMin),g=p.waypoints.map(o=>({x:o.x+(Math.random()-.5)*p.laneOffset*2,z:o.z+(Math.random()-.5)*p.laneOffset*2}));l.position.set(g[0].x,.06,g[0].z),this.vehicles.push({model:l,waypoints:g,speed:y,progress:0,segmentIndex:0,forward:!0,loop:!!p.loop,forwardAngle:p.forwardAngle??0,headlight:w,taillightMat:d})}}update(t,e){const i=t<6||t>17.5;for(const s of this.vehicles){if(s.waypoints.length<2)continue;const c=s.waypoints[s.segmentIndex],r=s.loop?(s.segmentIndex+1)%s.waypoints.length:s.forward?s.segmentIndex+1:s.segmentIndex-1;if(!s.loop&&(r<0||r>=s.waypoints.length)){s.forward=!s.forward;continue}const m=s.waypoints[r],u=m.x-c.x,l=m.z-c.z,f=Math.sqrt(u*u+l*l);if(f<.01){s.segmentIndex=r;continue}s.progress+=s.speed*e/f,s.progress>=1&&(s.progress=0,s.segmentIndex=r,s.loop||(s.forward&&s.segmentIndex>=s.waypoints.length-1||!s.forward&&s.segmentIndex<=0)&&(s.forward=!s.forward));const w=c.x+u*s.progress,d=c.z+l*s.progress;s.model.position.x=w,s.model.position.z=d,s.model.position.y=.06+Math.sin(performance.now()/1e3*12)*.015,s.model.rotation.y=Math.atan2(u,l)-s.forwardAngle,s.headlight&&(s.headlight.intensity=i?1.5:0),s.taillightMat&&(s.taillightMat.opacity=i?.9:0)}}dispose(){for(const t of this.vehicles)t.model.traverse(e=>{if(e.isMesh){e.geometry.dispose();const i=e.material;Array.isArray(i)?i.forEach(s=>s.dispose()):i.dispose()}});this.vehicles=[],this.scene.remove(this.group)}}const De=[{type:"clear",label:"☀️ 晴",labelEn:"☀️ Clear"},{type:"cloudy",label:"⛅ 阴",labelEn:"⛅ Cloudy"},{type:"rain",label:"🌧️ 雨",labelEn:"🌧️ Rain"},{type:"snow",label:"❄️ 雪",labelEn:"❄️ Snow"},{type:"fog",label:"🌫️ 雾",labelEn:"🌫️ Fog"},{type:"storm",label:"⛈️ 暴风",labelEn:"⛈️ Storm"}];class Te{constructor(t,e){h(this,"el");h(this,"timeLabel");h(this,"timeSlider");h(this,"weatherBtns",[]);h(this,"speedBtns",[]);h(this,"callbacks");h(this,"currentWeather","clear");h(this,"currentSpeed",1);this.callbacks=e,this.el=document.createElement("div"),this.el.className="preview-hud";const i=document.createElement("div");i.className="preview-hud-top";const s=document.createElement("button");s.className="preview-exit-btn",s.innerHTML=`${W()==="en"?"← Exit Preview":"← 退出预览"} <span style="opacity:0.5;font-size:11px">(ESC)</span>`,s.addEventListener("click",e.onExit),i.appendChild(s),this.timeLabel=document.createElement("span"),this.timeLabel.className="preview-time-label",this.timeLabel.textContent="10:00",i.appendChild(this.timeLabel),this.el.appendChild(i);const c=document.createElement("div");c.className="preview-hud-bottom";const r=document.createElement("div");r.className="preview-hud-group";const m=document.createElement("span");m.textContent="☀️",r.appendChild(m),this.timeSlider=document.createElement("input"),this.timeSlider.type="range",this.timeSlider.min="0",this.timeSlider.max="24",this.timeSlider.step="0.1",this.timeSlider.value="10",this.timeSlider.className="preview-time-slider",this.timeSlider.addEventListener("input",()=>{const d=parseFloat(this.timeSlider.value);e.onTimeChange(d),this.updateTimeLabel(d)}),r.appendChild(this.timeSlider);const u=document.createElement("span");u.textContent="🌙",r.appendChild(u),c.appendChild(r);const l=document.createElement("div");l.className="preview-hud-group";for(const d of De){const p=document.createElement("button");p.className="preview-weather-btn",d.type==="clear"&&p.classList.add("active"),p.textContent=W()==="en"?d.labelEn:d.label,p.dataset.weather=d.type,p.addEventListener("click",()=>{this.currentWeather=d.type,this.weatherBtns.forEach(y=>y.classList.toggle("active",y.dataset.weather===d.type)),e.onWeatherChange(d.type)}),this.weatherBtns.push(p),l.appendChild(p)}c.appendChild(l);const f=document.createElement("div");f.className="preview-hud-group";const w=document.createElement("span");w.textContent=W()==="en"?"Speed:":"速度:",w.style.cssText="font-size:12px;color:rgba(255,255,255,0.6);",f.appendChild(w);for(const d of[1,5,20]){const p=document.createElement("button");p.className="preview-speed-btn",d===1&&p.classList.add("active"),p.textContent=`${d}x`,p.addEventListener("click",()=>{this.currentSpeed=d,this.speedBtns.forEach(y=>y.classList.remove("active")),p.classList.add("active"),e.onSpeedChange(d)}),this.speedBtns.push(p),f.appendChild(p)}c.appendChild(f),this.el.appendChild(c),t.appendChild(this.el)}updateTimeLabel(t){const e=Math.floor(t)%24,i=Math.floor(t%1*60);this.timeLabel.textContent=`${String(e).padStart(2,"0")}:${String(i).padStart(2,"0")}`}updateTimeSlider(t){this.timeSlider.value=String(t%24),this.updateTimeLabel(t)}destroy(){this.el.remove()}}Q();const ze="agentshire_map_draft";async function We(){Ge();const n=document.getElementById("preview-container"),t=document.getElementById("preview-loading"),e=document.getElementById("preview-error"),i=document.getElementById("preview-error-msg");try{let s=function(){requestAnimationFrame(s);const a=Math.min($.getDelta(),.1);o.update(a),C.update(o),v.update(a,o);const L=o.getGameHour();X.update(L,a),b.update(a),k.update(a),x.update(a),B.update(a);const E=o.getState();E&&(P.setEnabled(!0),P.update(a,v.getDisplayWeather()??"clear",E.period),H.update(a,v.getDisplayWeather()??"clear",E.period,"town")),b.isWalking&&_().play("footstep"),V.updateTimeSlider(L),g?g.render():m.render(u,l)};const c=localStorage.getItem(ze);if(!c)throw new Error("没有找到地图数据,请先在编辑器中保存");const r=JSON.parse(c),m=new he({antialias:!0});m.setSize(n.clientWidth,n.clientHeight),m.setPixelRatio(Math.min(window.devicePixelRatio,2)),m.shadowMap.enabled=!0,m.shadowMap.type=ue,n.appendChild(m.domElement);const u=new pe,l=new me(42,n.clientWidth/n.clientHeight,.1,200);window.addEventListener("resize",()=>{l.aspect=n.clientWidth/n.clientHeight,l.updateProjectionMatrix(),m.setSize(n.clientWidth,n.clientHeight),g==null||g.setSize(n.clientWidth,n.clientHeight)});const f=new fe;await new we().init();const d=new ke;await d.preload(["characters","props"]);const y=await new Ae(u,f).build(r);let g=null;try{g=new Le(m,u,l)}catch{}const o=new ye({startHour:10}),C=new ve(u,y,g),v=new xe(u,l,C,g,Me()),q=new Pe(u),B=new Ee(u,q);B.setCamera(l);const x=new be(l,n);x.init(),K.setAssetLoader(d);const Y=r.grid.cols/2,N=r.grid.rows/2,k=new K({id:"preview-player",name:"镇长",color:4491468,role:"general",spawn:{x:Y,y:0,z:N},characterKey:"char-male-c"});u.add(k.mesh),x.follow(k.mesh),x.moveTo({x:Y,z:N},!0);const b=new Re(n);b.setTarget(k),b.setCamera(l),b.start();const U=r.props.filter(a=>a.animated);console.log("[Preview] animated props:",JSON.stringify(U.map(a=>({modelKey:a.modelKey,rotY:a.rotationY,fixRotY:a.fixRotationY,route:a.vehicleRoute})),null,2));const X=new Ie(u,f);await X.buildFromConfig(r);const P=new Se,H=new Ce,A=_();await A.preload();const R=A.getAudioContext(),I=A.getSfxGain();R&&I&&(P.init(R,I),H.init(R,I).catch(()=>{}));const V=new Te(n,{onTimeChange:a=>o.setTime(a),onWeatherChange:a=>v.forceWeather(a),onSpeedChange:a=>o.setSpeed(a*6e4),onExit:()=>window.close()});window.addEventListener("keydown",a=>{a.key==="Escape"&&window.close()});let D="idle",T=0,z=0;n.addEventListener("pointerdown",a=>{(a.button===2||a.button===1)&&(D="dragging",T=a.clientX,z=a.clientY,n.setPointerCapture(a.pointerId))}),n.addEventListener("pointermove",a=>{if(D==="dragging"){const L=a.clientX-T,E=a.clientY-z;x.onDrag("move",{x:L,y:E},{x:0,y:0}),T=a.clientX,z=a.clientY}}),n.addEventListener("pointerup",()=>{D="idle"}),n.addEventListener("wheel",a=>{a.preventDefault(),x.onPinch(a.deltaY>0?-.05:.05)},{passive:!1}),t.style.display="none";const $=new ce;s()}catch(s){t.style.display="none",e.style.display="flex",i.textContent=(s==null?void 0:s.message)??"未知错误",console.error("[Preview]",s)}}We();function Ge(){document.querySelectorAll("[data-i18n]").forEach(n=>{const t=n.getAttribute("data-i18n"),e=M(t);e!==t&&(n.textContent=e)}),document.querySelectorAll("[data-i18n-tip]").forEach(n=>{const t=n.getAttribute("data-i18n-tip"),e=M(t);e!==t&&n.setAttribute("data-tip",e)}),document.querySelectorAll("[data-i18n-title]").forEach(n=>{const t=n.getAttribute("data-i18n-title"),e=M(t);e!==t&&n.setAttribute("title",e)}),document.querySelectorAll("[data-i18n-placeholder]").forEach(n=>{const t=n.getAttribute("data-i18n-placeholder"),e=M(t);e!==t&&(n.placeholder=e)})}
|
|
2
|
+
//# sourceMappingURL=preview-B6hYEQij.js.map
|