@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,298 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import { BoardLayout3D, type BoardLayout3DResult } from "./BoardLayout3D";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 3D 棋盘渲染器配置
|
|
6
|
+
*/
|
|
7
|
+
export interface BoardRendererConfig {
|
|
8
|
+
/** 格子材质(默认:深蓝半透明) */
|
|
9
|
+
cellMaterial?: THREE.Material;
|
|
10
|
+
/** 格子相对于 cellSize 的填充比例(默认 0.92,即 8% 间隙) */
|
|
11
|
+
cellPadding?: number;
|
|
12
|
+
/** 格子地面 Y 坐标(默认 0.005,略高于地面防止 z-fighting) */
|
|
13
|
+
cellY?: number;
|
|
14
|
+
/** 是否创建网格线(默认 false) */
|
|
15
|
+
showGridLines?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const DEFAULT_CONFIG: Required<BoardRendererConfig> = {
|
|
19
|
+
cellMaterial: null!, // 运行时创建默认材质
|
|
20
|
+
cellPadding: 0.92,
|
|
21
|
+
cellY: 0.005,
|
|
22
|
+
showGridLines: false,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Three.js 3D 棋盘渲染器
|
|
27
|
+
*
|
|
28
|
+
* 建立在 BoardLayout3D 纯数学层之上,负责实际的 3D 渲染:
|
|
29
|
+
* - 创建网格地面(PlaneGeometry cells)
|
|
30
|
+
* - 在 boardGroup 中管理所有棋盘物体(统一平移/抖动)
|
|
31
|
+
* - 放置/移除 3D 物体到指定格子
|
|
32
|
+
* - 基于 Set<number> 的批量可见性管理
|
|
33
|
+
* - Raycaster 命中检测(遍历 userData.pathIndex)
|
|
34
|
+
* - 棋盘抖动动画
|
|
35
|
+
*
|
|
36
|
+
* 坐标系:棋盘在 XZ 平面,以原点为中心(来自 BoardLayout3D)。
|
|
37
|
+
*/
|
|
38
|
+
export class BoardRenderer3D {
|
|
39
|
+
private scene: THREE.Scene;
|
|
40
|
+
private layout: BoardLayout3D;
|
|
41
|
+
private config: Required<BoardRendererConfig>;
|
|
42
|
+
|
|
43
|
+
/** 棋盘根 Group(所有棋盘元素的容器,用于统一 shake) */
|
|
44
|
+
private boardGroup: THREE.Group;
|
|
45
|
+
|
|
46
|
+
/** 格子底板 Mesh 列表 */
|
|
47
|
+
private cellMeshes: THREE.Mesh[] = [];
|
|
48
|
+
|
|
49
|
+
/** 按 cellIndex 存储放置的物体 */
|
|
50
|
+
private placedObjects: Map<number, THREE.Object3D> = new Map();
|
|
51
|
+
|
|
52
|
+
/** 按 pathIndex 分组的物体索引(用于批量可见性) */
|
|
53
|
+
private pathToIndices: Map<number, number[]> = new Map();
|
|
54
|
+
|
|
55
|
+
constructor(scene: THREE.Scene, layout: BoardLayout3D, config?: BoardRendererConfig) {
|
|
56
|
+
this.scene = scene;
|
|
57
|
+
this.layout = layout;
|
|
58
|
+
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
59
|
+
|
|
60
|
+
// 创建默认格子材质
|
|
61
|
+
if (!this.config.cellMaterial) {
|
|
62
|
+
this.config.cellMaterial = new THREE.MeshStandardMaterial({
|
|
63
|
+
color: 0x2d2d4e,
|
|
64
|
+
roughness: 0.9,
|
|
65
|
+
metalness: 0,
|
|
66
|
+
transparent: true,
|
|
67
|
+
opacity: 0.6,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
this.boardGroup = new THREE.Group();
|
|
72
|
+
this.scene.add(this.boardGroup);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 创建网格底板
|
|
77
|
+
*/
|
|
78
|
+
createGrid(): void {
|
|
79
|
+
const layoutResult = this.layout.getLayout();
|
|
80
|
+
const { cellSize, rows, cols } = layoutResult;
|
|
81
|
+
const padding = this.config.cellPadding;
|
|
82
|
+
const cellGeoSize = cellSize * padding;
|
|
83
|
+
|
|
84
|
+
const cellGeo = new THREE.PlaneGeometry(cellGeoSize, cellGeoSize);
|
|
85
|
+
|
|
86
|
+
for (let r = 0; r < rows; r++) {
|
|
87
|
+
for (let c = 0; c < cols; c++) {
|
|
88
|
+
const cell = new THREE.Mesh(cellGeo.clone(), (this.config.cellMaterial as THREE.Material).clone());
|
|
89
|
+
cell.rotation.x = -Math.PI / 2;
|
|
90
|
+
const pos = this.layout.getCellWorldPos(c, r);
|
|
91
|
+
cell.position.set(pos.x, this.config.cellY, pos.z);
|
|
92
|
+
cell.receiveShadow = true;
|
|
93
|
+
this.boardGroup.add(cell);
|
|
94
|
+
this.cellMeshes.push(cell);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* 在指定格子放置一个 3D 物体
|
|
101
|
+
* @param col 列
|
|
102
|
+
* @param row 行
|
|
103
|
+
* @param object 要放置的物体
|
|
104
|
+
* @param tag 附加到 userData 的标签(如 { pathIndex: 0, cellIndex: 5 })
|
|
105
|
+
*/
|
|
106
|
+
placeObject(col: number, row: number, object: THREE.Object3D, tag?: Record<string, any>): void {
|
|
107
|
+
const pos = this.layout.getCellWorldPos(col, row);
|
|
108
|
+
object.position.set(pos.x, 0, pos.z);
|
|
109
|
+
|
|
110
|
+
if (tag) {
|
|
111
|
+
Object.assign(object.userData, tag);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const index = this.layout.cellToIndex(col, row);
|
|
115
|
+
this.placedObjects.set(index, object);
|
|
116
|
+
this.boardGroup.add(object);
|
|
117
|
+
|
|
118
|
+
// 维护 pathIndex → indices 映射
|
|
119
|
+
const pathIndex = tag?.pathIndex;
|
|
120
|
+
if (typeof pathIndex === "number") {
|
|
121
|
+
const indices = this.pathToIndices.get(pathIndex) || [];
|
|
122
|
+
indices.push(index);
|
|
123
|
+
this.pathToIndices.set(pathIndex, indices);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* 移除指定格子的物体
|
|
129
|
+
*/
|
|
130
|
+
removeObject(col: number, row: number): void {
|
|
131
|
+
const index = this.layout.cellToIndex(col, row);
|
|
132
|
+
const obj = this.placedObjects.get(index);
|
|
133
|
+
if (obj) {
|
|
134
|
+
this.boardGroup.remove(obj);
|
|
135
|
+
this.placedObjects.delete(index);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* 获取指定格子的物体
|
|
141
|
+
*/
|
|
142
|
+
getObject(col: number, row: number): THREE.Object3D | undefined {
|
|
143
|
+
const index = this.layout.cellToIndex(col, row);
|
|
144
|
+
return this.placedObjects.get(index);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 获取某个 pathIndex 对应的所有物体
|
|
149
|
+
*/
|
|
150
|
+
getObjectsByPath(pathIndex: number): THREE.Object3D[] {
|
|
151
|
+
const indices = this.pathToIndices.get(pathIndex) || [];
|
|
152
|
+
const objects: THREE.Object3D[] = [];
|
|
153
|
+
for (const idx of indices) {
|
|
154
|
+
const obj = this.placedObjects.get(idx);
|
|
155
|
+
if (obj) objects.push(obj);
|
|
156
|
+
}
|
|
157
|
+
return objects;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* 批量更新可见性
|
|
162
|
+
* @param hiddenIndices 需要隐藏的 cellIndex 集合
|
|
163
|
+
*/
|
|
164
|
+
updateVisibility(hiddenIndices: Set<number>): void {
|
|
165
|
+
for (const [index, obj] of this.placedObjects) {
|
|
166
|
+
obj.visible = !hiddenIndices.has(index);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* 按 pathIndex 批量更新可见性
|
|
172
|
+
* @param hiddenPaths 需要隐藏的 pathIndex 集合
|
|
173
|
+
*/
|
|
174
|
+
updateVisibilityByPath(hiddenPaths: Set<number>): void {
|
|
175
|
+
for (const [pathIndex, indices] of this.pathToIndices) {
|
|
176
|
+
const hidden = hiddenPaths.has(pathIndex);
|
|
177
|
+
for (const idx of indices) {
|
|
178
|
+
const obj = this.placedObjects.get(idx);
|
|
179
|
+
if (obj) obj.visible = !hidden;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Raycaster 命中检测
|
|
186
|
+
* @param raycaster 射线
|
|
187
|
+
* @param excludeIndices 排除的 cellIndex 集合
|
|
188
|
+
* @returns 命中的 { index, pathIndex, object } 或 null
|
|
189
|
+
*/
|
|
190
|
+
hitTest(
|
|
191
|
+
raycaster: THREE.Raycaster,
|
|
192
|
+
excludeIndices?: Set<number>,
|
|
193
|
+
): { index: number; pathIndex: number; object: THREE.Object3D } | null {
|
|
194
|
+
// 收集所有可被检测的 Mesh
|
|
195
|
+
const meshes: THREE.Mesh[] = [];
|
|
196
|
+
for (const [index, obj] of this.placedObjects) {
|
|
197
|
+
if (excludeIndices?.has(index)) continue;
|
|
198
|
+
if (!obj.visible) continue;
|
|
199
|
+
obj.traverse((child) => {
|
|
200
|
+
if (child instanceof THREE.Mesh) {
|
|
201
|
+
meshes.push(child);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const intersects = raycaster.intersectObjects(meshes, false);
|
|
207
|
+
if (intersects.length === 0) return null;
|
|
208
|
+
|
|
209
|
+
// 沿 parent chain 查找含 pathIndex 的 userData
|
|
210
|
+
let current: THREE.Object3D | null = intersects[0].object;
|
|
211
|
+
while (current && current !== this.boardGroup) {
|
|
212
|
+
if (current.userData && typeof current.userData.pathIndex === "number") {
|
|
213
|
+
// 找到对应的 cellIndex
|
|
214
|
+
for (const [idx, obj] of this.placedObjects) {
|
|
215
|
+
if (obj === current) {
|
|
216
|
+
return { index: idx, pathIndex: current.userData.pathIndex, object: current };
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
// 如果没有精确匹配到 placedObjects 的顶层,仍然返回
|
|
220
|
+
return { index: -1, pathIndex: current.userData.pathIndex, object: current };
|
|
221
|
+
}
|
|
222
|
+
current = current.parent;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* 棋盘抖动动画
|
|
230
|
+
* @param dx X 方向强度倍数
|
|
231
|
+
* @param dz Z 方向强度倍数
|
|
232
|
+
* @param duration 持续时间 ms(默认 300)
|
|
233
|
+
* @param intensity 基础强度(默认 0.08)
|
|
234
|
+
*/
|
|
235
|
+
shake(dx: number = 1, dz: number = 1, duration: number = 300, intensity: number = 0.08): void {
|
|
236
|
+
const originalX = this.boardGroup.position.x;
|
|
237
|
+
const originalZ = this.boardGroup.position.z;
|
|
238
|
+
const startTime = performance.now();
|
|
239
|
+
|
|
240
|
+
const animate = () => {
|
|
241
|
+
const elapsed = performance.now() - startTime;
|
|
242
|
+
const progress = Math.min(elapsed / duration, 1);
|
|
243
|
+
|
|
244
|
+
if (progress < 1) {
|
|
245
|
+
const decay = 1 - progress;
|
|
246
|
+
const offsetX = Math.sin(progress * Math.PI * 6) * intensity * decay * dx;
|
|
247
|
+
const offsetZ = Math.sin(progress * Math.PI * 6) * intensity * decay * dz;
|
|
248
|
+
this.boardGroup.position.x = originalX + offsetX;
|
|
249
|
+
this.boardGroup.position.z = originalZ + offsetZ;
|
|
250
|
+
requestAnimationFrame(animate);
|
|
251
|
+
} else {
|
|
252
|
+
this.boardGroup.position.x = originalX;
|
|
253
|
+
this.boardGroup.position.z = originalZ;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
requestAnimationFrame(animate);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* 获取棋盘根 Group
|
|
261
|
+
*/
|
|
262
|
+
getBoardGroup(): THREE.Group {
|
|
263
|
+
return this.boardGroup;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* 获取底层 BoardLayout3D 实例
|
|
268
|
+
*/
|
|
269
|
+
getLayout(): BoardLayout3D {
|
|
270
|
+
return this.layout;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* 清空所有棋盘内容(格子 + 物体),保留 boardGroup
|
|
275
|
+
*/
|
|
276
|
+
clear(): void {
|
|
277
|
+
for (const cell of this.cellMeshes) {
|
|
278
|
+
this.boardGroup.remove(cell);
|
|
279
|
+
cell.geometry.dispose();
|
|
280
|
+
(cell.material as THREE.Material).dispose();
|
|
281
|
+
}
|
|
282
|
+
this.cellMeshes = [];
|
|
283
|
+
|
|
284
|
+
for (const obj of this.placedObjects.values()) {
|
|
285
|
+
this.boardGroup.remove(obj);
|
|
286
|
+
}
|
|
287
|
+
this.placedObjects.clear();
|
|
288
|
+
this.pathToIndices.clear();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* 完全销毁(包括 boardGroup 自身)
|
|
293
|
+
*/
|
|
294
|
+
dispose(): void {
|
|
295
|
+
this.clear();
|
|
296
|
+
this.scene.remove(this.boardGroup);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: heart_lives.aicomponent
|
|
3
|
+
description: 心形生命值指示器。显示玩家当前剩余生命值(心形图标行),扣命时播放消失动画。
|
|
4
|
+
triggers: 需要在游戏 HUD 中显示生命值时触发。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 心形生命值指示器(Heart Lives Indicator)
|
|
8
|
+
|
|
9
|
+
## Scaffold
|
|
10
|
+
|
|
11
|
+
`src/game/scenes/GameUI/HeartDisplay.ts`
|
|
12
|
+
|
|
13
|
+
## Recipe
|
|
14
|
+
|
|
15
|
+
| 决策 | 原因 |
|
|
16
|
+
|------|------|
|
|
17
|
+
| **心形图标行而非数字** | 心形图标是游戏生命值的通用视觉语言,比数字"3"更直观;玩家一眼看出还剩几条命 |
|
|
18
|
+
| **扣命时播放消失动画** | 静态更新(直接消失)感觉突兀;动画反馈让玩家意识到刚刚发生了扣命事件 |
|
|
19
|
+
|
|
20
|
+
## Adapter
|
|
21
|
+
|
|
22
|
+
- **Role**: `heartLivesDisplay` — 心形生命值 UI 指示器
|
|
23
|
+
- **Provides**: `HeartDisplay` 类(初始化 N 个心形 + `loseHeart()` 扣命动画)
|
|
24
|
+
- **Requires**: `phaser.aicomponent`(硬依赖)
|
|
25
|
+
- **Consumed by**: `top_ui_bar.aicomponent` 或 `game_scene.aicomponent`(生命值变化时调用 `loseHeart()`)
|
|
26
|
+
- **Integration point**: `src/game/scenes/GameUI/HeartDisplay.ts` → 顶部 UI 条或 GameScene 中实例化
|
|
27
|
+
|
|
28
|
+
## Imports
|
|
29
|
+
|
|
30
|
+
- `phaser.aicomponent`(硬依赖)
|
|
31
|
+
|
|
32
|
+
## Skill Definition
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
tools:
|
|
36
|
+
- read_file
|
|
37
|
+
- write_file
|
|
38
|
+
inputs:
|
|
39
|
+
- source: src/game/scenes/GameUI/HeartDisplay.ts
|
|
40
|
+
outputs:
|
|
41
|
+
- heartDisplay: HeartDisplay class
|
|
42
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "heart_lives.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "component",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": { "zh": "心形生命值显示", "en": "Heart lives indicator" },
|
|
8
|
+
"tags": ["ui", "lives", "hearts", "health", "indicator"],
|
|
9
|
+
"bindingRoles": ["livesIndicator"],
|
|
10
|
+
"scaffold": {
|
|
11
|
+
"files": {
|
|
12
|
+
"src/game/scenes/GameUI/HeartDisplay.ts": { "source": "ref/HeartDisplay.ts", "mode": "full", "weight": 10 }
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"imports": [
|
|
16
|
+
{ "slot": "engine", "pinAtomId": "phaser.aicomponent", "edgeKind": "requires", "bindAs": "engine" }
|
|
17
|
+
],
|
|
18
|
+
"exports": [
|
|
19
|
+
{ "name": "HeartDisplay", "kind": "class", "location": "src/game/scenes/GameUI/HeartDisplay.ts" }
|
|
20
|
+
],
|
|
21
|
+
"neutralDescriptor": {
|
|
22
|
+
"geometry": "row of heart icons indicating player lives remaining, with animation on loss"
|
|
23
|
+
},
|
|
24
|
+
"files": { "skill": "SKILL.md", "heartDisplay": "ref/HeartDisplay.ts" }
|
|
25
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as Phaser from "phaser";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 生命值(爱心)显示组件。
|
|
5
|
+
* 使用参数化心形曲线渲染一行爱心图标,表示剩余生命值。
|
|
6
|
+
*/
|
|
7
|
+
export class HeartDisplay {
|
|
8
|
+
private heartGraphics: Phaser.GameObjects.Graphics[] = [];
|
|
9
|
+
private heartStates: boolean[] = [];
|
|
10
|
+
private heartDrawSize: number;
|
|
11
|
+
|
|
12
|
+
constructor(
|
|
13
|
+
scene: Phaser.Scene,
|
|
14
|
+
parent: Phaser.GameObjects.Container,
|
|
15
|
+
options: {
|
|
16
|
+
startX: number;
|
|
17
|
+
y: number;
|
|
18
|
+
spacing: number;
|
|
19
|
+
drawSize: number;
|
|
20
|
+
maxLives: number;
|
|
21
|
+
initialLives: number;
|
|
22
|
+
},
|
|
23
|
+
) {
|
|
24
|
+
this.heartDrawSize = options.drawSize;
|
|
25
|
+
|
|
26
|
+
for (let i = 0; i < options.maxLives; i++) {
|
|
27
|
+
const isAlive = i < options.initialLives;
|
|
28
|
+
const g = scene.add.graphics();
|
|
29
|
+
g.setPosition(options.startX + i * options.spacing, options.y);
|
|
30
|
+
this.heartGraphics.push(g);
|
|
31
|
+
this.heartStates.push(isAlive);
|
|
32
|
+
parent.add(g);
|
|
33
|
+
this.drawHeartIcon(g, this.heartDrawSize, isAlive);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 设置当前生命值,更新爱心图标的显示状态。
|
|
39
|
+
* @param lives 当前生命值
|
|
40
|
+
*/
|
|
41
|
+
public setLives(lives: number): void {
|
|
42
|
+
const clamped = Math.max(0, Math.min(lives, this.heartGraphics.length));
|
|
43
|
+
this.heartGraphics.forEach((g, index) => {
|
|
44
|
+
const isAlive = index < clamped;
|
|
45
|
+
if (this.heartStates[index] !== isAlive) {
|
|
46
|
+
this.heartStates[index] = isAlive;
|
|
47
|
+
this.drawHeartIcon(g, this.heartDrawSize, isAlive);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 使用参数化心形曲线绘制爱心图标(纯前端绘制)。
|
|
54
|
+
* @param g 图形对象
|
|
55
|
+
* @param size 爱心大小
|
|
56
|
+
* @param alive 是否存活(存活为红色,否则为灰色)
|
|
57
|
+
*/
|
|
58
|
+
private drawHeartIcon(
|
|
59
|
+
g: Phaser.GameObjects.Graphics,
|
|
60
|
+
size: number,
|
|
61
|
+
alive: boolean,
|
|
62
|
+
): void {
|
|
63
|
+
g.clear();
|
|
64
|
+
|
|
65
|
+
const fillColor = alive ? 0xeb5757 : 0xcccccc;
|
|
66
|
+
const fillAlpha = alive ? 1 : 0.4;
|
|
67
|
+
|
|
68
|
+
// 使用参数化心形曲线构建爱心路径
|
|
69
|
+
const points: { x: number; y: number }[] = [];
|
|
70
|
+
const numPoints = 50;
|
|
71
|
+
for (let i = 0; i <= numPoints; i++) {
|
|
72
|
+
const t = (i / numPoints) * Math.PI * 2;
|
|
73
|
+
const px = (size * 16 * Math.pow(Math.sin(t), 3)) / 16;
|
|
74
|
+
const py =
|
|
75
|
+
(-size *
|
|
76
|
+
(13 * Math.cos(t) -
|
|
77
|
+
5 * Math.cos(2 * t) -
|
|
78
|
+
2 * Math.cos(3 * t) -
|
|
79
|
+
Math.cos(4 * t))) /
|
|
80
|
+
16;
|
|
81
|
+
points.push({ x: px, y: py });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (points.length === 0) return;
|
|
85
|
+
|
|
86
|
+
// 填充爱心主体
|
|
87
|
+
g.fillStyle(fillColor, fillAlpha);
|
|
88
|
+
g.beginPath();
|
|
89
|
+
g.moveTo(points[0].x, points[0].y);
|
|
90
|
+
for (let i = 1; i < points.length; i++) {
|
|
91
|
+
g.lineTo(points[i].x, points[i].y);
|
|
92
|
+
}
|
|
93
|
+
g.closePath();
|
|
94
|
+
g.fillPath();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# idle-breathe — Character Idle Breathe Animation
|
|
2
|
+
|
|
3
|
+
A subtle looping scale + bob animation that gives static sprites a sense of life. Essential for any character or creature that stands still between player interactions.
|
|
4
|
+
|
|
5
|
+
## Parameters
|
|
6
|
+
|
|
7
|
+
| Parameter | Default | Description |
|
|
8
|
+
|-----------|---------|-------------|
|
|
9
|
+
| `scaleAmplitude` | 0.04 | Max scale change (±4% of base scale) |
|
|
10
|
+
| `period` | 2.5s | Full breath cycle duration |
|
|
11
|
+
| `bobAmplitude` | 3px | Vertical position oscillation |
|
|
12
|
+
| `rotateAmplitude` | 1° | Subtle rotation sway |
|
|
13
|
+
| `baseScale` | 1.0 | Starting scale reference |
|
|
14
|
+
|
|
15
|
+
## Decision Notes
|
|
16
|
+
|
|
17
|
+
| Decision | Reason |
|
|
18
|
+
|----------|--------|
|
|
19
|
+
| Sine-wave scale | Mimics natural breathing rhythm; not linear |
|
|
20
|
+
| Small values | Too large looks unnatural; ±4% scale is barely perceptible but creates life |
|
|
21
|
+
| Combined bob + scale | Scale alone feels mechanical; adding Y offset adds breathing depth |
|
|
22
|
+
| 2.5s period | Natural resting heartbeat (~24 BPM), slower than walking animations |
|
|
23
|
+
|
|
24
|
+
## Engine References
|
|
25
|
+
|
|
26
|
+
- **PlayCanvas**: `ref/playcanvas.js`
|
|
27
|
+
- **Phaser 3**: `ref/phaser.js`
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "idle-breathe.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "animation",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": { "zh": "角色待机呼吸动画", "en": "Character Idle Breathe Animation" },
|
|
8
|
+
"tags": ["animation", "idle", "breathe", "character", "loop", "playcanvas", "phaser"],
|
|
9
|
+
"generation": {
|
|
10
|
+
"animationType": "tween",
|
|
11
|
+
"engineSupport": ["playcanvas", "phaser", "html5"],
|
|
12
|
+
"parameters": {
|
|
13
|
+
"scaleAmplitude": "number — max scale change (default: 0.04, i.e. ±4%)",
|
|
14
|
+
"period": "number — full breath cycle in seconds (default: 2.5)",
|
|
15
|
+
"bobAmplitude": "number — vertical bob in pixels (default: 3)",
|
|
16
|
+
"rotateAmplitude": "number — subtle rotation degrees (default: 1)"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": { "skill": "SKILL.md", "playcanvas": "ref/playcanvas.js", "phaser": "ref/phaser.js" }
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// idle-breathe — Phaser 3 implementation
|
|
2
|
+
|
|
3
|
+
function startIdleBreathe(scene, sprite, {
|
|
4
|
+
scaleAmplitude = 0.04,
|
|
5
|
+
period = 2500,
|
|
6
|
+
bobAmplitude = 3,
|
|
7
|
+
} = {}) {
|
|
8
|
+
const baseY = sprite.y;
|
|
9
|
+
const baseScale = sprite.scaleX;
|
|
10
|
+
|
|
11
|
+
scene.tweens.add({
|
|
12
|
+
targets: sprite,
|
|
13
|
+
scaleX: baseScale + scaleAmplitude,
|
|
14
|
+
scaleY: baseScale + scaleAmplitude,
|
|
15
|
+
y: baseY - bobAmplitude,
|
|
16
|
+
duration: period / 2,
|
|
17
|
+
ease: 'Sine.InOut',
|
|
18
|
+
yoyo: true,
|
|
19
|
+
repeat: -1,
|
|
20
|
+
offset: Math.random() * period, // random phase
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Usage:
|
|
25
|
+
// startIdleBreathe(this, characterSprite);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// idle-breathe — PlayCanvas implementation
|
|
2
|
+
var IdleBreathe = pc.createScript('idleBreathe');
|
|
3
|
+
IdleBreathe.attributes.add('scaleAmplitude', { type: 'number', default: 0.04 });
|
|
4
|
+
IdleBreathe.attributes.add('period', { type: 'number', default: 2.5 });
|
|
5
|
+
IdleBreathe.attributes.add('bobAmplitude', { type: 'number', default: 3 });
|
|
6
|
+
IdleBreathe.attributes.add('rotateAmplitude', { type: 'number', default: 1 });
|
|
7
|
+
|
|
8
|
+
IdleBreathe.prototype.initialize = function () {
|
|
9
|
+
this._time = Math.random() * Math.PI * 2; // random phase offset
|
|
10
|
+
this._baseY = this.entity.getLocalPosition().y;
|
|
11
|
+
this._baseScale = this.entity.getLocalScale().clone();
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
IdleBreathe.prototype.update = function (dt) {
|
|
15
|
+
this._time += dt;
|
|
16
|
+
const t = this._time;
|
|
17
|
+
const freq = (2 * Math.PI) / this.period;
|
|
18
|
+
const sin = Math.sin(t * freq);
|
|
19
|
+
|
|
20
|
+
const s = 1 + sin * this.scaleAmplitude;
|
|
21
|
+
this.entity.setLocalScale(this._baseScale.x * s, this._baseScale.y * s, this._baseScale.z);
|
|
22
|
+
|
|
23
|
+
const pos = this.entity.getLocalPosition();
|
|
24
|
+
pos.y = this._baseY + sin * this.bobAmplitude;
|
|
25
|
+
this.entity.setLocalPosition(pos);
|
|
26
|
+
|
|
27
|
+
const euler = this.entity.getLocalEulerAngles();
|
|
28
|
+
this.entity.setLocalEulerAngles(euler.x, euler.y, Math.sin(t * freq * 0.5) * this.rotateAmplitude);
|
|
29
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jewel_tile.aiimage
|
|
3
|
+
description: 宝石牌面贴图组封包 - 光泽宝石精灵图集,适合三消/数字合成的高品质牌面素材
|
|
4
|
+
triggers: 宝石,jewel,gem,钻石,diamond,红宝石,ruby,牌面,tile,三消,match3,闪光,shiny
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# jewel_tile.aiimage
|
|
8
|
+
|
|
9
|
+
宝石主题牌面贴图组封包。提供光泽感宝石精灵图,适合高品质三消、数字合成类游戏。
|
|
10
|
+
|
|
11
|
+
## Recipe
|
|
12
|
+
|
|
13
|
+
- **基础 prompt**:`shiny gemstone icons sprite sheet, ruby diamond emerald sapphire amethyst topaz pearl, flat design with gloss, vibrant colors, transparent background, game assets`
|
|
14
|
+
- **宽高比**:1:1
|
|
15
|
+
- **风格**:cartoon + gloss
|
|
16
|
+
- **需包含宝石种类**:红宝石、钻石、祖母绿、蓝宝石、紫水晶、黄玉、珍珠(共 7 种)
|
|
17
|
+
- **可 fork 变体**:
|
|
18
|
+
- 暗黑宝石:深色光晕,神秘感
|
|
19
|
+
- 8bit 像素风:像素宝石图标
|
|
20
|
+
|
|
21
|
+
**生成步骤:**
|
|
22
|
+
1. 生成 512×512 精灵图集,7 种宝石水平排列
|
|
23
|
+
2. 写入 `tiles.png`,更新 manifest
|
|
24
|
+
|
|
25
|
+
## Result
|
|
26
|
+
|
|
27
|
+
- **产物文件**:`tiles.png`
|
|
28
|
+
- **格式**:PNG(透明背景),最小 512×512
|
|
29
|
+
|
|
30
|
+
## Binding
|
|
31
|
+
|
|
32
|
+
- **Binding Role**:`tileTextureSet`
|
|
33
|
+
- **挂载目标**:`scene://entities/Board/tileRenderer/tileAtlas`
|
|
34
|
+
- **引用类型**:`sprite-atlas-reference`
|
|
35
|
+
|
|
36
|
+
## 生成方式
|
|
37
|
+
|
|
38
|
+
Platform Skill: `playcraft-image-generation`
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# 1. 生成图片(参考 ref/ 中的参考图)
|
|
42
|
+
playcraft tools generate-image \
|
|
43
|
+
--prompt "shiny gemstone icons sprite sheet, ruby diamond emerald sapphire amethyst topaz pearl, flat design with gloss, vibrant colors, transparent background, game assets" \
|
|
44
|
+
--aspect-ratio 1:1 \
|
|
45
|
+
--image-model google/imagen-3.0-generate-002 \
|
|
46
|
+
--output ta-workspace/raw.png
|
|
47
|
+
|
|
48
|
+
# 2. 后处理(去白底 + 格式转换)
|
|
49
|
+
playcraft image remove-background --input ta-workspace/raw.png --output ta-workspace/trimmed.png
|
|
50
|
+
playcraft image convert --input ta-workspace/trimmed.png --output ta-workspace/tiles.webp --quality 85
|
|
51
|
+
|
|
52
|
+
# 3. 将产物写入 sandbox 对应路径(见 binding.target)
|
|
53
|
+
```
|
|
54
|
+
## Skill Definition
|
|
55
|
+
|
|
56
|
+
tools:
|
|
57
|
+
- bash
|
|
58
|
+
- write
|
|
59
|
+
- read
|
|
60
|
+
prompt_extension: |
|
|
61
|
+
You are generating a jewel/gem tile sprite sheet for a match-3 or merge game.
|
|
62
|
+
Follow the Recipe to generate 7 distinct gem icons as a sprite atlas.
|
|
63
|
+
Apply the Binding to wire the atlas into the board renderer.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "jewel_tile.aiimage",
|
|
4
|
+
"bundleType": "aiimage",
|
|
5
|
+
"category": "visual",
|
|
6
|
+
"mode": "generative",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "宝石牌面贴图组",
|
|
9
|
+
"en": "Jewel tile set"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"tile",
|
|
13
|
+
"visual",
|
|
14
|
+
"jewel",
|
|
15
|
+
"gem",
|
|
16
|
+
"match3",
|
|
17
|
+
"premium",
|
|
18
|
+
"shiny"
|
|
19
|
+
],
|
|
20
|
+
"bindingRoles": ["tileTextureSet"],
|
|
21
|
+
"generation": {
|
|
22
|
+
"kind": "sprite-sheet",
|
|
23
|
+
"prompt": "shiny gemstone icons sprite sheet, ruby diamond emerald sapphire amethyst topaz pearl, flat design with gloss, vibrant colors, transparent background, game assets",
|
|
24
|
+
"aspectRatio": "1:1",
|
|
25
|
+
"model": "google/imagen-3.0-generate-002",
|
|
26
|
+
"style": "cartoon",
|
|
27
|
+
"platformSkill": "playcraft-image-generation"
|
|
28
|
+
},
|
|
29
|
+
"result": {
|
|
30
|
+
"outputFile": "tiles.png",
|
|
31
|
+
"format": "png",
|
|
32
|
+
"constraints": {
|
|
33
|
+
"minWidth": 512,
|
|
34
|
+
"minHeight": 512
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"binding": {
|
|
38
|
+
"role": "tileTextureSet",
|
|
39
|
+
"target": "scene://entities/Board/tileRenderer/tileAtlas",
|
|
40
|
+
"type": "sprite-atlas-reference",
|
|
41
|
+
"constraints": {
|
|
42
|
+
"format": "png",
|
|
43
|
+
"minWidth": 512
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"files": {
|
|
47
|
+
"skill": "SKILL.md"
|
|
48
|
+
}
|
|
49
|
+
}
|