@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,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wave_difficulty.aiconfig
|
|
3
|
+
description: 波浪难度曲线配置封包 - 难度周期性起伏的参数配置,保持玩家长期参与感
|
|
4
|
+
triggers: 难度,difficulty,波浪,wave,曲线,curve,配置,config,周期,cycle,动态,dynamic
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wave_difficulty.aiconfig
|
|
8
|
+
|
|
9
|
+
波浪难度曲线配置封包。难度周期性起伏(难→易→难),避免单调线性递增导致的玩家流失。
|
|
10
|
+
|
|
11
|
+
## Recipe
|
|
12
|
+
|
|
13
|
+
- **配置方式**:参数化(parametric)
|
|
14
|
+
- **核心参数**:
|
|
15
|
+
- `difficultyMode`: `"wave"`
|
|
16
|
+
- `wavePeriod`: 3(每 3 关一个波峰)
|
|
17
|
+
- `minMoves`: 15(波谷步数)
|
|
18
|
+
- `maxMoves`: 35(波峰步数)
|
|
19
|
+
- **可 fork 变体**:
|
|
20
|
+
- 短周期:`wavePeriod: 2`,更频繁的难度变化
|
|
21
|
+
- 大振幅:`minMoves: 10, maxMoves: 40`
|
|
22
|
+
|
|
23
|
+
**配置步骤:**
|
|
24
|
+
1. 读取 `game/config.json`
|
|
25
|
+
2. 写入 `difficulty.curve = "wave"` 和周期参数
|
|
26
|
+
3. 更新 manifest
|
|
27
|
+
|
|
28
|
+
## Result
|
|
29
|
+
|
|
30
|
+
- **产物**:修改 `game/config.json` 键值
|
|
31
|
+
- **目标键**:`difficulty.curve = "wave"`
|
|
32
|
+
|
|
33
|
+
## Binding
|
|
34
|
+
|
|
35
|
+
- **Binding Role**:`gameConfig`
|
|
36
|
+
- **挂载目标**:`game/config.json`
|
|
37
|
+
- **引用类型**:`config-key-value`
|
|
38
|
+
|
|
39
|
+
## Skill Definition
|
|
40
|
+
|
|
41
|
+
tools:
|
|
42
|
+
- read
|
|
43
|
+
- write
|
|
44
|
+
prompt_extension: |
|
|
45
|
+
You are configuring a wave difficulty curve for a casual game.
|
|
46
|
+
Write the wave pattern parameters to game/config.json per the Recipe. Apply the Binding.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "wave_difficulty.aiconfig",
|
|
4
|
+
"bundleType": "aiconfig",
|
|
5
|
+
"category": "config",
|
|
6
|
+
"mode": "parametric",
|
|
7
|
+
"label": { "zh": "波浪难度曲线", "en": "Wave difficulty curve" },
|
|
8
|
+
"tags": ["config", "difficulty", "wave", "curve", "level", "dynamic"],
|
|
9
|
+
"bindingRoles": ["gameConfig"],
|
|
10
|
+
"generation": {
|
|
11
|
+
"kind": "config-patch",
|
|
12
|
+
"params": {
|
|
13
|
+
"difficultyMode": "wave",
|
|
14
|
+
"wavePeriod": 3,
|
|
15
|
+
"minMoves": 15,
|
|
16
|
+
"maxMoves": 35
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"result": {
|
|
20
|
+
"configKey": "difficulty.curve",
|
|
21
|
+
"configValue": "wave",
|
|
22
|
+
"format": "json-patch"
|
|
23
|
+
},
|
|
24
|
+
"binding": {
|
|
25
|
+
"role": "gameConfig",
|
|
26
|
+
"target": "game/config.json",
|
|
27
|
+
"type": "config-key-value",
|
|
28
|
+
"constraints": { "key": "difficulty.curve" }
|
|
29
|
+
},
|
|
30
|
+
"files": {
|
|
31
|
+
"skill": "SKILL.md"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: webpack_build.aicomponent
|
|
3
|
+
description: 通用 Webpack 5 构建配置。提供 TypeScript + Phaser 项目的标准 webpack 打包方案,支持开发模式热更新和生产模式单文件构建。不依赖任何特定投放平台。
|
|
4
|
+
triggers: 需要初始化项目构建配置、配置 webpack、设置开发服务器、打包生产产物时触发。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 通用 Webpack 构建配置(Generic Webpack Build)
|
|
8
|
+
|
|
9
|
+
## 说明
|
|
10
|
+
|
|
11
|
+
为 Phaser + TypeScript 试玩广告项目提供**不依赖任何平台**的标准构建方案:
|
|
12
|
+
|
|
13
|
+
- **开发模式**(`pnpm dev`):webpack-dev-server + 热更新 + source map
|
|
14
|
+
- **生产模式**(`pnpm build`):压缩打包,输出到 `dist/`
|
|
15
|
+
|
|
16
|
+
本 skill 替代 `playable_scripts_build.aicomponent`(后者绑死 `@tencent/playable-scripts`)。
|
|
17
|
+
|
|
18
|
+
## Scaffold
|
|
19
|
+
|
|
20
|
+
| 目标路径 | 来源 | 说明 |
|
|
21
|
+
|---------|-----|------|
|
|
22
|
+
| `webpack.config.js` | `ref/webpack.config.js` | Webpack 5 完整配置 |
|
|
23
|
+
| `package.json` (merge) | `ref/package.json` | scripts + devDependencies |
|
|
24
|
+
|
|
25
|
+
## 文件详解
|
|
26
|
+
|
|
27
|
+
### webpack.config.js
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
const path = require('path');
|
|
31
|
+
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
32
|
+
|
|
33
|
+
module.exports = {
|
|
34
|
+
entry: './src/index.ts',
|
|
35
|
+
output: {
|
|
36
|
+
filename: 'bundle.js',
|
|
37
|
+
path: path.resolve(__dirname, 'dist'),
|
|
38
|
+
clean: true,
|
|
39
|
+
},
|
|
40
|
+
resolve: {
|
|
41
|
+
extensions: ['.ts', '.js', '.json'],
|
|
42
|
+
alias: {
|
|
43
|
+
assets: path.resolve(__dirname, 'assets'),
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
module: {
|
|
47
|
+
rules: [
|
|
48
|
+
{
|
|
49
|
+
test: /\.ts$/,
|
|
50
|
+
use: 'ts-loader',
|
|
51
|
+
exclude: /node_modules/,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
test: /\.css$/,
|
|
55
|
+
use: ['style-loader', 'css-loader'],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
test: /\.(png|jpg|jpeg|webp|svg|gif)$/,
|
|
59
|
+
type: 'asset/resource',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
test: /\.(mp3|ogg|wav|m4a)$/,
|
|
63
|
+
type: 'asset/resource',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
test: /\.json$/,
|
|
67
|
+
type: 'json',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
plugins: [
|
|
72
|
+
new HtmlWebpackPlugin({
|
|
73
|
+
template: './src/index.html',
|
|
74
|
+
}),
|
|
75
|
+
],
|
|
76
|
+
devServer: {
|
|
77
|
+
static: './dist',
|
|
78
|
+
hot: true,
|
|
79
|
+
open: true,
|
|
80
|
+
port: 3000,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### package.json(需合并的字段)
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"scripts": {
|
|
90
|
+
"dev": "webpack serve --mode development",
|
|
91
|
+
"build": "webpack --mode production"
|
|
92
|
+
},
|
|
93
|
+
"devDependencies": {
|
|
94
|
+
"typescript": "^5.3.0",
|
|
95
|
+
"webpack": "^5.90.0",
|
|
96
|
+
"webpack-cli": "^5.1.0",
|
|
97
|
+
"webpack-dev-server": "^5.0.0",
|
|
98
|
+
"ts-loader": "^9.5.0",
|
|
99
|
+
"html-webpack-plugin": "^5.6.0",
|
|
100
|
+
"css-loader": "^6.10.0",
|
|
101
|
+
"style-loader": "^3.3.0"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## 使用方式
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pnpm install # 安装依赖
|
|
110
|
+
pnpm dev # 启动开发服务器(localhost:3000,自动打开浏览器)
|
|
111
|
+
pnpm build # 生产构建(输出到 dist/)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 资源处理规则
|
|
115
|
+
|
|
116
|
+
| 文件类型 | Webpack 处理方式 | 代码中引用方式 |
|
|
117
|
+
|---------|-----------------|--------------|
|
|
118
|
+
| `.ts` | ts-loader 编译 | `import { Foo } from "./foo"` |
|
|
119
|
+
| `.css` | style-loader + css-loader | `import "./index.css"` |
|
|
120
|
+
| `.png/.webp/.jpg` | asset/resource(输出文件,返回 URL) | `import img from "assets/images/foo.webp"` |
|
|
121
|
+
| `.mp3/.ogg/.wav` | asset/resource | `import sfx from "assets/sounds/foo.mp3"` |
|
|
122
|
+
| `.json` | 内置 JSON 模块 | `import data from "./levels.json"` |
|
|
123
|
+
|
|
124
|
+
## alias 配置
|
|
125
|
+
|
|
126
|
+
`assets` alias 指向项目根目录的 `assets/` 文件夹:
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
// 以下两种写法等价:
|
|
130
|
+
import car from "assets/images/car.webp"; // ✅ 使用 alias
|
|
131
|
+
import car from "../../assets/images/car.webp"; // ✅ 相对路径(不推荐)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**注意**:使用 alias 时 `tsconfig.json` 中也需要对应的 `paths` 配置:
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"compilerOptions": {
|
|
138
|
+
"paths": {
|
|
139
|
+
"assets/*": ["./assets/*"]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## 常见问题
|
|
146
|
+
|
|
147
|
+
### Q: 开发模式修改代码后浏览器没有更新?
|
|
148
|
+
A: 确保 `devServer.hot: true`,且没有缓存问题。尝试强制刷新(Ctrl+Shift+R)。
|
|
149
|
+
|
|
150
|
+
### Q: 生产构建体积太大?
|
|
151
|
+
A: webpack production 模式默认开启 terser 压缩。如需进一步优化:
|
|
152
|
+
- 确认 Phaser 没有被重复打包(使用 `externals` 或 CDN)
|
|
153
|
+
- 检查是否有大图片被 inline(asset/resource 不 inline,已正确配置)
|
|
154
|
+
|
|
155
|
+
### Q: 如何同时支持多渠道构建?
|
|
156
|
+
A: 如需批量构建,参考 `builds.config.js` 模式(见 `playable_scripts_build.aicomponent`),或自行扩展 webpack 配置为多 entry/多 output。
|
|
157
|
+
|
|
158
|
+
## Imports
|
|
159
|
+
|
|
160
|
+
- `phaser.aicomponent`(配合使用:提供项目骨架文件)
|
|
161
|
+
|
|
162
|
+
## Skill Definition
|
|
163
|
+
|
|
164
|
+
```yaml
|
|
165
|
+
tools:
|
|
166
|
+
- read_file
|
|
167
|
+
- write_file
|
|
168
|
+
inputs:
|
|
169
|
+
- source: ref/webpack.config.js
|
|
170
|
+
- source: ref/package.json
|
|
171
|
+
outputs:
|
|
172
|
+
- webpackConfig: webpack.config.js
|
|
173
|
+
- buildScripts: dev / build npm scripts
|
|
174
|
+
- buildDeps: webpack + ts-loader + plugins devDependencies
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Recipe
|
|
178
|
+
|
|
179
|
+
| 决策 | 原因 |
|
|
180
|
+
|------|------|
|
|
181
|
+
| **与引擎 skill 分离** | 构建工具链与游戏运行时无关;分离允许在不改动 phaser/threejs skill 的情况下替换构建方案 |
|
|
182
|
+
| **替代私有包** | 原 `@tencent/playable-scripts` 是黑盒私有包,无法在非腾讯环境使用;标准 webpack 5 可控、可调试、社区生态完整 |
|
|
183
|
+
| **`asset/resource` 类型** | 图片、音频文件输出为独立文件(非 inline base64),保持产物体积可控,且 URL 字符串类型与 Phaser `load.image()` API 直接兼容 |
|
|
184
|
+
| **单 entry 单 output** | 试玩广告以单 HTML+JS 为目标,多 entry 需求由上层管线(builds.config.js)扩展,不写入本 skill |
|
|
185
|
+
|
|
186
|
+
## Adapter
|
|
187
|
+
|
|
188
|
+
- **Role**: `buildToolchain` — Webpack 5 开发与生产构建管线
|
|
189
|
+
- **Provides**: `webpack.config.js` 配置、`pnpm dev`(dev server)、`pnpm build`(生产构建)、资源 alias 映射 `assets/*`
|
|
190
|
+
- **Requires**: 与 `phaser.aicomponent` 或 `threejs.aicomponent` 配套(提供项目骨架入口文件)
|
|
191
|
+
- **Consumed by**: 所有需要本地开发和构建的 Remix 项目(作为工程基座,无上游 skill 依赖)
|
|
192
|
+
- **Integration point**: 根目录 `webpack.config.js` + `package.json` scripts,`phaser.aicomponent` 的 `src/index.ts` 作为 webpack entry
|
|
193
|
+
|
|
194
|
+
## 替代说明
|
|
195
|
+
|
|
196
|
+
本 skill 替代 `playable_scripts_build.aicomponent`:
|
|
197
|
+
|
|
198
|
+
| 维度 | playable_scripts_build | webpack_build(本 skill) |
|
|
199
|
+
|------|----------------------|--------------------------|
|
|
200
|
+
| 构建工具 | @tencent/playable-scripts(私有包) | webpack 5(公开、标准) |
|
|
201
|
+
| 环境要求 | 腾讯内部 npm registry | 标准 npm/pnpm |
|
|
202
|
+
| 多渠道构建 | 内置 | 需自行扩展(或不需要) |
|
|
203
|
+
| 灵活性 | 黑盒 | 完全可控的 webpack.config.js |
|
|
204
|
+
| 社区支持 | 无 | webpack 社区生态 |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "webpack_build.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "build",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "通用 Webpack 构建配置",
|
|
9
|
+
"en": "Generic Webpack build configuration"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"build",
|
|
13
|
+
"webpack",
|
|
14
|
+
"dev-server",
|
|
15
|
+
"typescript",
|
|
16
|
+
"bundler",
|
|
17
|
+
"infrastructure"
|
|
18
|
+
],
|
|
19
|
+
"bindingRoles": [
|
|
20
|
+
"buildSystem"
|
|
21
|
+
],
|
|
22
|
+
"files": {
|
|
23
|
+
"skill": "SKILL.md",
|
|
24
|
+
"ref": [
|
|
25
|
+
"ref/webpack.config.js",
|
|
26
|
+
"ref/package.json"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"dev": "webpack serve --mode development",
|
|
4
|
+
"build": "webpack --mode production"
|
|
5
|
+
},
|
|
6
|
+
"devDependencies": {
|
|
7
|
+
"typescript": "^5.3.0",
|
|
8
|
+
"webpack": "^5.90.0",
|
|
9
|
+
"webpack-cli": "^5.1.0",
|
|
10
|
+
"webpack-dev-server": "^5.0.0",
|
|
11
|
+
"ts-loader": "^9.5.0",
|
|
12
|
+
"html-webpack-plugin": "^5.6.0",
|
|
13
|
+
"css-loader": "^6.10.0",
|
|
14
|
+
"style-loader": "^3.3.0"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
entry: './src/index.ts',
|
|
6
|
+
output: {
|
|
7
|
+
filename: 'bundle.js',
|
|
8
|
+
path: path.resolve(__dirname, 'dist'),
|
|
9
|
+
clean: true,
|
|
10
|
+
},
|
|
11
|
+
resolve: {
|
|
12
|
+
extensions: ['.ts', '.js', '.json'],
|
|
13
|
+
alias: {
|
|
14
|
+
assets: path.resolve(__dirname, 'assets'),
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
module: {
|
|
18
|
+
rules: [
|
|
19
|
+
{
|
|
20
|
+
test: /\.ts$/,
|
|
21
|
+
use: 'ts-loader',
|
|
22
|
+
exclude: /node_modules/,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
test: /\.css$/,
|
|
26
|
+
use: ['style-loader', 'css-loader'],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
test: /\.(png|jpg|jpeg|webp|svg|gif)$/,
|
|
30
|
+
type: 'asset/resource',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
test: /\.(mp3|ogg|wav|m4a)$/,
|
|
34
|
+
type: 'asset/resource',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
test: /\.json$/,
|
|
38
|
+
type: 'json',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
plugins: [
|
|
43
|
+
new HtmlWebpackPlugin({
|
|
44
|
+
template: './src/index.html',
|
|
45
|
+
}),
|
|
46
|
+
],
|
|
47
|
+
devServer: {
|
|
48
|
+
static: './dist',
|
|
49
|
+
hot: true,
|
|
50
|
+
open: true,
|
|
51
|
+
port: 3000,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: win_anim_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
|
+
- 产物文件:`win_anim.mp3`
|
|
19
|
+
- 在 Preloader.ts 中作为 `sfxWinAnim` key 加载
|
|
20
|
+
|
|
21
|
+
## Binding
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"role": "sfxWinAnim",
|
|
26
|
+
"target": "assets/sounds/win_anim.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 "sparkling victory animation sound, magical glitter effect" \
|
|
39
|
+
--duration 2 \
|
|
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/win_anim.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: win_anim.mp3
|
|
59
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "win_anim_sfx.aiaudio",
|
|
4
|
+
"bundleType": "aiaudio",
|
|
5
|
+
"category": "audio",
|
|
6
|
+
"mode": "generative",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "胜利动画音效",
|
|
9
|
+
"en": "Win animation SFX"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"audio",
|
|
13
|
+
"sfx",
|
|
14
|
+
"win",
|
|
15
|
+
"animation",
|
|
16
|
+
"sparkle",
|
|
17
|
+
"victory"
|
|
18
|
+
],
|
|
19
|
+
"bindingRoles": [
|
|
20
|
+
"sfxWinAnim"
|
|
21
|
+
],
|
|
22
|
+
"generation": {
|
|
23
|
+
"kind": "sfx",
|
|
24
|
+
"prompt": "sparkling victory animation sound, magical glitter effect",
|
|
25
|
+
"duration": 2,
|
|
26
|
+
"loop": false,
|
|
27
|
+
"referenceAudio": "ref/win_anim.mp3",
|
|
28
|
+
"platformSkill": "playcraft-audio-generation"
|
|
29
|
+
},
|
|
30
|
+
"result": {
|
|
31
|
+
"outputFile": "ref/win_anim.mp3",
|
|
32
|
+
"format": "mp3",
|
|
33
|
+
"constraints": {
|
|
34
|
+
"maxDuration": 2
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"binding": {
|
|
38
|
+
"role": "sfxWinAnim",
|
|
39
|
+
"target": "assets/sounds/win_anim.mp3",
|
|
40
|
+
"type": "audio-asset-reference"
|
|
41
|
+
},
|
|
42
|
+
"files": {
|
|
43
|
+
"skill": "SKILL.md",
|
|
44
|
+
"asset": "ref/win_anim.mp3"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: win_dot.aiimage
|
|
3
|
+
description: 通关胜利钻石动画中使用的闪光粒子图片。
|
|
4
|
+
triggers: 需要生成胜利动画粒子图片时触发。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 胜利粒子
|
|
8
|
+
|
|
9
|
+
## Recipe
|
|
10
|
+
|
|
11
|
+
生成提示词见 manifest.json generation.prompt。
|
|
12
|
+
- model: google/imagen-3.0-generate-002(默认,见 manifest.json generation.platformSkill)
|
|
13
|
+
- format: webp, 透明背景
|
|
14
|
+
|
|
15
|
+
## Result
|
|
16
|
+
|
|
17
|
+
- 产物文件:`win_dot.webp`
|
|
18
|
+
- 在 Preloader.ts 中作为 `winParticleAsset` key 加载
|
|
19
|
+
|
|
20
|
+
## Binding
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"role": "winParticleAsset",
|
|
25
|
+
"target": "assets/win_dot.webp",
|
|
26
|
+
"type": "image-asset-reference"
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 生成方式
|
|
31
|
+
|
|
32
|
+
Platform Skill: `playcraft-image-generation`
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# 1. 生成图片(参考 ref/ 中的参考图)
|
|
36
|
+
playcraft tools generate-image \
|
|
37
|
+
--prompt "small glowing dot particle for victory animation, bright colorful sparkle" \
|
|
38
|
+
--aspect-ratio 1:1 \
|
|
39
|
+
--reference-image ${SKILL_DIR}/ref/win_dot.png \
|
|
40
|
+
--image-model google/imagen-3.0-generate-002 \
|
|
41
|
+
--output ta-workspace/raw.png
|
|
42
|
+
|
|
43
|
+
# 2. 后处理(去白底 + 格式转换)
|
|
44
|
+
playcraft image remove-background --input ta-workspace/raw.png --output ta-workspace/trimmed.png
|
|
45
|
+
playcraft image convert --input ta-workspace/trimmed.png --output ta-workspace/win_dot.webp --quality 85
|
|
46
|
+
|
|
47
|
+
# 3. 将产物写入 sandbox 对应路径(见 binding.target)
|
|
48
|
+
```
|
|
49
|
+
## Skill Definition
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
tools:
|
|
53
|
+
- generate_image
|
|
54
|
+
inputs:
|
|
55
|
+
- prompt: see manifest.json
|
|
56
|
+
outputs:
|
|
57
|
+
- image: win_dot.webp
|
|
58
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "win_dot.aiimage",
|
|
4
|
+
"bundleType": "aiimage",
|
|
5
|
+
"category": "visual",
|
|
6
|
+
"mode": "generative",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "胜利粒子",
|
|
9
|
+
"en": "Win particle dot"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"visual",
|
|
13
|
+
"particle",
|
|
14
|
+
"win",
|
|
15
|
+
"sparkle",
|
|
16
|
+
"dot"
|
|
17
|
+
],
|
|
18
|
+
"bindingRoles": [
|
|
19
|
+
"winParticleAsset"
|
|
20
|
+
],
|
|
21
|
+
"generation": {
|
|
22
|
+
"kind": "image",
|
|
23
|
+
"prompt": "small glowing dot particle for victory animation, bright colorful sparkle",
|
|
24
|
+
"aspectRatio": "1:1",
|
|
25
|
+
"model": "google/imagen-3.0-generate-002",
|
|
26
|
+
"referenceImage": "ref/win_dot.png",
|
|
27
|
+
"platformSkill": "playcraft-image-generation"
|
|
28
|
+
},
|
|
29
|
+
"result": {
|
|
30
|
+
"outputFile": "ref/win_dot.webp",
|
|
31
|
+
"format": "webp",
|
|
32
|
+
"constraints": {
|
|
33
|
+
"minWidth": 32,
|
|
34
|
+
"minHeight": 32
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"binding": {
|
|
38
|
+
"role": "winParticleAsset",
|
|
39
|
+
"target": "assets/win_dot.webp",
|
|
40
|
+
"type": "image-asset-reference"
|
|
41
|
+
},
|
|
42
|
+
"files": {
|
|
43
|
+
"skill": "SKILL.md",
|
|
44
|
+
"asset": "ref/win_dot.webp",
|
|
45
|
+
"assetPng": "ref/win_dot.png"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: win_result_panel.aiimage
|
|
3
|
+
description: 关卡通关后显示的胜利面板图片,是试玩广告转化的关键视觉资产。
|
|
4
|
+
triggers: 需要生成或替换胜利结果面板图片时触发。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 胜利结果面板
|
|
8
|
+
|
|
9
|
+
## Recipe
|
|
10
|
+
|
|
11
|
+
生成提示词见 manifest.json generation.prompt。
|
|
12
|
+
- model: google/imagen-3.0-generate-002(默认,见 manifest.json generation.platformSkill)
|
|
13
|
+
- format: webp, 透明背景
|
|
14
|
+
|
|
15
|
+
## Result
|
|
16
|
+
|
|
17
|
+
- 产物文件:`win.webp`
|
|
18
|
+
- 在 Preloader.ts 中作为 `successFeedbackPanel` key 加载
|
|
19
|
+
|
|
20
|
+
## Binding
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"role": "successFeedbackPanel",
|
|
25
|
+
"target": "assets/win.webp",
|
|
26
|
+
"type": "image-asset-reference"
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 生成方式
|
|
31
|
+
|
|
32
|
+
Platform Skill: `playcraft-image-generation`
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# 1. 生成图片(参考 ref/ 中的参考图)
|
|
36
|
+
playcraft tools generate-image \
|
|
37
|
+
--prompt "winning celebration panel for a mobile game, bright and exciting, trophy or star icons, positive energy" \
|
|
38
|
+
--aspect-ratio 1:1 \
|
|
39
|
+
--reference-image ${SKILL_DIR}/ref/win.png \
|
|
40
|
+
--image-model google/imagen-3.0-generate-002 \
|
|
41
|
+
--output ta-workspace/raw.png
|
|
42
|
+
|
|
43
|
+
# 2. 后处理(去白底 + 格式转换)
|
|
44
|
+
playcraft image remove-background --input ta-workspace/raw.png --output ta-workspace/trimmed.png
|
|
45
|
+
playcraft image convert --input ta-workspace/trimmed.png --output ta-workspace/win.webp --quality 85
|
|
46
|
+
|
|
47
|
+
# 3. 将产物写入 sandbox 对应路径(见 binding.target)
|
|
48
|
+
```
|
|
49
|
+
## Skill Definition
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
tools:
|
|
53
|
+
- generate_image
|
|
54
|
+
inputs:
|
|
55
|
+
- prompt: see manifest.json
|
|
56
|
+
outputs:
|
|
57
|
+
- image: win.webp
|
|
58
|
+
```
|