@playcraft/skills 0.0.2
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/README.md +333 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/skills.loader.d.ts +31 -0
- package/dist/src/skills.loader.d.ts.map +1 -0
- package/dist/src/skills.loader.js +200 -0
- package/dist/src/skills.loader.js.map +1 -0
- package/dist/src/skills.types.d.ts +44 -0
- package/dist/src/skills.types.d.ts.map +1 -0
- package/dist/src/skills.types.js +9 -0
- package/dist/src/skills.types.js.map +1 -0
- package/package.json +35 -0
- package/skills/2048_core.aigameplay/SKILL.md +123 -0
- package/skills/2048_core.aigameplay/manifest.json +159 -0
- package/skills/2048_core.aigameplay/ref/pgs-schema.json +194 -0
- package/skills/2048_core.aigameplay/ref/reducer.template.ts +189 -0
- package/skills/SKILL.md +46 -0
- package/skills/ad_compliance_rules.aiconfig/SKILL.md +85 -0
- package/skills/ad_compliance_rules.aiconfig/manifest.json +60 -0
- package/skills/agent_remix_orchestrator.aicomponent/SKILL.md +257 -0
- package/skills/agent_remix_orchestrator.aicomponent/manifest.json +12 -0
- package/skills/app_metadata.aiconfig/SKILL.md +53 -0
- package/skills/app_metadata.aiconfig/manifest.json +32 -0
- package/skills/appear_sfx.aiaudio/SKILL.md +59 -0
- package/skills/appear_sfx.aiaudio/manifest.json +45 -0
- package/skills/appear_sfx.aiaudio/ref/appear.mp3 +0 -0
- package/skills/arrow_move_error_sfx.aiaudio/SKILL.md +59 -0
- package/skills/arrow_move_error_sfx.aiaudio/manifest.json +45 -0
- package/skills/arrow_move_error_sfx.aiaudio/ref/arrow_move_error.mp3 +0 -0
- package/skills/arrow_path_data_format.aicomponent/SKILL.md +152 -0
- package/skills/arrow_path_data_format.aicomponent/manifest.json +57 -0
- package/skills/arrow_path_data_format.aicomponent/ref/LevelParser.ts +188 -0
- package/skills/arrow_path_data_format.aicomponent/ref/LevelTypes.ts +131 -0
- package/skills/arrow_pick_match_rules.aigameplay/SKILL.md +117 -0
- package/skills/arrow_pick_match_rules.aigameplay/manifest.json +105 -0
- package/skills/arrow_pick_match_rules.aigameplay/ref/pgs-schema.json +180 -0
- package/skills/asset_pipeline_scripts.aicomponent/SKILL.md +117 -0
- package/skills/asset_pipeline_scripts.aicomponent/manifest.json +17 -0
- package/skills/asset_pipeline_scripts.aicomponent/ref/gen-sprite.sh +105 -0
- package/skills/ball_sort.aigameplay/SKILL.md +109 -0
- package/skills/ball_sort.aigameplay/manifest.json +155 -0
- package/skills/ball_sort.aigameplay/ref/pgs-schema.json +192 -0
- package/skills/ball_sort.aigameplay/ref/reducer.template.ts +156 -0
- package/skills/basketball_shot.aigameplay/SKILL.md +94 -0
- package/skills/basketball_shot.aigameplay/manifest.json +150 -0
- package/skills/basketball_shot.aigameplay/ref/pgs-schema.json +229 -0
- package/skills/basketball_shot.aigameplay/ref/reducer.template.ts +189 -0
- package/skills/bg_music.aiaudio/SKILL.md +61 -0
- package/skills/bg_music.aiaudio/manifest.json +48 -0
- package/skills/bg_music.aiaudio/ref/bg.mp3 +0 -0
- package/skills/big_watermelon.aigameplay/SKILL.md +94 -0
- package/skills/big_watermelon.aigameplay/manifest.json +155 -0
- package/skills/big_watermelon.aigameplay/ref/pgs-schema.json +191 -0
- package/skills/big_watermelon.aigameplay/ref/reducer.template.ts +202 -0
- package/skills/block_puzzle.aigameplay/SKILL.md +121 -0
- package/skills/block_puzzle.aigameplay/manifest.json +154 -0
- package/skills/block_puzzle.aigameplay/ref/pgs-schema.json +170 -0
- package/skills/block_puzzle.aigameplay/ref/reducer.template.ts +182 -0
- package/skills/board_entity_sprite.aiimage/SKILL.md +255 -0
- package/skills/board_entity_sprite.aiimage/manifest.json +153 -0
- package/skills/board_entity_sprite.aiimage/ref/ProceduralCar.ts +357 -0
- package/skills/board_entity_sprite.aiimage/ref/car.png +0 -0
- package/skills/board_entity_sprite.aiimage/ref/car.webp +0 -0
- package/skills/bottom_ui_bar.aicomponent/SKILL.md +50 -0
- package/skills/bottom_ui_bar.aicomponent/manifest.json +31 -0
- package/skills/bottom_ui_bar.aicomponent/ref/GameBottomUI.ts +27 -0
- package/skills/bubble_shooter.aigameplay/SKILL.md +129 -0
- package/skills/bubble_shooter.aigameplay/manifest.json +181 -0
- package/skills/bubble_shooter.aigameplay/ref/pgs-schema.json +226 -0
- package/skills/bubble_shooter.aigameplay/ref/reducer.template.ts +228 -0
- package/skills/button_click_sfx.aiaudio/SKILL.md +59 -0
- package/skills/button_click_sfx.aiaudio/manifest.json +45 -0
- package/skills/button_click_sfx.aiaudio/ref/button_click.mp3 +0 -0
- package/skills/calm_piano.aiaudio/SKILL.md +68 -0
- package/skills/calm_piano.aiaudio/manifest.json +50 -0
- package/skills/camera_controller_3d.aicomponent/SKILL.md +100 -0
- package/skills/camera_controller_3d.aicomponent/manifest.json +52 -0
- package/skills/camera_controller_3d.aicomponent/ref/CameraController.ts +199 -0
- package/skills/camera_controller_3d.aicomponent/ref/OrbitControlsAdapter.ts +152 -0
- package/skills/candy_tile.aiimage/SKILL.md +62 -0
- package/skills/candy_tile.aiimage/manifest.json +49 -0
- package/skills/car_parking.aigameplay/SKILL.md +105 -0
- package/skills/car_parking.aigameplay/manifest.json +164 -0
- package/skills/car_parking.aigameplay/ref/pgs-schema.json +163 -0
- package/skills/car_parking.aigameplay/ref/reducer.template.ts +166 -0
- package/skills/castle.aiimage/SKILL.md +64 -0
- package/skills/castle.aiimage/manifest.json +48 -0
- package/skills/cheerful_ukulele.aiaudio/SKILL.md +72 -0
- package/skills/cheerful_ukulele.aiaudio/manifest.json +50 -0
- package/skills/click_sfx.aiaudio/SKILL.md +59 -0
- package/skills/click_sfx.aiaudio/manifest.json +45 -0
- package/skills/click_sfx.aiaudio/ref/click.mp3 +0 -0
- package/skills/combo_display.aicomponent/SKILL.md +45 -0
- package/skills/combo_display.aicomponent/manifest.json +31 -0
- package/skills/combo_display.aicomponent/ref/ComboManager.ts +362 -0
- package/skills/combo_display.aicomponent/ref/ComboSmallUI.ts +232 -0
- package/skills/combo_praise_text.aicomponent/SKILL.md +56 -0
- package/skills/combo_praise_text.aicomponent/manifest.json +34 -0
- package/skills/combo_praise_text.aicomponent/ref/ComboManager.ts +362 -0
- package/skills/countdown_timer.aicomponent/SKILL.md +44 -0
- package/skills/countdown_timer.aicomponent/manifest.json +35 -0
- package/skills/countdown_timer.aicomponent/ref/CountdownDisplay.ts +213 -0
- package/skills/cta_platform_config.aiconfig/SKILL.md +72 -0
- package/skills/cta_platform_config.aiconfig/manifest.json +56 -0
- package/skills/debug_overlay.aicomponent/SKILL.md +75 -0
- package/skills/debug_overlay.aicomponent/manifest.json +17 -0
- package/skills/debug_overlay.aicomponent/ref/DebugOverlay.ts +144 -0
- package/skills/desert.aiimage/SKILL.md +63 -0
- package/skills/desert.aiimage/manifest.json +49 -0
- package/skills/difficulty_curve_designer.aiconfig/SKILL.md +68 -0
- package/skills/difficulty_curve_designer.aiconfig/manifest.json +36 -0
- package/skills/digit_renderer.aicomponent/SKILL.md +43 -0
- package/skills/digit_renderer.aicomponent/manifest.json +25 -0
- package/skills/digit_renderer.aicomponent/ref/DigitRenderer.ts +237 -0
- package/skills/download_button.aicomponent/SKILL.md +44 -0
- package/skills/download_button.aicomponent/manifest.json +25 -0
- package/skills/download_button.aicomponent/ref/DownloadButton.ts +137 -0
- package/skills/draw_line_puzzle.aigameplay/SKILL.md +84 -0
- package/skills/draw_line_puzzle.aigameplay/manifest.json +152 -0
- package/skills/draw_line_puzzle.aigameplay/ref/pgs-schema.json +189 -0
- package/skills/draw_line_puzzle.aigameplay/ref/reducer.template.ts +194 -0
- package/skills/easy_to_hard.aiconfig/SKILL.md +52 -0
- package/skills/easy_to_hard.aiconfig/manifest.json +33 -0
- package/skills/eight_ball_pool.aigameplay/SKILL.md +104 -0
- package/skills/eight_ball_pool.aigameplay/manifest.json +152 -0
- package/skills/eight_ball_pool.aigameplay/ref/pgs-schema.json +205 -0
- package/skills/eight_ball_pool.aigameplay/ref/reducer.template.ts +198 -0
- package/skills/energetic_electronic.aiaudio/SKILL.md +69 -0
- package/skills/energetic_electronic.aiaudio/manifest.json +51 -0
- package/skills/fail_sfx.aiaudio/SKILL.md +59 -0
- package/skills/fail_sfx.aiaudio/manifest.json +44 -0
- package/skills/fail_sfx.aiaudio/ref/fail.mp3 +0 -0
- package/skills/figer_icon.aiimage/SKILL.md +58 -0
- package/skills/figer_icon.aiimage/manifest.json +48 -0
- package/skills/figer_icon.aiimage/ref/figer.png +0 -0
- package/skills/figer_icon.aiimage/ref/figer.webp +0 -0
- package/skills/forest.aiimage/SKILL.md +74 -0
- package/skills/forest.aiimage/manifest.json +48 -0
- package/skills/fruit_tile.aiimage/SKILL.md +68 -0
- package/skills/fruit_tile.aiimage/manifest.json +48 -0
- package/skills/game_over_panel.aicomponent/SKILL.md +47 -0
- package/skills/game_over_panel.aicomponent/manifest.json +61 -0
- package/skills/game_over_panel.aicomponent/ref/GameOverPanel.ts +74 -0
- package/skills/game_scene.aicomponent/SKILL.md +57 -0
- package/skills/game_scene.aicomponent/manifest.json +36 -0
- package/skills/game_scene.aicomponent/ref/Game.ts +748 -0
- package/skills/gameplay_balance_check.aivalidator/SKILL.md +69 -0
- package/skills/gameplay_balance_check.aivalidator/manifest.json +21 -0
- package/skills/gameplay_unit_test.aivalidator/SKILL.md +89 -0
- package/skills/gameplay_unit_test.aivalidator/manifest.json +17 -0
- package/skills/gameplay_unit_test.aivalidator/ref/gameplay.test.ts +202 -0
- package/skills/gameplay_unit_test.aivalidator/ref/vitest.config.ts +13 -0
- package/skills/grid_board_layout.aicomponent/SKILL.md +85 -0
- package/skills/grid_board_layout.aicomponent/manifest.json +69 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayout.ts +416 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayout3D.ts +125 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayoutMath.ts +85 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardRenderer3D.ts +298 -0
- package/skills/heart_lives.aicomponent/SKILL.md +42 -0
- package/skills/heart_lives.aicomponent/manifest.json +25 -0
- package/skills/heart_lives.aicomponent/ref/HeartDisplay.ts +96 -0
- package/skills/idle-breathe.aicomponent/SKILL.md +27 -0
- package/skills/idle-breathe.aicomponent/manifest.json +20 -0
- package/skills/idle-breathe.aicomponent/ref/phaser.js +25 -0
- package/skills/idle-breathe.aicomponent/ref/playcanvas.js +29 -0
- package/skills/jewel_tile.aiimage/SKILL.md +63 -0
- package/skills/jewel_tile.aiimage/manifest.json +49 -0
- package/skills/knife_hit.aigameplay/SKILL.md +103 -0
- package/skills/knife_hit.aigameplay/manifest.json +151 -0
- package/skills/knife_hit.aigameplay/ref/pgs-schema.json +202 -0
- package/skills/knife_hit.aigameplay/ref/reducer.template.ts +196 -0
- package/skills/left_right_parkour.aigameplay/SKILL.md +120 -0
- package/skills/left_right_parkour.aigameplay/manifest.json +165 -0
- package/skills/left_right_parkour.aigameplay/ref/pgs-schema.json +200 -0
- package/skills/left_right_parkour.aigameplay/ref/reducer.template.ts +194 -0
- package/skills/level_data_pack.aiconfig/SKILL.md +64 -0
- package/skills/level_data_pack.aiconfig/manifest.json +37 -0
- package/skills/level_data_validator.aivalidator/SKILL.md +85 -0
- package/skills/level_data_validator.aivalidator/manifest.json +17 -0
- package/skills/level_data_validator.aivalidator/ref/LevelValidator.ts +113 -0
- package/skills/level_lifecycle.aicomponent/SKILL.md +81 -0
- package/skills/level_lifecycle.aicomponent/manifest.json +87 -0
- package/skills/level_lifecycle.aicomponent/ref/LevelLifecycle.ts +235 -0
- package/skills/level_solvability_validator.aivalidator/SKILL.md +74 -0
- package/skills/level_solvability_validator.aivalidator/manifest.json +23 -0
- package/skills/level_solvability_validator.aivalidator/ref/LevelValidator.ts +186 -0
- package/skills/level_state.aicomponent/SKILL.md +55 -0
- package/skills/level_state.aicomponent/manifest.json +34 -0
- package/skills/level_state.aicomponent/ref/LevelDataManager.ts +26 -0
- package/skills/level_state.aicomponent/ref/LevelManager.ts +26 -0
- package/skills/loading_screen.aicomponent/SKILL.md +57 -0
- package/skills/loading_screen.aicomponent/manifest.json +43 -0
- package/skills/loading_screen.aicomponent/ref/LoadingUI.ts +339 -0
- package/skills/lose_result_panel.aiimage/SKILL.md +58 -0
- package/skills/lose_result_panel.aiimage/manifest.json +47 -0
- package/skills/lose_result_panel.aiimage/ref/lose.png +0 -0
- package/skills/lose_result_panel.aiimage/ref/lose.webp +0 -0
- package/skills/lose_sfx.aiaudio/SKILL.md +59 -0
- package/skills/lose_sfx.aiaudio/manifest.json +45 -0
- package/skills/lose_sfx.aiaudio/ref/lose.mp3 +0 -0
- package/skills/match-pop.aicomponent/SKILL.md +29 -0
- package/skills/match-pop.aicomponent/manifest.json +19 -0
- package/skills/match-pop.aicomponent/ref/phaser.js +30 -0
- package/skills/match-pop.aicomponent/ref/playcanvas.js +22 -0
- package/skills/match3_core.aigameplay/SKILL.md +125 -0
- package/skills/match3_core.aigameplay/manifest.json +107 -0
- package/skills/match3_core.aigameplay/ref/pgs-schema.json +154 -0
- package/skills/match3_core.aigameplay/ref/reducer.template.ts +191 -0
- package/skills/match_engine.aicomponent/SKILL.md +84 -0
- package/skills/match_engine.aicomponent/manifest.json +23 -0
- package/skills/match_engine.aicomponent/ref/MatchEngine.ts +75 -0
- package/skills/memory_match.aigameplay/SKILL.md +111 -0
- package/skills/memory_match.aigameplay/manifest.json +164 -0
- package/skills/memory_match.aigameplay/ref/pgs-schema.json +190 -0
- package/skills/memory_match.aigameplay/ref/reducer.template.ts +162 -0
- package/skills/merge_core.aigameplay/SKILL.md +112 -0
- package/skills/merge_core.aigameplay/manifest.json +154 -0
- package/skills/merge_core.aigameplay/ref/pgs-schema.json +202 -0
- package/skills/merge_core.aigameplay/ref/reducer.template.ts +179 -0
- package/skills/mistake_sfx.aiaudio/SKILL.md +59 -0
- package/skills/mistake_sfx.aiaudio/manifest.json +45 -0
- package/skills/mistake_sfx.aiaudio/ref/mistake.mp3 +0 -0
- package/skills/nomove_hint_overlay.aiimage/SKILL.md +58 -0
- package/skills/nomove_hint_overlay.aiimage/manifest.json +48 -0
- package/skills/nomove_hint_overlay.aiimage/ref/nomove_hint.png +0 -0
- package/skills/nomove_hint_overlay.aiimage/ref/nomove_hint.webp +0 -0
- package/skills/normal_dot.aiimage/SKILL.md +58 -0
- package/skills/normal_dot.aiimage/manifest.json +46 -0
- package/skills/normal_dot.aiimage/ref/normal_dot.png +0 -0
- package/skills/normal_dot.aiimage/ref/normal_dot.webp +0 -0
- package/skills/ocean.aiimage/SKILL.md +71 -0
- package/skills/ocean.aiimage/manifest.json +49 -0
- package/skills/particle-confetti.aicomponent/SKILL.md +32 -0
- package/skills/particle-confetti.aicomponent/manifest.json +21 -0
- package/skills/particle-confetti.aicomponent/ref/html5-spritesheet.js +17 -0
- package/skills/particle-confetti.aicomponent/ref/phaser.js +38 -0
- package/skills/particle-explosion.aicomponent/SKILL.md +37 -0
- package/skills/particle-explosion.aicomponent/manifest.json +24 -0
- package/skills/particle-explosion.aicomponent/ref/html5-spritesheet.js +40 -0
- package/skills/particle-explosion.aicomponent/ref/phaser.js +46 -0
- package/skills/particle-explosion.aicomponent/ref/playcanvas.js +33 -0
- package/skills/particle-trail.aicomponent/SKILL.md +25 -0
- package/skills/particle-trail.aicomponent/manifest.json +22 -0
- package/skills/particle-trail.aicomponent/ref/phaser.js +31 -0
- package/skills/path_animation.aicomponent/SKILL.md +82 -0
- package/skills/path_animation.aicomponent/manifest.json +77 -0
- package/skills/path_animation.aicomponent/ref/AnimationManager.ts +694 -0
- package/skills/path_animation.aicomponent/ref/AnimationManager3D.ts +317 -0
- package/skills/path_elimination_rules.aigameplay/SKILL.md +88 -0
- package/skills/path_elimination_rules.aigameplay/manifest.json +119 -0
- package/skills/path_elimination_rules.aigameplay/ref/pgs-schema.json +227 -0
- package/skills/path_input_handler.aicomponent/SKILL.md +87 -0
- package/skills/path_input_handler.aicomponent/manifest.json +97 -0
- package/skills/path_input_handler.aicomponent/ref/InputHandler.ts +714 -0
- package/skills/path_input_handler.aicomponent/ref/InputHandler3D.ts +204 -0
- package/skills/path_renderer.aicomponent/SKILL.md +101 -0
- package/skills/path_renderer.aicomponent/manifest.json +69 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderer.ts +509 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderer3D.ts +176 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderers.ts +640 -0
- package/skills/phaser.aicomponent/SKILL.md +315 -0
- package/skills/phaser.aicomponent/manifest.json +156 -0
- package/skills/phaser.aicomponent/ref/BootScene.ts +29 -0
- package/skills/phaser.aicomponent/ref/GameConfig.ts +29 -0
- package/skills/phaser.aicomponent/ref/GameScene.ts +88 -0
- package/skills/phaser.aicomponent/ref/PreloaderScene.ts +78 -0
- package/skills/phaser.aicomponent/ref/SceneKeys.ts +7 -0
- package/skills/phaser.aicomponent/ref/SoundUtils.ts +21 -0
- package/skills/phaser.aicomponent/ref/UiLayout.ts +74 -0
- package/skills/phaser.aicomponent/ref/globals.d.ts +52 -0
- package/skills/phaser.aicomponent/ref/index.css +40 -0
- package/skills/phaser.aicomponent/ref/index.html +14 -0
- package/skills/phaser.aicomponent/ref/index.ts +48 -0
- package/skills/phaser.aicomponent/ref/main.ts +16 -0
- package/skills/phaser.aicomponent/ref/package.json +22 -0
- package/skills/phaser.aicomponent/ref/tsconfig.json +25 -0
- package/skills/phaser.aicomponent/ref/webpack.config.js +57 -0
- package/skills/phaser_scene_lifecycle.aicomponent/SKILL.md +63 -0
- package/skills/phaser_scene_lifecycle.aicomponent/manifest.json +33 -0
- package/skills/pick_and_match_rules.aigameplay/SKILL.md +113 -0
- package/skills/pick_and_match_rules.aigameplay/manifest.json +121 -0
- package/skills/pick_and_match_rules.aigameplay/ref/pgs-schema.json +354 -0
- package/skills/pin_pull.aigameplay/SKILL.md +110 -0
- package/skills/pin_pull.aigameplay/manifest.json +164 -0
- package/skills/pin_pull.aigameplay/ref/pgs-schema.json +201 -0
- package/skills/pin_pull.aigameplay/ref/reducer.template.ts +216 -0
- package/skills/playable_app_logo.aiimage/SKILL.md +58 -0
- package/skills/playable_app_logo.aiimage/manifest.json +47 -0
- package/skills/playable_app_logo.aiimage/ref/logo.png +0 -0
- package/skills/playable_app_logo.aiimage/ref/logo.webp +0 -0
- package/skills/playable_end_screen_layout.aicomponent/SKILL.md +75 -0
- package/skills/playable_end_screen_layout.aicomponent/manifest.json +24 -0
- package/skills/playable_guidance_layer.aicomponent/SKILL.md +89 -0
- package/skills/playable_guidance_layer.aicomponent/manifest.json +24 -0
- package/skills/playable_hud_layout.aicomponent/SKILL.md +96 -0
- package/skills/playable_hud_layout.aicomponent/manifest.json +24 -0
- package/skills/playable_scripts_build.aicomponent/SKILL.md +69 -0
- package/skills/playable_scripts_build.aicomponent/manifest.json +53 -0
- package/skills/playable_scripts_build.aicomponent/ref/builds.config.js +257 -0
- package/skills/playcraft-3d-flip-sprite/SKILL.md +336 -0
- package/skills/playcraft-3d-flip-sprite/renderer/flatten_glb.mjs +62 -0
- package/skills/playcraft-3d-flip-sprite/renderer/render.mjs +325 -0
- package/skills/playcraft-3d-flip-sprite/renderer/render_single.mjs +138 -0
- package/skills/playcraft-asset-management/SKILL.md +73 -0
- package/skills/playcraft-audio-generation/SKILL.md +126 -0
- package/skills/playcraft-build/SKILL.md +44 -0
- package/skills/playcraft-code-editor/SKILL.md +71 -0
- package/skills/playcraft-create-remix/SKILL.md +62 -0
- package/skills/playcraft-deploy/SKILL.md +59 -0
- package/skills/playcraft-image-generation/SKILL.md +148 -0
- package/skills/playcraft-image-processing/SKILL.md +216 -0
- package/skills/playcraft-platform-intro/SKILL.md +41 -0
- package/skills/playcraft-prefab/SKILL.md +98 -0
- package/skills/playcraft-project-management/SKILL.md +57 -0
- package/skills/playcraft-remix-workflow/SKILL.md +119 -0
- package/skills/playcraft-remix-workflow/references/xplatform.schema.json5 +31 -0
- package/skills/playcraft-save/SKILL.md +46 -0
- package/skills/playcraft-skill-recommender/SKILL.md +152 -0
- package/skills/playcraft-sprite-generation/SKILL.md +534 -0
- package/skills/playcraft-sprite-remix/SKILL.md +155 -0
- package/skills/playcraft-sprite-sheet/SKILL.md +97 -0
- package/skills/playtest_report.aivalidator/SKILL.md +103 -0
- package/skills/playtest_report.aivalidator/manifest.json +21 -0
- package/skills/preloader_scene.aicomponent/SKILL.md +58 -0
- package/skills/preloader_scene.aicomponent/manifest.json +43 -0
- package/skills/preloader_scene.aicomponent/ref/Preloader.ts +339 -0
- package/skills/progress_bar.aicomponent/SKILL.md +38 -0
- package/skills/progress_bar.aicomponent/manifest.json +25 -0
- package/skills/progress_bar.aicomponent/ref/ProgressDisplay.ts +140 -0
- package/skills/references/xplatform.schema.json5 +31 -0
- package/skills/responsive_2d_layout.aicomponent/SKILL.md +161 -0
- package/skills/responsive_2d_layout.aicomponent/manifest.json +43 -0
- package/skills/responsive_2d_layout.aicomponent/ref/UiLayout.ts +56 -0
- package/skills/run_context_state.aicomponent/SKILL.md +54 -0
- package/skills/run_context_state.aicomponent/manifest.json +40 -0
- package/skills/run_context_state.aicomponent/ref/RunContextRuntime.ts +30 -0
- package/skills/score-fly.aicomponent/SKILL.md +31 -0
- package/skills/score-fly.aicomponent/manifest.json +21 -0
- package/skills/score-fly.aicomponent/ref/phaser.js +26 -0
- package/skills/score-fly.aicomponent/ref/playcanvas.js +28 -0
- package/skills/score_goal.aiconfig/SKILL.md +46 -0
- package/skills/score_goal.aiconfig/manifest.json +33 -0
- package/skills/screen-flash.aicomponent/SKILL.md +30 -0
- package/skills/screen-flash.aicomponent/manifest.json +20 -0
- package/skills/screen-flash.aicomponent/ref/phaser.js +48 -0
- package/skills/screen-shake.aicomponent/SKILL.md +30 -0
- package/skills/screen-shake.aicomponent/manifest.json +19 -0
- package/skills/screen-shake.aicomponent/ref/phaser.js +23 -0
- package/skills/screen-shake.aicomponent/ref/playcanvas.js +44 -0
- package/skills/screw_puzzle.aigameplay/SKILL.md +116 -0
- package/skills/screw_puzzle.aigameplay/manifest.json +164 -0
- package/skills/screw_puzzle.aigameplay/ref/pgs-schema.json +235 -0
- package/skills/screw_puzzle.aigameplay/ref/reducer.template.ts +213 -0
- package/skills/settings_state.aicomponent/SKILL.md +61 -0
- package/skills/settings_state.aicomponent/manifest.json +33 -0
- package/skills/settings_state.aicomponent/ref/SettingsManager.ts +130 -0
- package/skills/slide_out_to_tray_animation.aicomponent/SKILL.md +64 -0
- package/skills/slide_out_to_tray_animation.aicomponent/manifest.json +58 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/AnimationManager.ts +164 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/AnimationManager3D.ts +198 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/BezierUtils.ts +59 -0
- package/skills/slot_machine.aigameplay/SKILL.md +119 -0
- package/skills/slot_machine.aigameplay/manifest.json +166 -0
- package/skills/slot_machine.aigameplay/ref/pgs-schema.json +212 -0
- package/skills/slot_machine.aigameplay/ref/reducer.template.ts +212 -0
- package/skills/sniper_shot.aigameplay/SKILL.md +84 -0
- package/skills/sniper_shot.aigameplay/manifest.json +153 -0
- package/skills/sniper_shot.aigameplay/ref/pgs-schema.json +211 -0
- package/skills/sniper_shot.aigameplay/ref/reducer.template.ts +211 -0
- package/skills/solitaire.aigameplay/SKILL.md +101 -0
- package/skills/solitaire.aigameplay/manifest.json +151 -0
- package/skills/solitaire.aigameplay/ref/pgs-schema.json +200 -0
- package/skills/solitaire.aigameplay/ref/reducer.template.ts +176 -0
- package/skills/sound-effects/SKILL.md +46 -0
- package/skills/sound_utils.aicomponent/SKILL.md +52 -0
- package/skills/sound_utils.aicomponent/manifest.json +30 -0
- package/skills/sound_utils.aicomponent/ref/SoundUtils.ts +29 -0
- package/skills/sprite-animation-2d.aicomponent/SKILL.md +45 -0
- package/skills/sprite-animation-2d.aicomponent/manifest.json +28 -0
- package/skills/sprite-animation-2d.aicomponent/ref/html5.js +83 -0
- package/skills/sprite-animation-2d.aicomponent/ref/phaser.js +38 -0
- package/skills/sprite-animation-2d.aicomponent/ref/playcanvas.js +67 -0
- package/skills/sprite_entity_renderer.aicomponent/SKILL.md +148 -0
- package/skills/sprite_entity_renderer.aicomponent/manifest.json +17 -0
- package/skills/sprite_entity_renderer.aicomponent/ref/SpriteEntityRenderer.ts +126 -0
- package/skills/success_sfx.aiaudio/SKILL.md +59 -0
- package/skills/success_sfx.aiaudio/manifest.json +45 -0
- package/skills/success_sfx.aiaudio/ref/success.mp3 +0 -0
- package/skills/tap_blast.aigameplay/SKILL.md +116 -0
- package/skills/tap_blast.aigameplay/manifest.json +153 -0
- package/skills/tap_blast.aigameplay/ref/pgs-schema.json +208 -0
- package/skills/tap_blast.aigameplay/ref/reducer.template.ts +202 -0
- package/skills/theme_state.aicomponent/SKILL.md +53 -0
- package/skills/theme_state.aicomponent/manifest.json +33 -0
- package/skills/theme_state.aicomponent/ref/ThemeManager.ts +174 -0
- package/skills/theme_switcher_build.aicomponent/SKILL.md +62 -0
- package/skills/theme_switcher_build.aicomponent/manifest.json +38 -0
- package/skills/theme_switcher_build.aicomponent/ref/theme-index.ts +8 -0
- package/skills/theme_variant.aiconfig/SKILL.md +78 -0
- package/skills/theme_variant.aiconfig/manifest.json +39 -0
- package/skills/theme_variant.aiconfig/ref/ExampleTheme/index.ts +16 -0
- package/skills/theme_variant.aiconfig/ref/ExampleTheme/levelEasy.json +141 -0
- package/skills/threejs.aicomponent/SKILL.md +422 -0
- package/skills/threejs.aicomponent/manifest.json +166 -0
- package/skills/threejs.aicomponent/ref/AssetLoader.ts +158 -0
- package/skills/threejs.aicomponent/ref/BaseScene.ts +88 -0
- package/skills/threejs.aicomponent/ref/GameConfig.ts +47 -0
- package/skills/threejs.aicomponent/ref/MainScene.ts +170 -0
- package/skills/threejs.aicomponent/ref/PreloaderScene.ts +93 -0
- package/skills/threejs.aicomponent/ref/SceneKeys.ts +6 -0
- package/skills/threejs.aicomponent/ref/SceneManager.ts +69 -0
- package/skills/threejs.aicomponent/ref/ViewportManager.ts +62 -0
- package/skills/threejs.aicomponent/ref/globals.d.ts +74 -0
- package/skills/threejs.aicomponent/ref/index.css +80 -0
- package/skills/threejs.aicomponent/ref/index.html +20 -0
- package/skills/threejs.aicomponent/ref/index.ts +117 -0
- package/skills/threejs.aicomponent/ref/main.ts +10 -0
- package/skills/threejs.aicomponent/ref/package.json +23 -0
- package/skills/threejs.aicomponent/ref/tsconfig.json +24 -0
- package/skills/threejs.aicomponent/ref/webpack.config.js +61 -0
- package/skills/time_clear_goal.aiconfig/SKILL.md +46 -0
- package/skills/time_clear_goal.aiconfig/manifest.json +32 -0
- package/skills/time_icon.aiimage/SKILL.md +58 -0
- package/skills/time_icon.aiimage/manifest.json +47 -0
- package/skills/time_icon.aiimage/ref/time.png +0 -0
- package/skills/time_icon.aiimage/ref/time.webp +0 -0
- package/skills/top_ui_bar.aicomponent/SKILL.md +45 -0
- package/skills/top_ui_bar.aicomponent/manifest.json +27 -0
- package/skills/top_ui_bar.aicomponent/ref/GameTopUI.ts +229 -0
- package/skills/tower_defence.aigameplay/SKILL.md +117 -0
- package/skills/tower_defence.aigameplay/manifest.json +175 -0
- package/skills/tower_defence.aigameplay/ref/pgs-schema.json +247 -0
- package/skills/tower_defence.aigameplay/ref/reducer.template.ts +239 -0
- package/skills/tray_container.aicomponent/SKILL.md +143 -0
- package/skills/tray_container.aicomponent/manifest.json +58 -0
- package/skills/tray_container.aicomponent/ref/TrayRenderer.ts +155 -0
- package/skills/tray_container.aicomponent/ref/TrayRenderer3D.ts +281 -0
- package/skills/tray_container.aicomponent/ref/TrayRendererHtmlOverlay.ts +228 -0
- package/skills/tutorial_overlay.aicomponent/SKILL.md +46 -0
- package/skills/tutorial_overlay.aicomponent/manifest.json +34 -0
- package/skills/tutorial_overlay.aicomponent/ref/TutorialManager.ts +367 -0
- package/skills/tween-animation-2d.aicomponent/SKILL.md +35 -0
- package/skills/tween-animation-2d.aicomponent/manifest.json +28 -0
- package/skills/tween-animation-2d.aicomponent/ref/phaser.js +49 -0
- package/skills/tween-animation-2d.aicomponent/ref/playcanvas.js +36 -0
- package/skills/typescript_module_patterns.aicomponent/SKILL.md +209 -0
- package/skills/typescript_module_patterns.aicomponent/manifest.json +28 -0
- package/skills/typescript_module_patterns.aicomponent/ref/globals.d.ts +31 -0
- package/skills/ui-transition.aicomponent/SKILL.md +33 -0
- package/skills/ui-transition.aicomponent/manifest.json +19 -0
- package/skills/ui-transition.aicomponent/ref/phaser.js +45 -0
- package/skills/ux_flow_spec.aiconfig/SKILL.md +82 -0
- package/skills/ux_flow_spec.aiconfig/manifest.json +39 -0
- package/skills/wave_difficulty.aiconfig/SKILL.md +46 -0
- package/skills/wave_difficulty.aiconfig/manifest.json +33 -0
- package/skills/webpack_build.aicomponent/SKILL.md +204 -0
- package/skills/webpack_build.aicomponent/manifest.json +29 -0
- package/skills/webpack_build.aicomponent/ref/package.json +16 -0
- package/skills/webpack_build.aicomponent/ref/webpack.config.js +53 -0
- package/skills/win_anim_sfx.aiaudio/SKILL.md +59 -0
- package/skills/win_anim_sfx.aiaudio/manifest.json +46 -0
- package/skills/win_anim_sfx.aiaudio/ref/win_anim.mp3 +0 -0
- package/skills/win_dot.aiimage/SKILL.md +58 -0
- package/skills/win_dot.aiimage/manifest.json +47 -0
- package/skills/win_dot.aiimage/ref/win_dot.png +0 -0
- package/skills/win_dot.aiimage/ref/win_dot.webp +0 -0
- package/skills/win_result_panel.aiimage/SKILL.md +58 -0
- package/skills/win_result_panel.aiimage/manifest.json +47 -0
- package/skills/win_result_panel.aiimage/ref/win.png +0 -0
- package/skills/win_result_panel.aiimage/ref/win.webp +0 -0
- package/skills/word_connect.aigameplay/SKILL.md +86 -0
- package/skills/word_connect.aigameplay/manifest.json +154 -0
- package/skills/word_connect.aigameplay/ref/pgs-schema.json +212 -0
- package/skills/word_connect.aigameplay/ref/reducer.template.ts +186 -0
- package/src/index.ts +10 -0
- package/src/skills.loader.ts +225 -0
- package/src/skills.types.ts +42 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: app_metadata.aiconfig
|
|
3
|
+
description: 应用元数据配置。定义试玩广告 Loading 页面中展示的应用标题、描述文案、评分、评论数量等文本信息。
|
|
4
|
+
triggers: 需要定制 Loading 页面文案信息或应用品牌描述时触发。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 应用元数据配置(App Metadata Config)
|
|
8
|
+
|
|
9
|
+
## 说明
|
|
10
|
+
|
|
11
|
+
Loading 页面展示的应用文案信息:
|
|
12
|
+
|
|
13
|
+
- `APP_TITLE`:应用名称(如 "Arrow Puzzle")
|
|
14
|
+
- `APP_DESC`:应用描述(如 "Match all the arrows to win!")
|
|
15
|
+
- `APP_STARS`:星评(如 "4.8")
|
|
16
|
+
- `APP_REVIEWS_COUNT`:评论数(如 "10K+")
|
|
17
|
+
|
|
18
|
+
## Recipe
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"kind": "config-patch",
|
|
23
|
+
"params": {
|
|
24
|
+
"APP_TITLE": "Arrow Puzzle",
|
|
25
|
+
"APP_DESC": "Match all the arrows to win!",
|
|
26
|
+
"APP_STARS": "4.8"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Result
|
|
32
|
+
|
|
33
|
+
写入 `src/game/scenes/LoadingConfig.ts` 中对应常量。
|
|
34
|
+
|
|
35
|
+
## Binding
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"role": "appMetadata",
|
|
40
|
+
"target": "src/game/scenes/LoadingConfig.ts"
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Skill Definition
|
|
45
|
+
|
|
46
|
+
```yaml
|
|
47
|
+
tools:
|
|
48
|
+
- write_file
|
|
49
|
+
inputs:
|
|
50
|
+
- params: APP_TITLE, APP_DESC, APP_STARS, APP_REVIEWS_COUNT
|
|
51
|
+
outputs:
|
|
52
|
+
- config: app metadata constants for loading screen
|
|
53
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "app_metadata.aiconfig",
|
|
4
|
+
"bundleType": "aiconfig",
|
|
5
|
+
"category": "config",
|
|
6
|
+
"mode": "parametric",
|
|
7
|
+
"label": { "zh": "应用元数据配置", "en": "App metadata config" },
|
|
8
|
+
"tags": ["config", "metadata", "app-title", "app-desc", "stars", "loading-page"],
|
|
9
|
+
"bindingRoles": ["appMetadata"],
|
|
10
|
+
"generation": {
|
|
11
|
+
"kind": "config-patch",
|
|
12
|
+
"params": {
|
|
13
|
+
"APP_TITLE": "Arrow Puzzle",
|
|
14
|
+
"APP_DESC": "Match all the arrows to win!",
|
|
15
|
+
"APP_STARS": "4.8",
|
|
16
|
+
"APP_REVIEWS_COUNT": "10K+"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"result": {
|
|
20
|
+
"configKey": "app.metadata",
|
|
21
|
+
"format": "json-patch",
|
|
22
|
+
"constraints": { "requiredKeys": ["APP_TITLE", "APP_DESC", "APP_STARS"] }
|
|
23
|
+
},
|
|
24
|
+
"binding": {
|
|
25
|
+
"role": "appMetadata",
|
|
26
|
+
"target": "src/game/scenes/LoadingConfig.ts",
|
|
27
|
+
"type": "config-key-value"
|
|
28
|
+
},
|
|
29
|
+
"files": {
|
|
30
|
+
"skill": "SKILL.md"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: appear_sfx.aiaudio
|
|
3
|
+
description: 关卡加载时路径出现在棋盘上的音效。
|
|
4
|
+
triggers: 需要生成路径出现动画音效时触发。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 路径出现音效
|
|
8
|
+
|
|
9
|
+
## Recipe
|
|
10
|
+
|
|
11
|
+
生成提示词见 manifest.json generation.prompt。
|
|
12
|
+
- model: Google Lyria 3(平台默认,见 manifest.json generation.platformSkill)
|
|
13
|
+
- format: mp3
|
|
14
|
+
- loop: false
|
|
15
|
+
|
|
16
|
+
## Result
|
|
17
|
+
|
|
18
|
+
- 产物文件:`appear.mp3`
|
|
19
|
+
- 在 Preloader.ts 中作为 `sfxAppear` key 加载
|
|
20
|
+
|
|
21
|
+
## Binding
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"role": "sfxAppear",
|
|
26
|
+
"target": "assets/sounds/appear.mp3",
|
|
27
|
+
"type": "audio-asset-reference"
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 生成方式
|
|
32
|
+
|
|
33
|
+
Platform Skill: `playcraft-audio-generation`
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# 1. 生成 SFX(--prompt 必须英文)
|
|
37
|
+
playcraft tools generate-sfx \
|
|
38
|
+
--prompt "whoosh or spawn sound for game path appearing on board" \
|
|
39
|
+
--duration 1 \
|
|
40
|
+
--output ta-workspace/raw_sfx.mp3
|
|
41
|
+
|
|
42
|
+
# 2. 归一化音量
|
|
43
|
+
playcraft audio normalize --input ta-workspace/raw_sfx.mp3 --output ta-workspace/raw_sfx.mp3 --target-loudness -16
|
|
44
|
+
|
|
45
|
+
# 3. 压缩(SFX 目标 ≤15KB)
|
|
46
|
+
playcraft audio compress --input ta-workspace/raw_sfx.mp3 --output ta-workspace/appear.mp3 --target-size 15KB
|
|
47
|
+
|
|
48
|
+
# 4. 将产物写入 sandbox 对应路径(见 binding.target)
|
|
49
|
+
```
|
|
50
|
+
## Skill Definition
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
tools:
|
|
54
|
+
- generate_audio
|
|
55
|
+
inputs:
|
|
56
|
+
- prompt: see manifest.json
|
|
57
|
+
outputs:
|
|
58
|
+
- audio: appear.mp3
|
|
59
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "appear_sfx.aiaudio",
|
|
4
|
+
"bundleType": "aiaudio",
|
|
5
|
+
"category": "audio",
|
|
6
|
+
"mode": "generative",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "路径出现音效",
|
|
9
|
+
"en": "Path appear SFX"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"audio",
|
|
13
|
+
"sfx",
|
|
14
|
+
"appear",
|
|
15
|
+
"spawn",
|
|
16
|
+
"path"
|
|
17
|
+
],
|
|
18
|
+
"bindingRoles": [
|
|
19
|
+
"sfxAppear"
|
|
20
|
+
],
|
|
21
|
+
"generation": {
|
|
22
|
+
"kind": "sfx",
|
|
23
|
+
"prompt": "whoosh or spawn sound for game path appearing on board",
|
|
24
|
+
"duration": 1,
|
|
25
|
+
"loop": false,
|
|
26
|
+
"referenceAudio": "ref/appear.mp3",
|
|
27
|
+
"platformSkill": "playcraft-audio-generation"
|
|
28
|
+
},
|
|
29
|
+
"result": {
|
|
30
|
+
"outputFile": "ref/appear.mp3",
|
|
31
|
+
"format": "mp3",
|
|
32
|
+
"constraints": {
|
|
33
|
+
"maxDuration": 1
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"binding": {
|
|
37
|
+
"role": "sfxAppear",
|
|
38
|
+
"target": "assets/sounds/appear.mp3",
|
|
39
|
+
"type": "audio-asset-reference"
|
|
40
|
+
},
|
|
41
|
+
"files": {
|
|
42
|
+
"skill": "SKILL.md",
|
|
43
|
+
"asset": "ref/appear.mp3"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arrow_move_error_sfx.aiaudio
|
|
3
|
+
description: 无效的路径操作时的轻微错误提示音效。
|
|
4
|
+
triggers: 需要生成箭头/路径操作无效提示音效时触发。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 箭头移动错误音效
|
|
8
|
+
|
|
9
|
+
## Recipe
|
|
10
|
+
|
|
11
|
+
生成提示词见 manifest.json generation.prompt。
|
|
12
|
+
- model: Google Lyria 3(平台默认,见 manifest.json generation.platformSkill)
|
|
13
|
+
- format: mp3
|
|
14
|
+
- loop: false
|
|
15
|
+
|
|
16
|
+
## Result
|
|
17
|
+
|
|
18
|
+
- 产物文件:`arrow_move_error.mp3`
|
|
19
|
+
- 在 Preloader.ts 中作为 `sfxArrowMoveError` key 加载
|
|
20
|
+
|
|
21
|
+
## Binding
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"role": "sfxArrowMoveError",
|
|
26
|
+
"target": "assets/sounds/arrow_move_error.mp3",
|
|
27
|
+
"type": "audio-asset-reference"
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 生成方式
|
|
32
|
+
|
|
33
|
+
Platform Skill: `playcraft-audio-generation`
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# 1. 生成 SFX(--prompt 必须英文)
|
|
37
|
+
playcraft tools generate-sfx \
|
|
38
|
+
--prompt "subtle error sound for invalid arrow interaction in puzzle game" \
|
|
39
|
+
--duration 1 \
|
|
40
|
+
--output ta-workspace/raw_sfx.mp3
|
|
41
|
+
|
|
42
|
+
# 2. 归一化音量
|
|
43
|
+
playcraft audio normalize --input ta-workspace/raw_sfx.mp3 --output ta-workspace/raw_sfx.mp3 --target-loudness -16
|
|
44
|
+
|
|
45
|
+
# 3. 压缩(SFX 目标 ≤15KB)
|
|
46
|
+
playcraft audio compress --input ta-workspace/raw_sfx.mp3 --output ta-workspace/arrow_move_error.mp3 --target-size 15KB
|
|
47
|
+
|
|
48
|
+
# 4. 将产物写入 sandbox 对应路径(见 binding.target)
|
|
49
|
+
```
|
|
50
|
+
## Skill Definition
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
tools:
|
|
54
|
+
- generate_audio
|
|
55
|
+
inputs:
|
|
56
|
+
- prompt: see manifest.json
|
|
57
|
+
outputs:
|
|
58
|
+
- audio: arrow_move_error.mp3
|
|
59
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "arrow_move_error_sfx.aiaudio",
|
|
4
|
+
"bundleType": "aiaudio",
|
|
5
|
+
"category": "audio",
|
|
6
|
+
"mode": "generative",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "箭头移动错误音效",
|
|
9
|
+
"en": "Arrow move error SFX"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"audio",
|
|
13
|
+
"sfx",
|
|
14
|
+
"arrow",
|
|
15
|
+
"error",
|
|
16
|
+
"invalid"
|
|
17
|
+
],
|
|
18
|
+
"bindingRoles": [
|
|
19
|
+
"sfxArrowMoveError"
|
|
20
|
+
],
|
|
21
|
+
"generation": {
|
|
22
|
+
"kind": "sfx",
|
|
23
|
+
"prompt": "subtle error sound for invalid arrow interaction in puzzle game",
|
|
24
|
+
"duration": 1,
|
|
25
|
+
"loop": false,
|
|
26
|
+
"referenceAudio": "ref/arrow_move_error.mp3",
|
|
27
|
+
"platformSkill": "playcraft-audio-generation"
|
|
28
|
+
},
|
|
29
|
+
"result": {
|
|
30
|
+
"outputFile": "ref/arrow_move_error.mp3",
|
|
31
|
+
"format": "mp3",
|
|
32
|
+
"constraints": {
|
|
33
|
+
"maxDuration": 1
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"binding": {
|
|
37
|
+
"role": "sfxArrowMoveError",
|
|
38
|
+
"target": "assets/sounds/arrow_move_error.mp3",
|
|
39
|
+
"type": "audio-asset-reference"
|
|
40
|
+
},
|
|
41
|
+
"files": {
|
|
42
|
+
"skill": "SKILL.md",
|
|
43
|
+
"asset": "ref/arrow_move_error.mp3"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arrow_path_data_format.aicomponent
|
|
3
|
+
description: 路径消除玩法的关卡数据格式定义(TypeScript 类型)和解析器。定义 RawLevelJson(Cocos 导出格式)→ ParsedLevel(Phaser 可用格式)的转换,包含坐标系翻转和路径离散化。
|
|
4
|
+
triggers: 需要定义或解析路径消除类玩法的关卡数据结构时触发。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 箭头路径关卡数据格式(Arrow Path Data Format)
|
|
8
|
+
|
|
9
|
+
## 说明
|
|
10
|
+
|
|
11
|
+
本 skill 提供路径消除玩法所需的全套关卡数据类型和解析逻辑:
|
|
12
|
+
|
|
13
|
+
- `RawLevelJson`:关卡原始 JSON 格式(从 Cocos Creator 导出,y 轴向上)
|
|
14
|
+
- `ParsedLevel`:解析后供 Phaser 使用的规范化格式(y 轴向下)
|
|
15
|
+
- `LevelPath`:解析后的单条路径(含离散格子索引、方向箭头)
|
|
16
|
+
- `parseLevelJson()`:负责坐标翻转、路径离散化、颜色提取
|
|
17
|
+
|
|
18
|
+
## Scaffold
|
|
19
|
+
|
|
20
|
+
向 Remix 项目贡献以下文件:
|
|
21
|
+
|
|
22
|
+
| 目标路径 | 来源 | 说明 |
|
|
23
|
+
|---------|-----|-----|
|
|
24
|
+
| `src/game/levels/LevelTypes.ts` | `ref/LevelTypes.ts` | 全套类型定义(GridPoint / ArrowDirection / LevelPath / RawLevelJson / ParsedLevel / ThemeVariantConfig) |
|
|
25
|
+
| `src/game/levels/LevelParser.ts` | `ref/LevelParser.ts` | `parseLevelJson()` 解析函数 |
|
|
26
|
+
|
|
27
|
+
## Imports
|
|
28
|
+
|
|
29
|
+
本 skill 无外部依赖(纯数据结构,不依赖 Phaser 或其他 skill)。
|
|
30
|
+
|
|
31
|
+
## 关键类型
|
|
32
|
+
|
|
33
|
+
### RawLevelJson(原始关卡格式)
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
type RawLevelJson = {
|
|
37
|
+
name: number | string; // 关卡序号
|
|
38
|
+
row: number; // 棋盘行数
|
|
39
|
+
col: number; // 棋盘列数
|
|
40
|
+
arrows: (number | string)[][][]; // 路径点数组(Cocos 格式,y 向上)
|
|
41
|
+
levelTime: number; // 关卡时限(秒,0 = 无时限)
|
|
42
|
+
background?: { imageKey, dataUrl?, opacity? };
|
|
43
|
+
};
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### ParsedLevel(规范化格式)
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
type ParsedLevel = {
|
|
50
|
+
index: number; // 关卡序号
|
|
51
|
+
rows: number;
|
|
52
|
+
cols: number;
|
|
53
|
+
paths: LevelPath[]; // 解析后的所有路径
|
|
54
|
+
timeSeconds: number; // 关卡时限
|
|
55
|
+
background?: { imageKey, dataUrl?, opacity? };
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
type LevelPath = {
|
|
59
|
+
points: GridPoint[]; // 路径拐角点坐标(Phaser 坐标系,y 向下)
|
|
60
|
+
head: GridPoint; // 箭头末端格子
|
|
61
|
+
direction: ArrowDirection; // 箭头方向(从末段方向推导)
|
|
62
|
+
indices: number[]; // 覆盖的所有格子的 row-major 索引(y * cols + x)
|
|
63
|
+
color?: string; // 路径颜色(十六进制字符串)
|
|
64
|
+
};
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Recipe
|
|
68
|
+
|
|
69
|
+
| 决策 | 原因 |
|
|
70
|
+
|------|------|
|
|
71
|
+
| **两格式设计** | `RawLevelJson`(Cocos 导出格式)与 `ParsedLevel`(游戏可用格式)分离,保留原始数据可溯源;`parseLevelJson()` 在边界统一处理坐标翻转和离散化,不让业务层感知格式差异 |
|
|
72
|
+
| **Y 轴翻转集中在解析层** | Cocos 坐标系 y 向上,Phaser/Three.js 坐标系 y 向下;在解析器统一翻转,其他所有组件只需使用 Phaser 坐标系,不再各自处理 |
|
|
73
|
+
| **路径离散化(indices 数组)** | 预计算路径覆盖的所有格子索引,避免碰撞检测时重复计算;`indices` 是 row-major 线性索引,方便 Set 查找 |
|
|
74
|
+
| **纯数据结构,无引擎依赖** | 类型定义和解析器不依赖 Phaser;可在 Node.js 测试环境(vitest)中直接使用 |
|
|
75
|
+
|
|
76
|
+
## Adapter
|
|
77
|
+
|
|
78
|
+
- **Role**: `levelDataFormat` — 路径消除玩法关卡数据类型定义与解析器
|
|
79
|
+
- **Provides**: `RawLevelJson`、`ParsedLevel`、`LevelPath`、`GridPoint`、`ArrowDirection` 类型,`parseLevelJson()` / `parseLevelFor3D()` 函数
|
|
80
|
+
- **Requires**: 无(纯数据结构,无运行时依赖)
|
|
81
|
+
- **Consumed by**: `level_state.aicomponent`(LevelManager 加载关卡)、`path_renderer.aicomponent`(绘制 ParsedLevel.paths)、`path_input_handler.aicomponent`(输入判断)、`level_data_validator.aivalidator`、`gameplay_unit_test.aivalidator`
|
|
82
|
+
- **Integration point**: `src/game/levels/LevelTypes.ts` + `src/game/levels/LevelParser.ts` —— 所有使用关卡数据的组件从此处 import 类型
|
|
83
|
+
|
|
84
|
+
## Skill Definition
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
tools:
|
|
88
|
+
- read_file
|
|
89
|
+
- write_file
|
|
90
|
+
inputs:
|
|
91
|
+
- source: src/game/levels/LevelTypes.ts
|
|
92
|
+
- source: src/game/levels/LevelParser.ts
|
|
93
|
+
outputs:
|
|
94
|
+
- levelTypes: GridPoint / ArrowDirection / LevelPath / RawLevelJson / ParsedLevel / ThemeVariantConfig
|
|
95
|
+
- levelParser: parseLevelJson() function
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 注意事项
|
|
99
|
+
|
|
100
|
+
- Cocos 坐标系 y 轴向上(0 在底部),Phaser 坐标系 y 轴向下(0 在顶部)
|
|
101
|
+
- `parseLevelJson()` 在解析时自动完成翻转:`phaserY = rows - 1 - cocosY`
|
|
102
|
+
- `indices` 数组包含路径覆盖的所有格子(含中间格),用于碰撞检测
|
|
103
|
+
|
|
104
|
+
## 3D 坐标系支持(Three.js)
|
|
105
|
+
|
|
106
|
+
本 skill 支持两种坐标系输出:
|
|
107
|
+
|
|
108
|
+
| 坐标系 | 适用引擎 | 说明 |
|
|
109
|
+
|--------|---------|------|
|
|
110
|
+
| `phaser-y-down` | Phaser 3 | 2D 屏幕坐标,y 轴向下,单位为像素 |
|
|
111
|
+
| `threejs-xz` | Three.js | 3D XZ 平面坐标,X 向右 / Z 向下(俯视),Y=0 |
|
|
112
|
+
|
|
113
|
+
### 坐标映射关系
|
|
114
|
+
|
|
115
|
+
由于 Phaser 的 `(x, y_down)` 和 Three.js 俯视的 `(x, z_down)` 语义一致:
|
|
116
|
+
- Phaser `GridPoint.x` → Three.js `position.x`
|
|
117
|
+
- Phaser `GridPoint.y` → Three.js `position.z`
|
|
118
|
+
- Three.js `position.y` 固定为 0(地面高度)
|
|
119
|
+
|
|
120
|
+
### 方向角度映射
|
|
121
|
+
|
|
122
|
+
| Direction | 2D (rotation, 图片朝上) | 3D (rotation.y, 模型朝+Z) |
|
|
123
|
+
|-----------|----------------------|--------------------------|
|
|
124
|
+
| Up | 0 | π |
|
|
125
|
+
| Right | π/2 | π/2 |
|
|
126
|
+
| Down | π | 0 |
|
|
127
|
+
| Left | -π/2 | -π/2 |
|
|
128
|
+
|
|
129
|
+
### 使用示例(Three.js)
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
import { parseLevelFor3D } from "./LevelParser";
|
|
133
|
+
import { directionToAngleY, directionToDelta3D } from "./LevelTypes";
|
|
134
|
+
import type { GridPoint, LevelPath } from "./LevelTypes";
|
|
135
|
+
|
|
136
|
+
const level = parseLevelFor3D(rawJson);
|
|
137
|
+
const cellSize = 1.0; // Three.js 世界单位
|
|
138
|
+
|
|
139
|
+
// 将 GridPoint 转为世界坐标
|
|
140
|
+
function cellToWorld(pt: GridPoint): { x: number; y: number; z: number } {
|
|
141
|
+
return { x: pt.x * cellSize, y: 0, z: pt.y * cellSize };
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// 设置模型方向
|
|
145
|
+
mesh.rotation.y = directionToAngleY(path.direction);
|
|
146
|
+
|
|
147
|
+
// 计算滑出位移
|
|
148
|
+
const delta = directionToDelta3D(path.direction);
|
|
149
|
+
const slideDistance = stepsToExit * cellSize;
|
|
150
|
+
mesh.position.x += delta.dx * slideDistance;
|
|
151
|
+
mesh.position.z += delta.dz * slideDistance;
|
|
152
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "arrow_path_data_format.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "gameplay",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": { "zh": "箭头路径关卡数据格式", "en": "Arrow path level data format" },
|
|
8
|
+
"tags": ["level-data", "parser", "types", "json", "path", "arrow", "cocos-format", "threejs", "3d", "xz-plane"],
|
|
9
|
+
"bindingRoles": ["levelDataFormat"],
|
|
10
|
+
"coordinateSystems": ["phaser-y-down", "threejs-xz"],
|
|
11
|
+
"scaffold": {
|
|
12
|
+
"files": {
|
|
13
|
+
"src/game/levels/LevelTypes.ts": {
|
|
14
|
+
"source": "ref/LevelTypes.ts",
|
|
15
|
+
"mode": "full",
|
|
16
|
+
"weight": 10
|
|
17
|
+
},
|
|
18
|
+
"src/game/levels/LevelParser.ts": {
|
|
19
|
+
"source": "ref/LevelParser.ts",
|
|
20
|
+
"mode": "full",
|
|
21
|
+
"weight": 10
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"exports": [
|
|
26
|
+
{ "name": "GridPoint", "kind": "type", "location": "src/game/levels/LevelTypes.ts" },
|
|
27
|
+
{ "name": "ArrowDirection", "kind": "enum", "location": "src/game/levels/LevelTypes.ts" },
|
|
28
|
+
{ "name": "LevelPath", "kind": "type", "location": "src/game/levels/LevelTypes.ts" },
|
|
29
|
+
{ "name": "RawLevelJson", "kind": "type", "location": "src/game/levels/LevelTypes.ts" },
|
|
30
|
+
{ "name": "ParsedLevel", "kind": "type", "location": "src/game/levels/LevelTypes.ts" },
|
|
31
|
+
{ "name": "ThemeVariantConfig","kind": "interface","location": "src/game/levels/LevelTypes.ts" },
|
|
32
|
+
{ "name": "parseLevelJson", "kind": "function", "location": "src/game/levels/LevelParser.ts" },
|
|
33
|
+
{ "name": "CoordinateSystem", "kind": "type", "location": "src/game/levels/LevelTypes.ts" },
|
|
34
|
+
{ "name": "GridPoint3D", "kind": "type", "location": "src/game/levels/LevelTypes.ts" },
|
|
35
|
+
{ "name": "directionToAngleY", "kind": "function", "location": "src/game/levels/LevelTypes.ts" },
|
|
36
|
+
{ "name": "directionToDelta3D","kind": "function", "location": "src/game/levels/LevelTypes.ts" },
|
|
37
|
+
{ "name": "parseLevelFor3D", "kind": "function", "location": "src/game/levels/LevelParser.ts" }
|
|
38
|
+
],
|
|
39
|
+
"neutralDescriptor": {
|
|
40
|
+
"geometry": "structured data types for a grid-based level format with polyline paths and directional arrowheads",
|
|
41
|
+
"layers": ["data-schema", "json-parser", "coordinate-transform"],
|
|
42
|
+
"replaceable": ["coordinate system convention", "JSON format flavor"]
|
|
43
|
+
},
|
|
44
|
+
"usageHints": [
|
|
45
|
+
"RawLevelJson 是从 Cocos Creator 导出的原始关卡 JSON 格式(y 轴向上)",
|
|
46
|
+
"parseLevelJson() 负责将 Cocos 坐标翻转为 Phaser 坐标(y 从上往下)",
|
|
47
|
+
"ParsedLevel.paths 是已经离散化的路径,包含 indices(格子索引)和 direction",
|
|
48
|
+
"支持两种坐标系:phaser-y-down(2D 屏幕)和 threejs-xz(3D XZ 平面),通过 parseLevelFor3D() 解析",
|
|
49
|
+
"directionToAngleY() 提供 Three.js Y 轴旋转角度映射,假设模型默认朝向 +Z",
|
|
50
|
+
"directionToDelta3D() 提供 3D 方向位移向量,用于计算滑出路径"
|
|
51
|
+
],
|
|
52
|
+
"files": {
|
|
53
|
+
"skill": "SKILL.md",
|
|
54
|
+
"levelTypes": "ref/LevelTypes.ts",
|
|
55
|
+
"levelParser": "ref/LevelParser.ts"
|
|
56
|
+
}
|
|
57
|
+
}
|