@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,35 @@
|
|
|
1
|
+
# tween-animation-2d — 2D Tween Animation
|
|
2
|
+
|
|
3
|
+
Programmatic smooth transitions for position, scale, rotation, and opacity. Uses easing functions to create polished UI and game feel.
|
|
4
|
+
|
|
5
|
+
## Easing Functions
|
|
6
|
+
|
|
7
|
+
| Name | Effect | Best For |
|
|
8
|
+
|------|--------|----------|
|
|
9
|
+
| `linear` | Constant speed | Progress bars, counters |
|
|
10
|
+
| `easeIn` | Slow start, fast end | Objects falling, accelerating |
|
|
11
|
+
| `easeOut` | Fast start, slow end | Objects landing, decelerating |
|
|
12
|
+
| `easeInOut` | Smooth start and end | UI panels, modal transitions |
|
|
13
|
+
| `bounce` | Elastic bounce at end | Button press, item pickup |
|
|
14
|
+
| `elastic` | Spring overshoot | Score popup, notification |
|
|
15
|
+
|
|
16
|
+
## Common Presets
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
// Scale pop-in (item spawn)
|
|
20
|
+
{ property: 'scale', from: 0, to: 1, duration: 300, easing: 'elastic' }
|
|
21
|
+
|
|
22
|
+
// Fade out
|
|
23
|
+
{ property: 'alpha', from: 1, to: 0, duration: 200, easing: 'easeIn' }
|
|
24
|
+
|
|
25
|
+
// Float up (score text)
|
|
26
|
+
{ property: 'y', from: 0, to: -60, duration: 800, easing: 'easeOut' }
|
|
27
|
+
|
|
28
|
+
// Bounce in
|
|
29
|
+
{ property: 'scale', from: 1.2, to: 1, duration: 400, easing: 'bounce' }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Engine References
|
|
33
|
+
|
|
34
|
+
- **PlayCanvas**: `ref/playcanvas.js` — uses `pc.Tween`
|
|
35
|
+
- **Phaser 3**: `ref/phaser.js` — uses `this.tweens.add()`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "tween-animation-2d.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "animation",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": { "zh": "2D 缓动动画", "en": "2D Tween Animation" },
|
|
8
|
+
"tags": ["animation", "tween", "easing", "2d", "playcanvas", "phaser"],
|
|
9
|
+
"generation": {
|
|
10
|
+
"animationType": "tween",
|
|
11
|
+
"engineSupport": ["playcanvas", "phaser", "html5"],
|
|
12
|
+
"parameters": {
|
|
13
|
+
"property": "string — position|scale|alpha|rotation",
|
|
14
|
+
"from": "number|object — starting value",
|
|
15
|
+
"to": "number|object — target value",
|
|
16
|
+
"duration": "number — milliseconds",
|
|
17
|
+
"easing": "string — linear|easeIn|easeOut|easeInOut|bounce|elastic",
|
|
18
|
+
"delay": "number — ms before starting (default: 0)",
|
|
19
|
+
"loop": "boolean — whether to repeat (default: false)",
|
|
20
|
+
"yoyo": "boolean — reverse direction on repeat"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": {
|
|
24
|
+
"skill": "SKILL.md",
|
|
25
|
+
"playcanvas": "ref/playcanvas.js",
|
|
26
|
+
"phaser": "ref/phaser.js"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// tween-animation-2d — Phaser 3 implementation
|
|
2
|
+
|
|
3
|
+
// Scale pop-in
|
|
4
|
+
scene.tweens.add({
|
|
5
|
+
targets: gameObject,
|
|
6
|
+
scaleX: { from: 0, to: 1 },
|
|
7
|
+
scaleY: { from: 0, to: 1 },
|
|
8
|
+
duration: 300,
|
|
9
|
+
ease: 'Elastic.Out',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
// Fade out
|
|
13
|
+
scene.tweens.add({
|
|
14
|
+
targets: gameObject,
|
|
15
|
+
alpha: { from: 1, to: 0 },
|
|
16
|
+
duration: 200,
|
|
17
|
+
ease: 'Linear',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// Float up (score text)
|
|
21
|
+
scene.tweens.add({
|
|
22
|
+
targets: gameObject,
|
|
23
|
+
y: gameObject.y - 60,
|
|
24
|
+
alpha: 0,
|
|
25
|
+
duration: 800,
|
|
26
|
+
ease: 'Cubic.Out',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Phaser ease name mapping
|
|
30
|
+
const PHASER_EASING = {
|
|
31
|
+
linear: 'Linear',
|
|
32
|
+
easeIn: 'Cubic.In',
|
|
33
|
+
easeOut: 'Cubic.Out',
|
|
34
|
+
easeInOut: 'Cubic.InOut',
|
|
35
|
+
bounce: 'Bounce.Out',
|
|
36
|
+
elastic: 'Elastic.Out',
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
function tween(scene, target, { property, to, duration, easing = 'easeOut', delay = 0, yoyo = false, loop = false }) {
|
|
40
|
+
return scene.tweens.add({
|
|
41
|
+
targets: target,
|
|
42
|
+
[property]: to,
|
|
43
|
+
duration,
|
|
44
|
+
ease: PHASER_EASING[easing] ?? 'Cubic.Out',
|
|
45
|
+
delay,
|
|
46
|
+
yoyo,
|
|
47
|
+
repeat: loop ? -1 : 0,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// tween-animation-2d — PlayCanvas implementation
|
|
2
|
+
// Requires pc.TweenManager plugin (or use the built-in pc.app.tween if available)
|
|
3
|
+
|
|
4
|
+
// Scale pop-in example
|
|
5
|
+
entity.setLocalScale(0, 0, 1);
|
|
6
|
+
entity.tween(entity.getLocalScale())
|
|
7
|
+
.to({ x: 1, y: 1, z: 1 }, 0.3, pc.ElasticOut)
|
|
8
|
+
.start();
|
|
9
|
+
|
|
10
|
+
// Fade out example
|
|
11
|
+
entity.tween(entity.script.sprite)
|
|
12
|
+
.to({ opacity: 0 }, 0.2, pc.Linear)
|
|
13
|
+
.start();
|
|
14
|
+
|
|
15
|
+
// Float up (score text)
|
|
16
|
+
entity.tween(entity.getLocalPosition())
|
|
17
|
+
.to({ y: entity.getLocalPosition().y + 60 }, 0.8, pc.QuadOut)
|
|
18
|
+
.start();
|
|
19
|
+
|
|
20
|
+
// Helper for common easing aliases
|
|
21
|
+
const EASING = {
|
|
22
|
+
linear: pc.Linear,
|
|
23
|
+
easeIn: pc.QuadIn,
|
|
24
|
+
easeOut: pc.QuadOut,
|
|
25
|
+
easeInOut: pc.QuadInOut,
|
|
26
|
+
bounce: pc.BounceOut,
|
|
27
|
+
elastic: pc.ElasticOut,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function tween(entity, { property, from, to, duration, easing = 'easeOut', delay = 0 }) {
|
|
31
|
+
const ease = EASING[easing] ?? pc.QuadOut;
|
|
32
|
+
return entity.tween(from)
|
|
33
|
+
.to(to, duration / 1000, ease)
|
|
34
|
+
.delay(delay / 1000)
|
|
35
|
+
.start();
|
|
36
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: typescript_module_patterns.aicomponent
|
|
3
|
+
description: TypeScript 项目中资源导入模式、模块声明模板和常见编译错误的修复指南。帮助 Agent 在第一次就写出正确的 import 代码,避免 TS 编译报错。
|
|
4
|
+
triggers: TypeScript 编译错误,TS2580,TS2300,TS2307,Cannot find module,require,import 资源,模块声明,globals.d.ts
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# TypeScript 模块模式与错误修复指南
|
|
8
|
+
|
|
9
|
+
## 说明
|
|
10
|
+
|
|
11
|
+
在 Phaser + Webpack + TypeScript 项目中,资源导入是最常见的出错点。本 skill 提供:
|
|
12
|
+
|
|
13
|
+
1. **标准模块声明模板**(`globals.d.ts`)
|
|
14
|
+
2. **资源导入的正确方式**(ES import vs require vs 路径字符串)
|
|
15
|
+
3. **常见 TS 错误→修复映射表**(遇到错误直接查表)
|
|
16
|
+
|
|
17
|
+
## Scaffold
|
|
18
|
+
|
|
19
|
+
| 目标路径 | 来源 | 说明 |
|
|
20
|
+
|---------|-----|------|
|
|
21
|
+
| `globals.d.ts` | `ref/globals.d.ts` | 所有资源类型的模块声明 |
|
|
22
|
+
|
|
23
|
+
## 模块声明模板(globals.d.ts)
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
// 图片资源
|
|
27
|
+
declare module "*.png" {
|
|
28
|
+
const src: string;
|
|
29
|
+
export default src;
|
|
30
|
+
}
|
|
31
|
+
declare module "*.webp" {
|
|
32
|
+
const src: string;
|
|
33
|
+
export default src;
|
|
34
|
+
}
|
|
35
|
+
declare module "*.jpg" {
|
|
36
|
+
const src: string;
|
|
37
|
+
export default src;
|
|
38
|
+
}
|
|
39
|
+
declare module "*.svg" {
|
|
40
|
+
const src: string;
|
|
41
|
+
export default src;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 音频资源
|
|
45
|
+
declare module "*.mp3" {
|
|
46
|
+
const src: string;
|
|
47
|
+
export default src;
|
|
48
|
+
}
|
|
49
|
+
declare module "*.ogg" {
|
|
50
|
+
const src: string;
|
|
51
|
+
export default src;
|
|
52
|
+
}
|
|
53
|
+
declare module "*.wav" {
|
|
54
|
+
const src: string;
|
|
55
|
+
export default src;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// JSON(TypeScript 内置支持,但需要 tsconfig 中 resolveJsonModule: true)
|
|
59
|
+
// declare module "*.json" { ... } // 通常不需要
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 资源导入正确方式
|
|
63
|
+
|
|
64
|
+
### ✅ 正确:ES import(推荐)
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import carImage from "assets/images/car.webp";
|
|
68
|
+
import clickSfx from "assets/sounds/click.mp3";
|
|
69
|
+
import levelData from "./levels/level1.json";
|
|
70
|
+
|
|
71
|
+
// 在 Phaser 中使用
|
|
72
|
+
this.load.image("car", carImage); // carImage 是 webpack 生成的文件 URL
|
|
73
|
+
this.load.audio("click", clickSfx);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**原理**:webpack 的 `asset/resource` 规则处理这些文件,输出到 dist/ 并返回最终 URL 字符串。TypeScript 通过 `globals.d.ts` 中的模块声明知道 `import *.webp` 返回 `string` 类型。
|
|
77
|
+
|
|
78
|
+
### ❌ 错误:require(ESM 项目不可用)
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
// ❌ 报错:TS2580: Cannot find name 'require'
|
|
82
|
+
this.load.image("car", require("assets/images/car.webp"));
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**原因**:项目 tsconfig 配置为 `module: "esnext"`,不支持 CommonJS 的 `require`。
|
|
86
|
+
|
|
87
|
+
**修复**:改为 ES import:
|
|
88
|
+
```typescript
|
|
89
|
+
import carImage from "assets/images/car.webp";
|
|
90
|
+
this.load.image("car", carImage);
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### ❌ 错误:路径字符串(webpack 无法追踪)
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
// ❌ 运行时 404:webpack 不会打包这个文件
|
|
97
|
+
this.load.image("car", "./assets/images/car.webp");
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**原因**:字符串路径不会被 webpack 的 module 规则处理,文件不会被复制到 dist/。
|
|
101
|
+
|
|
102
|
+
## 常见错误→修复映射表
|
|
103
|
+
|
|
104
|
+
| TS 错误码 | 错误信息 | 原因 | 修复 |
|
|
105
|
+
|-----------|---------|------|------|
|
|
106
|
+
| **TS2580** | `Cannot find name 'require'` | ESM 项目用了 CJS 语法 | 改为 `import x from "..."` |
|
|
107
|
+
| **TS2300** | `Duplicate identifier 'xxx'` | 同一变量名被 import 两次 | 删除重复的 import 行 |
|
|
108
|
+
| **TS2307** | `Cannot find module '*.webp'` | 缺少模块声明 | `globals.d.ts` 加 `declare module "*.webp"` |
|
|
109
|
+
| **TS2307** | `Cannot find module './Foo'` | 文件路径错误或缺少 | 检查文件是否存在,大小写是否一致 |
|
|
110
|
+
| **TS7016** | `Could not find declaration file for module 'xxx'` | 第三方库缺少类型 | 安装 `@types/xxx` 或创建 `.d.ts` |
|
|
111
|
+
| **TS1259** | `Module can only be default-imported using esModuleInterop` | 导入 CJS 模块格式不对 | tsconfig 加 `"esModuleInterop": true` |
|
|
112
|
+
| **TS2339** | `Property 'xxx' does not exist on type` | 类型不匹配 | 添加类型断言 `as any` 或修正类型 |
|
|
113
|
+
| **TS2345** | `Argument of type 'X' is not assignable to 'Y'` | 类型不兼容 | 检查接口定义,或用 `as any` 临时绕过 |
|
|
114
|
+
|
|
115
|
+
## import 规范
|
|
116
|
+
|
|
117
|
+
### 导入顺序(推荐)
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
// 1. 第三方库
|
|
121
|
+
import * as Phaser from "phaser";
|
|
122
|
+
import { Scene } from "phaser";
|
|
123
|
+
|
|
124
|
+
// 2. 内部模块(绝对路径或 alias)
|
|
125
|
+
import { GameConfig } from "../GameConfig";
|
|
126
|
+
import { computeUiLayout } from "../utils/UiLayout";
|
|
127
|
+
|
|
128
|
+
// 3. 资源文件(放最后)
|
|
129
|
+
import carImage from "assets/images/car.webp";
|
|
130
|
+
import clickSfx from "assets/sounds/click.mp3";
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 避免重复 import
|
|
134
|
+
|
|
135
|
+
每个模块/资源只 import 一次,放在文件顶部。如果需要在多处使用,import 一次后传参:
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
// ✅ 正确:顶部 import 一次
|
|
139
|
+
import carImage from "assets/images/car.webp";
|
|
140
|
+
|
|
141
|
+
// 然后在代码中多次引用变量 carImage
|
|
142
|
+
this.load.image("car", carImage);
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
// ❌ 错误:多次 import 同一模块
|
|
147
|
+
import carImage from "assets/images/car.webp";
|
|
148
|
+
import carImage from "assets/images/car.webp"; // TS2300: Duplicate identifier
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## tsconfig.json 关键配置
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"compilerOptions": {
|
|
156
|
+
"module": "esnext",
|
|
157
|
+
"moduleResolution": "bundler",
|
|
158
|
+
"esModuleInterop": true,
|
|
159
|
+
"resolveJsonModule": true,
|
|
160
|
+
"allowSyntheticDefaultImports": true,
|
|
161
|
+
"paths": {
|
|
162
|
+
"assets/*": ["./assets/*"]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
| 配置项 | 作用 | 缺少的后果 |
|
|
169
|
+
|--------|------|-----------|
|
|
170
|
+
| `module: "esnext"` | 使用 ES module 语法 | 无法用 `import` |
|
|
171
|
+
| `moduleResolution: "bundler"` | webpack 兼容的模块解析 | 路径解析失败 |
|
|
172
|
+
| `esModuleInterop: true` | 允许 `import x from "cjs-lib"` | CJS 库导入报错 |
|
|
173
|
+
| `resolveJsonModule: true` | 允许 `import data from "./x.json"` | JSON import 报错 |
|
|
174
|
+
| `paths.assets/*` | alias 路径映射 | `import from "assets/..."` TS 报错 |
|
|
175
|
+
|
|
176
|
+
## Recipe
|
|
177
|
+
|
|
178
|
+
| 决策 | 原因 |
|
|
179
|
+
|------|------|
|
|
180
|
+
| **独立知识 skill** | TS 资源导入报错是高频问题,与引擎 skill 分离后 Agent 可按需加载,不污染 phaser/threejs skill 的主流程 |
|
|
181
|
+
| **错误码→修复映射表** | Agent 遇到 TS 编译报错时可直接查表定位修复,避免反复试错 |
|
|
182
|
+
| **偏向文档而非 Scaffold** | 模块声明本质是一份固定模板;核心价值在于教 Agent 正确的 import 模式,比直接写文件更重要 |
|
|
183
|
+
|
|
184
|
+
## Adapter
|
|
185
|
+
|
|
186
|
+
- **Role**: `tsModulePatterns` — TypeScript 资源导入规范与错误修复知识库
|
|
187
|
+
- **Provides**: `globals.d.ts` 模块声明模板、正确 import 模式示例、TS 错误码→修复映射表
|
|
188
|
+
- **Requires**: `webpack_build.aicomponent`(alias 需与 tsconfig `paths` 一致)、`phaser.aicomponent`(提供 tsconfig.json 骨架)
|
|
189
|
+
- **Consumed by**: 所有在 Webpack + TypeScript 项目中导入图片/音频资源时遇到 TS 报错的 skill
|
|
190
|
+
- **Integration point**: 根目录 `globals.d.ts` —— 所有资源 `import` 的类型声明来源
|
|
191
|
+
|
|
192
|
+
## Imports
|
|
193
|
+
|
|
194
|
+
- `webpack_build.aicomponent`(配合使用:webpack alias 与 tsconfig paths 需一致)
|
|
195
|
+
- `phaser.aicomponent`(配合使用:提供 tsconfig.json 骨架)
|
|
196
|
+
|
|
197
|
+
## Skill Definition
|
|
198
|
+
|
|
199
|
+
```yaml
|
|
200
|
+
tools:
|
|
201
|
+
- read_file
|
|
202
|
+
- write_file
|
|
203
|
+
inputs:
|
|
204
|
+
- source: ref/globals.d.ts
|
|
205
|
+
outputs:
|
|
206
|
+
- typeDeclaration: globals.d.ts module declarations
|
|
207
|
+
- patterns: correct import patterns for webpack + TypeScript
|
|
208
|
+
- errorFixMap: TS error code → fix mapping
|
|
209
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "typescript_module_patterns.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "infrastructure",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "TypeScript 模块模式与错误修复指南",
|
|
9
|
+
"en": "TypeScript module patterns & error fix guide"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"typescript",
|
|
13
|
+
"module",
|
|
14
|
+
"import",
|
|
15
|
+
"error-fix",
|
|
16
|
+
"infrastructure",
|
|
17
|
+
"dx"
|
|
18
|
+
],
|
|
19
|
+
"bindingRoles": [
|
|
20
|
+
"typeDeclaration"
|
|
21
|
+
],
|
|
22
|
+
"files": {
|
|
23
|
+
"skill": "SKILL.md",
|
|
24
|
+
"ref": [
|
|
25
|
+
"ref/globals.d.ts"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// 图片资源
|
|
2
|
+
declare module "*.png" {
|
|
3
|
+
const src: string;
|
|
4
|
+
export default src;
|
|
5
|
+
}
|
|
6
|
+
declare module "*.webp" {
|
|
7
|
+
const src: string;
|
|
8
|
+
export default src;
|
|
9
|
+
}
|
|
10
|
+
declare module "*.jpg" {
|
|
11
|
+
const src: string;
|
|
12
|
+
export default src;
|
|
13
|
+
}
|
|
14
|
+
declare module "*.svg" {
|
|
15
|
+
const src: string;
|
|
16
|
+
export default src;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 音频资源
|
|
20
|
+
declare module "*.mp3" {
|
|
21
|
+
const src: string;
|
|
22
|
+
export default src;
|
|
23
|
+
}
|
|
24
|
+
declare module "*.ogg" {
|
|
25
|
+
const src: string;
|
|
26
|
+
export default src;
|
|
27
|
+
}
|
|
28
|
+
declare module "*.wav" {
|
|
29
|
+
const src: string;
|
|
30
|
+
export default src;
|
|
31
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# ui-transition — UI Panel Transition Animation
|
|
2
|
+
|
|
3
|
+
Smooth enter/exit animations for UI panels, modals, HUD elements, and overlays.
|
|
4
|
+
|
|
5
|
+
## Transition Types
|
|
6
|
+
|
|
7
|
+
| Type | In Effect | Out Effect | Best For |
|
|
8
|
+
|------|-----------|------------|----------|
|
|
9
|
+
| `fade` | opacity 0→1 | opacity 1→0 | Overlays, modals |
|
|
10
|
+
| `slide-up` | y+offset→0 | 0→y-offset | Bottom sheets |
|
|
11
|
+
| `slide-down` | y-offset→0 | 0→y+offset | Top notifications |
|
|
12
|
+
| `slide-left` | x+offset→0 | 0→x-offset | Right panels |
|
|
13
|
+
| `slide-right` | x-offset→0 | 0→x+offset | Left panels |
|
|
14
|
+
| `scale` | scale 0→1 | scale 1→0 | Popups, tooltips |
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Default | Description |
|
|
19
|
+
|-----------|---------|-------------|
|
|
20
|
+
| `type` | `fade` | Transition style |
|
|
21
|
+
| `direction` | `in` | Enter or exit |
|
|
22
|
+
| `duration` | 200ms | Animation speed |
|
|
23
|
+
| `distance` | 30px | Slide distance |
|
|
24
|
+
| `ease` | `easeOut` (in) / `easeIn` (out) | Easing function |
|
|
25
|
+
| `onComplete` | — | Callback when done |
|
|
26
|
+
|
|
27
|
+
## Decision Notes
|
|
28
|
+
|
|
29
|
+
| Decision | Reason |
|
|
30
|
+
|----------|--------|
|
|
31
|
+
| 200ms default | Apple HIG and Material Design standard for UI transitions |
|
|
32
|
+
| Ease asymmetry | Enter: easeOut (fast start = responsive feel); Exit: easeIn (slow start = content lingers) |
|
|
33
|
+
| Slide distance 30px | Subtle movement; large values feel sluggish on mobile |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "ui-transition.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "animation",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": { "zh": "UI 面板过渡动画", "en": "UI Panel Transition Animation" },
|
|
8
|
+
"tags": ["animation", "ui", "transition", "fade", "slide", "panel", "playcanvas", "phaser"],
|
|
9
|
+
"generation": {
|
|
10
|
+
"animationType": "tween",
|
|
11
|
+
"engineSupport": ["playcanvas", "phaser", "html5"],
|
|
12
|
+
"parameters": {
|
|
13
|
+
"type": "string — fade|slide-up|slide-down|slide-left|slide-right|scale",
|
|
14
|
+
"direction": "string — in|out",
|
|
15
|
+
"duration": "number — ms (default: 200)"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": { "skill": "SKILL.md", "phaser": "ref/phaser.js" }
|
|
19
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// ui-transition — Phaser 3 implementation
|
|
2
|
+
|
|
3
|
+
const TRANSITIONS = {
|
|
4
|
+
fade: {
|
|
5
|
+
in: (t, obj, d) => ({ alpha: { from: 0, to: 1 }, duration: d, ease: 'Cubic.Out' }),
|
|
6
|
+
out: (t, obj, d) => ({ alpha: { from: 1, to: 0 }, duration: d, ease: 'Cubic.In' }),
|
|
7
|
+
},
|
|
8
|
+
'slide-up': {
|
|
9
|
+
in: (t, obj, d, dist = 30) => ({ y: { from: obj.y + dist, to: obj.y }, alpha: { from: 0, to: 1 }, duration: d, ease: 'Cubic.Out' }),
|
|
10
|
+
out: (t, obj, d, dist = 30) => ({ y: obj.y - dist, alpha: 0, duration: d, ease: 'Cubic.In' }),
|
|
11
|
+
},
|
|
12
|
+
'slide-down': {
|
|
13
|
+
in: (t, obj, d, dist = 30) => ({ y: { from: obj.y - dist, to: obj.y }, alpha: { from: 0, to: 1 }, duration: d, ease: 'Cubic.Out' }),
|
|
14
|
+
out: (t, obj, d, dist = 30) => ({ y: obj.y + dist, alpha: 0, duration: d, ease: 'Cubic.In' }),
|
|
15
|
+
},
|
|
16
|
+
'slide-left': {
|
|
17
|
+
in: (t, obj, d, dist = 30) => ({ x: { from: obj.x + dist, to: obj.x }, alpha: { from: 0, to: 1 }, duration: d, ease: 'Cubic.Out' }),
|
|
18
|
+
out: (t, obj, d, dist = 30) => ({ x: obj.x - dist, alpha: 0, duration: d, ease: 'Cubic.In' }),
|
|
19
|
+
},
|
|
20
|
+
scale: {
|
|
21
|
+
in: (t, obj, d) => ({ scaleX: { from: 0, to: obj.scaleX }, scaleY: { from: 0, to: obj.scaleY }, alpha: { from: 0, to: 1 }, duration: d, ease: 'Back.Out' }),
|
|
22
|
+
out: (t, obj, d) => ({ scaleX: 0, scaleY: 0, alpha: 0, duration: d, ease: 'Cubic.In' }),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
function uiTransition(scene, target, {
|
|
27
|
+
type = 'fade',
|
|
28
|
+
direction = 'in',
|
|
29
|
+
duration = 200,
|
|
30
|
+
distance = 30,
|
|
31
|
+
onComplete,
|
|
32
|
+
} = {}) {
|
|
33
|
+
const def = TRANSITIONS[type]?.[direction];
|
|
34
|
+
if (!def) return;
|
|
35
|
+
|
|
36
|
+
const config = def(scene, target, duration, distance);
|
|
37
|
+
config.targets = target;
|
|
38
|
+
if (onComplete) config.onComplete = onComplete;
|
|
39
|
+
|
|
40
|
+
scene.tweens.add(config);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Usage:
|
|
44
|
+
// uiTransition(this, panel, { type: 'slide-up', direction: 'in' });
|
|
45
|
+
// uiTransition(this, modal, { type: 'scale', direction: 'out', onComplete: () => modal.destroy() });
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ux_flow_spec.aiconfig
|
|
3
|
+
description: 试玩广告 UX 流程规范 - 定义 Loading → Tutorial → Gameplay → CTA 的完整用户流程
|
|
4
|
+
triggers: UX 流程,ux flow,用户体验,user experience,教程,tutorial,引导,onboarding,试玩流程,playable flow
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ux_flow_spec.aiconfig
|
|
8
|
+
|
|
9
|
+
试玩广告 UX 流程规范。定义从 Loading → Tutorial → Gameplay → CTA 的完整用户流程,包括每个阶段的时长预算、转场方式、交互模式。
|
|
10
|
+
|
|
11
|
+
### 流程概览
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Loading (≤3s) → Tutorial (≤8s) → Gameplay (≤30s) → Endcard/CTA
|
|
15
|
+
fade guided-tap free-play cta-button
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**核心原则:**
|
|
19
|
+
- 首次交互必须在 3 秒内发生(`firstInteractionWithin`)
|
|
20
|
+
- 教程阶段使用引导式点击(`guided-tap`),5 秒后可跳过
|
|
21
|
+
- Gameplay 阶段是核心体验区,关卡数与难度曲线联动
|
|
22
|
+
- Endcard 阶段展示 CTA,无时长限制
|
|
23
|
+
|
|
24
|
+
## Recipe
|
|
25
|
+
|
|
26
|
+
- **配置方式**:参数化(parametric)
|
|
27
|
+
- **核心参数**:
|
|
28
|
+
- `totalDuration`: `45` — 预期总时长(秒)
|
|
29
|
+
- `phases`: 四阶段配置数组
|
|
30
|
+
- `loading`: 最长 3 秒,fade 转场
|
|
31
|
+
- `tutorial`: 最长 8 秒,引导式点击,5 秒后可跳过
|
|
32
|
+
- `gameplay`: 最长 30 秒,3 个关卡
|
|
33
|
+
- `endcard`: 无时长限制,展示 CTA
|
|
34
|
+
- `firstInteractionWithin`: `3` — 首次交互必须在几秒内
|
|
35
|
+
- `ctaVisibility`: `"after-first-level"` — CTA 何时首次可见
|
|
36
|
+
- **可 fork 变体**:
|
|
37
|
+
- 极速体验:`totalDuration: 30`, tutorial `maxDuration: 3`, gameplay `levels: 2`
|
|
38
|
+
- 深度体验:`totalDuration: 60`, gameplay `maxDuration: 45, levels: 5`
|
|
39
|
+
- 无教程:移除 tutorial 阶段,直接进入 gameplay
|
|
40
|
+
|
|
41
|
+
**配置步骤:**
|
|
42
|
+
1. 读取项目的 `game/config.json`
|
|
43
|
+
2. 写入 `ux.flow` 配置块,包含 `totalDuration` 和 `phases` 数组
|
|
44
|
+
3. 写入 `ux.firstInteractionWithin` 控制首次交互时机
|
|
45
|
+
4. 设置 `ux.ctaVisibility` 与 CTA 配置联动
|
|
46
|
+
5. 验证各阶段 `maxDuration` 之和 ≤ `totalDuration`
|
|
47
|
+
|
|
48
|
+
## Result
|
|
49
|
+
|
|
50
|
+
- **产物**:修改 `game/config.json` 的 UX 流程配置块
|
|
51
|
+
- **格式**:JSON patch
|
|
52
|
+
- **目标键**:`ux.flow`
|
|
53
|
+
- **包含子键**:`totalDuration`, `phases`, `firstInteractionWithin`, `ctaVisibility`
|
|
54
|
+
|
|
55
|
+
## Binding
|
|
56
|
+
|
|
57
|
+
- **Binding Role**:`gameConfig`
|
|
58
|
+
- **挂载目标**:`game/config.json`
|
|
59
|
+
- **引用类型**:`config-key-value`
|
|
60
|
+
- **与其他 Skill 的关系**:
|
|
61
|
+
- 与 `difficulty_curve_designer.aiconfig` 联动:gameplay 阶段的 `levels` 应与 `totalLevels` 一致
|
|
62
|
+
- 与 `cta_platform_config.aiconfig` 联动:endcard 阶段的 CTA 配置
|
|
63
|
+
- 与 `playtest_report.aivalidator` 联动:试玩报告按此流程评估体验
|
|
64
|
+
|
|
65
|
+
## Skill Definition
|
|
66
|
+
|
|
67
|
+
tools:
|
|
68
|
+
- read
|
|
69
|
+
- write
|
|
70
|
+
prompt_extension: |
|
|
71
|
+
You are designing the UX flow for a playable ad (试玩广告).
|
|
72
|
+
The flow follows a strict 4-phase structure:
|
|
73
|
+
1. Loading (≤3s): Show a simple loading screen with brand logo. Use fade transition.
|
|
74
|
+
Player must be able to interact within 3 seconds of the ad loading.
|
|
75
|
+
2. Tutorial (≤8s): Guided-tap interaction showing the core mechanic.
|
|
76
|
+
Auto-skip after 5 seconds if no interaction. Keep it minimal.
|
|
77
|
+
3. Gameplay (≤30s): The core game experience, typically 3 levels.
|
|
78
|
+
This is where the difficulty curve and balance checks apply.
|
|
79
|
+
4. Endcard (no time limit): Show CTA button prominently.
|
|
80
|
+
Read game/config.json, write the ux.flow config block, and validate that
|
|
81
|
+
the sum of phase maxDurations does not exceed totalDuration.
|
|
82
|
+
Ensure firstInteractionWithin is set to 3 seconds or less.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "ux_flow_spec.aiconfig",
|
|
4
|
+
"bundleType": "aiconfig",
|
|
5
|
+
"category": "config",
|
|
6
|
+
"mode": "parametric",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "试玩广告 UX 流程规范",
|
|
9
|
+
"en": "Playable ads UX flow spec"
|
|
10
|
+
},
|
|
11
|
+
"tags": ["config", "ux", "flow", "user-experience", "playable-ads", "tutorial", "onboarding", "cta"],
|
|
12
|
+
"bindingRoles": ["gameConfig"],
|
|
13
|
+
"generation": {
|
|
14
|
+
"kind": "config-patch",
|
|
15
|
+
"params": {
|
|
16
|
+
"totalDuration": 45,
|
|
17
|
+
"phases": [
|
|
18
|
+
{ "name": "loading", "maxDuration": 3, "transition": "fade" },
|
|
19
|
+
{ "name": "tutorial", "maxDuration": 8, "interaction": "guided-tap", "skipAfter": 5 },
|
|
20
|
+
{ "name": "gameplay", "maxDuration": 30, "levels": 3 },
|
|
21
|
+
{ "name": "endcard", "maxDuration": 0, "cta": true }
|
|
22
|
+
],
|
|
23
|
+
"firstInteractionWithin": 3,
|
|
24
|
+
"ctaVisibility": "after-first-level"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"result": {
|
|
28
|
+
"configKey": "ux.flow",
|
|
29
|
+
"format": "json-patch"
|
|
30
|
+
},
|
|
31
|
+
"binding": {
|
|
32
|
+
"role": "gameConfig",
|
|
33
|
+
"target": "game/config.json",
|
|
34
|
+
"type": "config-key-value"
|
|
35
|
+
},
|
|
36
|
+
"files": {
|
|
37
|
+
"skill": "SKILL.md"
|
|
38
|
+
}
|
|
39
|
+
}
|