@musashishao/agent-kit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/.shared/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
- package/.agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/core.py +258 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +487 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/search.py +76 -0
- package/.agent/ARCHITECTURE.md +225 -0
- package/.agent/CONTEXT.md +229 -0
- package/.agent/FEATURE_ROADMAP.md +435 -0
- package/.agent/PROMPT_TEMPLATES.md +261 -0
- package/.agent/agents/backend-specialist.md +263 -0
- package/.agent/agents/database-architect.md +226 -0
- package/.agent/agents/debugger.md +225 -0
- package/.agent/agents/devops-engineer.md +242 -0
- package/.agent/agents/documentation-writer.md +104 -0
- package/.agent/agents/explorer-agent.md +73 -0
- package/.agent/agents/frontend-specialist.md +556 -0
- package/.agent/agents/game-developer.md +162 -0
- package/.agent/agents/mobile-developer.md +377 -0
- package/.agent/agents/orchestrator.md +416 -0
- package/.agent/agents/penetration-tester.md +188 -0
- package/.agent/agents/performance-optimizer.md +187 -0
- package/.agent/agents/project-planner.md +403 -0
- package/.agent/agents/security-auditor.md +170 -0
- package/.agent/agents/seo-specialist.md +111 -0
- package/.agent/agents/test-engineer.md +158 -0
- package/.agent/rules/GEMINI.md +251 -0
- package/.agent/skills/api-patterns/SKILL.md +81 -0
- package/.agent/skills/api-patterns/api-style.md +42 -0
- package/.agent/skills/api-patterns/auth.md +24 -0
- package/.agent/skills/api-patterns/documentation.md +26 -0
- package/.agent/skills/api-patterns/graphql.md +41 -0
- package/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/.agent/skills/api-patterns/response.md +37 -0
- package/.agent/skills/api-patterns/rest.md +40 -0
- package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/.agent/skills/api-patterns/security-testing.md +122 -0
- package/.agent/skills/api-patterns/trpc.md +41 -0
- package/.agent/skills/api-patterns/versioning.md +22 -0
- package/.agent/skills/app-builder/SKILL.md +75 -0
- package/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/.agent/skills/app-builder/feature-building.md +53 -0
- package/.agent/skills/app-builder/project-detection.md +34 -0
- package/.agent/skills/app-builder/scaffolding.md +118 -0
- package/.agent/skills/app-builder/tech-stack.md +40 -0
- package/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/.agent/skills/architecture/SKILL.md +55 -0
- package/.agent/skills/architecture/context-discovery.md +43 -0
- package/.agent/skills/architecture/examples.md +94 -0
- package/.agent/skills/architecture/pattern-selection.md +68 -0
- package/.agent/skills/architecture/patterns-reference.md +50 -0
- package/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/.agent/skills/bash-linux/SKILL.md +199 -0
- package/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/.agent/skills/brainstorming/SKILL.md +163 -0
- package/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/.agent/skills/clean-code/SKILL.md +201 -0
- package/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/.agent/skills/database-design/SKILL.md +52 -0
- package/.agent/skills/database-design/database-selection.md +43 -0
- package/.agent/skills/database-design/indexing.md +39 -0
- package/.agent/skills/database-design/migrations.md +48 -0
- package/.agent/skills/database-design/optimization.md +36 -0
- package/.agent/skills/database-design/orm-selection.md +30 -0
- package/.agent/skills/database-design/schema-design.md +56 -0
- package/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/.agent/skills/doc.md +177 -0
- package/.agent/skills/docker-expert/SKILL.md +409 -0
- package/.agent/skills/documentation-templates/SKILL.md +194 -0
- package/.agent/skills/frontend-design/SKILL.md +396 -0
- package/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/.agent/skills/frontend-design/color-system.md +311 -0
- package/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/.agent/skills/frontend-design/typography-system.md +345 -0
- package/.agent/skills/frontend-design/ux-psychology.md +541 -0
- package/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/.agent/skills/game-development/SKILL.md +167 -0
- package/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/.agent/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/.agent/skills/mobile-design/SKILL.md +394 -0
- package/.agent/skills/mobile-design/decision-trees.md +516 -0
- package/.agent/skills/mobile-design/mobile-backend.md +491 -0
- package/.agent/skills/mobile-design/mobile-color-system.md +420 -0
- package/.agent/skills/mobile-design/mobile-debugging.md +122 -0
- package/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/.agent/skills/mobile-design/mobile-navigation.md +458 -0
- package/.agent/skills/mobile-design/mobile-performance.md +767 -0
- package/.agent/skills/mobile-design/mobile-testing.md +356 -0
- package/.agent/skills/mobile-design/mobile-typography.md +433 -0
- package/.agent/skills/mobile-design/platform-android.md +666 -0
- package/.agent/skills/mobile-design/platform-ios.md +561 -0
- package/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/.agent/skills/mobile-design/touch-psychology.md +537 -0
- package/.agent/skills/nestjs-expert/SKILL.md +552 -0
- package/.agent/skills/nextjs-best-practices/SKILL.md +203 -0
- package/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
- package/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/.agent/skills/plan-writing/SKILL.md +152 -0
- package/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/.agent/skills/prisma-expert/SKILL.md +355 -0
- package/.agent/skills/python-patterns/SKILL.md +441 -0
- package/.agent/skills/react-patterns/SKILL.md +198 -0
- package/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/.agent/skills/seo-fundamentals/SKILL.md +129 -0
- package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/.agent/skills/server-management/SKILL.md +161 -0
- package/.agent/skills/systematic-debugging/SKILL.md +109 -0
- package/.agent/skills/tailwind-patterns/SKILL.md +269 -0
- package/.agent/skills/tdd-workflow/SKILL.md +149 -0
- package/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/.agent/skills/typescript-expert/SKILL.md +429 -0
- package/.agent/skills/typescript-expert/references/tsconfig-strict.json +92 -0
- package/.agent/skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
- package/.agent/skills/typescript-expert/references/utility-types.ts +335 -0
- package/.agent/skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +351 -0
- package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/scripts/core.py +257 -0
- package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +487 -0
- package/.agent/skills/ui-ux-pro-max/scripts/search.py +76 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/.agent/workflows/brainstorm.md +113 -0
- package/.agent/workflows/create.md +59 -0
- package/.agent/workflows/debug.md +103 -0
- package/.agent/workflows/deploy.md +176 -0
- package/.agent/workflows/enhance.md +63 -0
- package/.agent/workflows/orchestrate.md +237 -0
- package/.agent/workflows/plan.md +89 -0
- package/.agent/workflows/preview.md +80 -0
- package/.agent/workflows/status.md +86 -0
- package/.agent/workflows/test.md +144 -0
- package/.agent/workflows/ui-ux-pro-max.md +231 -0
- package/LICENSE +21 -0
- package/README.md +101 -0
- package/bin/cli.js +235 -0
- package/index.js +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
# Visual Effects Reference
|
|
2
|
+
|
|
3
|
+
> Modern CSS effect principles and techniques - learn the concepts, create variations.
|
|
4
|
+
> **No fixed values to copy - understand the patterns.**
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Glassmorphism Principles
|
|
9
|
+
|
|
10
|
+
### What Makes Glassmorphism Work
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
Key Properties:
|
|
14
|
+
├── Semi-transparent background (not solid)
|
|
15
|
+
├── Backdrop blur (frosted glass effect)
|
|
16
|
+
├── Subtle border (for definition)
|
|
17
|
+
└── Often: light shadow for depth
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### The Pattern (Customize Values)
|
|
21
|
+
|
|
22
|
+
```css
|
|
23
|
+
.glass {
|
|
24
|
+
/* Transparency: adjust opacity based on content readability */
|
|
25
|
+
background: rgba(R, G, B, OPACITY);
|
|
26
|
+
/* OPACITY: 0.1-0.3 for dark bg, 0.5-0.8 for light bg */
|
|
27
|
+
|
|
28
|
+
/* Blur: higher = more frosted */
|
|
29
|
+
backdrop-filter: blur(AMOUNT);
|
|
30
|
+
/* AMOUNT: 8-12px subtle, 16-24px strong */
|
|
31
|
+
|
|
32
|
+
/* Border: defines edges */
|
|
33
|
+
border: 1px solid rgba(255, 255, 255, OPACITY);
|
|
34
|
+
/* OPACITY: 0.1-0.3 typically */
|
|
35
|
+
|
|
36
|
+
/* Radius: match your design system */
|
|
37
|
+
border-radius: YOUR_RADIUS;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### When to Use Glassmorphism
|
|
42
|
+
- ✅ Over colorful/image backgrounds
|
|
43
|
+
- ✅ Modals, overlays, cards
|
|
44
|
+
- ✅ Navigation bars with scrolling content behind
|
|
45
|
+
- ❌ Text-heavy content (readability issues)
|
|
46
|
+
- ❌ Simple solid backgrounds (pointless)
|
|
47
|
+
|
|
48
|
+
### When NOT to Use
|
|
49
|
+
- Low contrast situations
|
|
50
|
+
- Accessibility-critical content
|
|
51
|
+
- Performance-constrained devices
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 2. Neomorphism Principles
|
|
56
|
+
|
|
57
|
+
### What Makes Neomorphism Work
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Key Concept: Soft, extruded elements using DUAL shadows
|
|
61
|
+
├── Light shadow (from light source direction)
|
|
62
|
+
├── Dark shadow (opposite direction)
|
|
63
|
+
└── Background matches surrounding (same color)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### The Pattern
|
|
67
|
+
|
|
68
|
+
```css
|
|
69
|
+
.neo-raised {
|
|
70
|
+
/* Background MUST match parent */
|
|
71
|
+
background: SAME_AS_PARENT;
|
|
72
|
+
|
|
73
|
+
/* Two shadows: light direction + dark direction */
|
|
74
|
+
box-shadow:
|
|
75
|
+
OFFSET OFFSET BLUR rgba(light-color),
|
|
76
|
+
-OFFSET -OFFSET BLUR rgba(dark-color);
|
|
77
|
+
|
|
78
|
+
/* OFFSET: typically 6-12px */
|
|
79
|
+
/* BLUR: typically 12-20px */
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.neo-pressed {
|
|
83
|
+
/* Inset creates "pushed in" effect */
|
|
84
|
+
box-shadow:
|
|
85
|
+
inset OFFSET OFFSET BLUR rgba(dark-color),
|
|
86
|
+
inset -OFFSET -OFFSET BLUR rgba(light-color);
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Accessibility Warning
|
|
91
|
+
⚠️ **Low contrast** - use sparingly, ensure clear boundaries
|
|
92
|
+
|
|
93
|
+
### When to Use
|
|
94
|
+
- Decorative elements
|
|
95
|
+
- Subtle interactive states
|
|
96
|
+
- Minimalist UI with flat colors
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 3. Shadow Hierarchy Principles
|
|
101
|
+
|
|
102
|
+
### Concept: Shadows Indicate Elevation
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
Higher elevation = larger shadow
|
|
106
|
+
├── Level 0: No shadow (flat on surface)
|
|
107
|
+
├── Level 1: Subtle shadow (slightly raised)
|
|
108
|
+
├── Level 2: Medium shadow (cards, buttons)
|
|
109
|
+
├── Level 3: Large shadow (modals, dropdowns)
|
|
110
|
+
└── Level 4: Deep shadow (floating elements)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Shadow Properties to Adjust
|
|
114
|
+
|
|
115
|
+
```css
|
|
116
|
+
box-shadow: OFFSET-X OFFSET-Y BLUR SPREAD COLOR;
|
|
117
|
+
|
|
118
|
+
/* Offset: direction of shadow */
|
|
119
|
+
/* Blur: softness (larger = softer) */
|
|
120
|
+
/* Spread: size expansion */
|
|
121
|
+
/* Color: typically black with low opacity */
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Principles for Natural Shadows
|
|
125
|
+
|
|
126
|
+
1. **Y-offset larger than X** (light comes from above)
|
|
127
|
+
2. **Low opacity** (5-15% for subtle, 15-25% for pronounced)
|
|
128
|
+
3. **Multiple layers** for realism (ambient + direct)
|
|
129
|
+
4. **Blur scales with offset** (larger offset = larger blur)
|
|
130
|
+
|
|
131
|
+
### Dark Mode Shadows
|
|
132
|
+
- Shadows less visible on dark backgrounds
|
|
133
|
+
- May need to increase opacity
|
|
134
|
+
- Or use glow/highlight instead
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 4. Gradient Principles
|
|
139
|
+
|
|
140
|
+
### Types and When to Use
|
|
141
|
+
|
|
142
|
+
| Type | Pattern | Use Case |
|
|
143
|
+
|------|---------|----------|
|
|
144
|
+
| **Linear** | Color A → Color B along line | Backgrounds, buttons, headers |
|
|
145
|
+
| **Radial** | Center → outward | Spotlights, focal points |
|
|
146
|
+
| **Conic** | Around center | Pie charts, creative effects |
|
|
147
|
+
|
|
148
|
+
### Creating Harmonious Gradients
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
Good Gradient Rules:
|
|
152
|
+
├── Use ADJACENT colors on wheel (analogous)
|
|
153
|
+
├── Or same hue with different lightness
|
|
154
|
+
├── Avoid complementary (can look harsh)
|
|
155
|
+
└── Add middle stops for smoother transitions
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Gradient Syntax Pattern
|
|
159
|
+
|
|
160
|
+
```css
|
|
161
|
+
.gradient {
|
|
162
|
+
background: linear-gradient(
|
|
163
|
+
DIRECTION, /* angle or to-keyword */
|
|
164
|
+
COLOR-STOP-1, /* color + optional position */
|
|
165
|
+
COLOR-STOP-2,
|
|
166
|
+
/* ... more stops */
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* DIRECTION examples: */
|
|
171
|
+
/* 90deg, 135deg, to right, to bottom right */
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Mesh Gradients
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
Multiple radial gradients overlapped:
|
|
178
|
+
├── Each at different position
|
|
179
|
+
├── Each with transparent falloff
|
|
180
|
+
├── **Mandatory for "Wow" factor in Hero sections**
|
|
181
|
+
└── Creates organic, colorful effect (Search: "Aurora Gradient CSS")
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 5. Border Effects Principles
|
|
187
|
+
|
|
188
|
+
### Gradient Borders
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
Technique: Pseudo-element with gradient background
|
|
192
|
+
├── Element has padding = border width
|
|
193
|
+
├── Pseudo-element fills with gradient
|
|
194
|
+
└── Mask or clip creates border effect
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Animated Borders
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
Technique: Rotating gradient or conic sweep
|
|
201
|
+
├── Pseudo-element larger than content
|
|
202
|
+
├── Animation rotates the gradient
|
|
203
|
+
└── Overflow hidden clips to shape
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Glow Borders
|
|
207
|
+
|
|
208
|
+
```css
|
|
209
|
+
/* Multiple box-shadows create glow */
|
|
210
|
+
box-shadow:
|
|
211
|
+
0 0 SMALL-BLUR COLOR,
|
|
212
|
+
0 0 MEDIUM-BLUR COLOR,
|
|
213
|
+
0 0 LARGE-BLUR COLOR;
|
|
214
|
+
|
|
215
|
+
/* Each layer adds to the glow */
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 6. Glow Effects Principles
|
|
221
|
+
|
|
222
|
+
### Text Glow
|
|
223
|
+
|
|
224
|
+
```css
|
|
225
|
+
text-shadow:
|
|
226
|
+
0 0 BLUR-1 COLOR,
|
|
227
|
+
0 0 BLUR-2 COLOR,
|
|
228
|
+
0 0 BLUR-3 COLOR;
|
|
229
|
+
|
|
230
|
+
/* Multiple layers = stronger glow */
|
|
231
|
+
/* Larger blur = softer spread */
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Element Glow
|
|
235
|
+
|
|
236
|
+
```css
|
|
237
|
+
box-shadow:
|
|
238
|
+
0 0 BLUR-1 COLOR,
|
|
239
|
+
0 0 BLUR-2 COLOR;
|
|
240
|
+
|
|
241
|
+
/* Use color matching element for realistic glow */
|
|
242
|
+
/* Lower opacity for subtle, higher for neon */
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Pulsing Glow Animation
|
|
246
|
+
|
|
247
|
+
```css
|
|
248
|
+
@keyframes glow-pulse {
|
|
249
|
+
0%, 100% { box-shadow: 0 0 SMALL-BLUR COLOR; }
|
|
250
|
+
50% { box-shadow: 0 0 LARGE-BLUR COLOR; }
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* Easing and duration affect feel */
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 7. Overlay Techniques
|
|
259
|
+
|
|
260
|
+
### Gradient Overlay on Images
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
Purpose: Improve text readability over images
|
|
264
|
+
Pattern: Gradient from transparent to opaque
|
|
265
|
+
Position: Where text will appear
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
```css
|
|
269
|
+
.overlay::after {
|
|
270
|
+
content: '';
|
|
271
|
+
position: absolute;
|
|
272
|
+
inset: 0;
|
|
273
|
+
background: linear-gradient(
|
|
274
|
+
DIRECTION,
|
|
275
|
+
transparent PERCENTAGE,
|
|
276
|
+
rgba(0,0,0,OPACITY) 100%
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Colored Overlay
|
|
282
|
+
|
|
283
|
+
```css
|
|
284
|
+
/* Blend mode or layered gradient */
|
|
285
|
+
background:
|
|
286
|
+
linear-gradient(YOUR-COLOR-WITH-OPACITY),
|
|
287
|
+
url('image.jpg');
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## 8. Modern CSS Techniques
|
|
293
|
+
|
|
294
|
+
### Container Queries (Concept)
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
Instead of viewport breakpoints:
|
|
298
|
+
├── Component responds to ITS container
|
|
299
|
+
├── Truly modular, reusable components
|
|
300
|
+
└── Syntax: @container (condition) { }
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### :has() Selector (Concept)
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
Parent styling based on children:
|
|
307
|
+
├── "Parent that has X child"
|
|
308
|
+
├── Enables previously impossible patterns
|
|
309
|
+
└── Progressive enhancement approach
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Scroll-Driven Animations (Concept)
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
Animation progress tied to scroll:
|
|
316
|
+
├── Entry/exit animations on scroll
|
|
317
|
+
├── Parallax effects
|
|
318
|
+
├── Progress indicators
|
|
319
|
+
└── View-based or scroll-based timeline
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## 9. Performance Principles
|
|
325
|
+
|
|
326
|
+
### GPU-Accelerated Properties
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
CHEAP to animate (GPU):
|
|
330
|
+
├── transform (translate, scale, rotate)
|
|
331
|
+
└── opacity
|
|
332
|
+
|
|
333
|
+
EXPENSIVE to animate (CPU):
|
|
334
|
+
├── width, height
|
|
335
|
+
├── top, left, right, bottom
|
|
336
|
+
├── margin, padding
|
|
337
|
+
└── box-shadow (recalculates)
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### will-change Usage
|
|
341
|
+
|
|
342
|
+
```css
|
|
343
|
+
/* Use sparingly, only for heavy animations */
|
|
344
|
+
.heavy-animation {
|
|
345
|
+
will-change: transform;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* Remove after animation if possible */
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Reduced Motion
|
|
352
|
+
|
|
353
|
+
```css
|
|
354
|
+
@media (prefers-reduced-motion: reduce) {
|
|
355
|
+
/* Disable or minimize animations */
|
|
356
|
+
/* Respect user preference */
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## 10. Effect Selection Checklist
|
|
363
|
+
|
|
364
|
+
Before applying any effect:
|
|
365
|
+
|
|
366
|
+
- [ ] **Does it serve a purpose?** (not just decoration)
|
|
367
|
+
- [ ] **Is it appropriate for the context?** (brand, audience)
|
|
368
|
+
- [ ] **Have you varied from previous projects?** (avoid repetition)
|
|
369
|
+
- [ ] **Is it accessible?** (contrast, motion sensitivity)
|
|
370
|
+
- [ ] **Is it performant?** (especially on mobile)
|
|
371
|
+
- [ ] **Did you ask user preference?** (if style open-ended)
|
|
372
|
+
|
|
373
|
+
### Anti-Patterns
|
|
374
|
+
|
|
375
|
+
- ❌ Glassmorphism on every element (kitsch)
|
|
376
|
+
- ❌ Dark + neon as default (lazy AI look)
|
|
377
|
+
- ❌ **Static/Flat designs with no depth (FAILED)**
|
|
378
|
+
- ❌ Effects that hurt readability
|
|
379
|
+
- ❌ Animations without purpose
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
> **Remember**: Effects enhance meaning. Choose based on purpose and context, not because it "looks cool."
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 2d-games
|
|
3
|
+
description: 2D game development principles. Sprites, tilemaps, physics, camera.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 2D Game Development
|
|
8
|
+
|
|
9
|
+
> Principles for 2D game systems.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Sprite Systems
|
|
14
|
+
|
|
15
|
+
### Sprite Organization
|
|
16
|
+
|
|
17
|
+
| Component | Purpose |
|
|
18
|
+
|-----------|---------|
|
|
19
|
+
| **Atlas** | Combine textures, reduce draw calls |
|
|
20
|
+
| **Animation** | Frame sequences |
|
|
21
|
+
| **Pivot** | Rotation/scale origin |
|
|
22
|
+
| **Layering** | Z-order control |
|
|
23
|
+
|
|
24
|
+
### Animation Principles
|
|
25
|
+
|
|
26
|
+
- Frame rate: 8-24 FPS typical
|
|
27
|
+
- Squash and stretch for impact
|
|
28
|
+
- Anticipation before action
|
|
29
|
+
- Follow-through after action
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 2. Tilemap Design
|
|
34
|
+
|
|
35
|
+
### Tile Considerations
|
|
36
|
+
|
|
37
|
+
| Factor | Recommendation |
|
|
38
|
+
|--------|----------------|
|
|
39
|
+
| **Size** | 16x16, 32x32, 64x64 |
|
|
40
|
+
| **Auto-tiling** | Use for terrain |
|
|
41
|
+
| **Collision** | Simplified shapes |
|
|
42
|
+
|
|
43
|
+
### Layers
|
|
44
|
+
|
|
45
|
+
| Layer | Content |
|
|
46
|
+
|-------|---------|
|
|
47
|
+
| Background | Non-interactive scenery |
|
|
48
|
+
| Terrain | Walkable ground |
|
|
49
|
+
| Props | Interactive objects |
|
|
50
|
+
| Foreground | Parallax overlay |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 3. 2D Physics
|
|
55
|
+
|
|
56
|
+
### Collision Shapes
|
|
57
|
+
|
|
58
|
+
| Shape | Use Case |
|
|
59
|
+
|-------|----------|
|
|
60
|
+
| Box | Rectangular objects |
|
|
61
|
+
| Circle | Balls, rounded |
|
|
62
|
+
| Capsule | Characters |
|
|
63
|
+
| Polygon | Complex shapes |
|
|
64
|
+
|
|
65
|
+
### Physics Considerations
|
|
66
|
+
|
|
67
|
+
- Pixel-perfect vs physics-based
|
|
68
|
+
- Fixed timestep for consistency
|
|
69
|
+
- Layers for filtering
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 4. Camera Systems
|
|
74
|
+
|
|
75
|
+
### Camera Types
|
|
76
|
+
|
|
77
|
+
| Type | Use |
|
|
78
|
+
|------|-----|
|
|
79
|
+
| **Follow** | Track player |
|
|
80
|
+
| **Look-ahead** | Anticipate movement |
|
|
81
|
+
| **Multi-target** | Two-player |
|
|
82
|
+
| **Room-based** | Metroidvania |
|
|
83
|
+
|
|
84
|
+
### Screen Shake
|
|
85
|
+
|
|
86
|
+
- Short duration (50-200ms)
|
|
87
|
+
- Diminishing intensity
|
|
88
|
+
- Use sparingly
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 5. Genre Patterns
|
|
93
|
+
|
|
94
|
+
### Platformer
|
|
95
|
+
|
|
96
|
+
- Coyote time (leniency after edge)
|
|
97
|
+
- Jump buffering
|
|
98
|
+
- Variable jump height
|
|
99
|
+
|
|
100
|
+
### Top-down
|
|
101
|
+
|
|
102
|
+
- 8-directional or free movement
|
|
103
|
+
- Aim-based or auto-aim
|
|
104
|
+
- Consider rotation or not
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 6. Anti-Patterns
|
|
109
|
+
|
|
110
|
+
| ❌ Don't | ✅ Do |
|
|
111
|
+
|----------|-------|
|
|
112
|
+
| Separate textures | Use atlases |
|
|
113
|
+
| Complex collision shapes | Simplified collision |
|
|
114
|
+
| Jittery camera | Smooth following |
|
|
115
|
+
| Pixel-perfect on physics | Choose one approach |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
> **Remember:** 2D is about clarity. Every pixel should communicate.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 3d-games
|
|
3
|
+
description: 3D game development principles. Rendering, shaders, physics, cameras.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 3D Game Development
|
|
8
|
+
|
|
9
|
+
> Principles for 3D game systems.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Rendering Pipeline
|
|
14
|
+
|
|
15
|
+
### Stages
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
1. Vertex Processing → Transform geometry
|
|
19
|
+
2. Rasterization → Convert to pixels
|
|
20
|
+
3. Fragment Processing → Color pixels
|
|
21
|
+
4. Output → To screen
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Optimization Principles
|
|
25
|
+
|
|
26
|
+
| Technique | Purpose |
|
|
27
|
+
|-----------|---------|
|
|
28
|
+
| **Frustum culling** | Don't render off-screen |
|
|
29
|
+
| **Occlusion culling** | Don't render hidden |
|
|
30
|
+
| **LOD** | Less detail at distance |
|
|
31
|
+
| **Batching** | Combine draw calls |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 2. Shader Principles
|
|
36
|
+
|
|
37
|
+
### Shader Types
|
|
38
|
+
|
|
39
|
+
| Type | Purpose |
|
|
40
|
+
|------|---------|
|
|
41
|
+
| **Vertex** | Position, normals |
|
|
42
|
+
| **Fragment/Pixel** | Color, lighting |
|
|
43
|
+
| **Compute** | General computation |
|
|
44
|
+
|
|
45
|
+
### When to Write Custom Shaders
|
|
46
|
+
|
|
47
|
+
- Special effects (water, fire, portals)
|
|
48
|
+
- Stylized rendering (toon, sketch)
|
|
49
|
+
- Performance optimization
|
|
50
|
+
- Unique visual identity
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 3. 3D Physics
|
|
55
|
+
|
|
56
|
+
### Collision Shapes
|
|
57
|
+
|
|
58
|
+
| Shape | Use Case |
|
|
59
|
+
|-------|----------|
|
|
60
|
+
| **Box** | Buildings, crates |
|
|
61
|
+
| **Sphere** | Balls, quick checks |
|
|
62
|
+
| **Capsule** | Characters |
|
|
63
|
+
| **Mesh** | Terrain (expensive) |
|
|
64
|
+
|
|
65
|
+
### Principles
|
|
66
|
+
|
|
67
|
+
- Simple colliders, complex visuals
|
|
68
|
+
- Layer-based filtering
|
|
69
|
+
- Raycasting for line-of-sight
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 4. Camera Systems
|
|
74
|
+
|
|
75
|
+
### Camera Types
|
|
76
|
+
|
|
77
|
+
| Type | Use |
|
|
78
|
+
|------|-----|
|
|
79
|
+
| **Third-person** | Action, adventure |
|
|
80
|
+
| **First-person** | Immersive, FPS |
|
|
81
|
+
| **Isometric** | Strategy, RPG |
|
|
82
|
+
| **Orbital** | Inspection, editors |
|
|
83
|
+
|
|
84
|
+
### Camera Feel
|
|
85
|
+
|
|
86
|
+
- Smooth following (lerp)
|
|
87
|
+
- Collision avoidance
|
|
88
|
+
- Look-ahead for movement
|
|
89
|
+
- FOV changes for speed
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 5. Lighting
|
|
94
|
+
|
|
95
|
+
### Light Types
|
|
96
|
+
|
|
97
|
+
| Type | Use |
|
|
98
|
+
|------|-----|
|
|
99
|
+
| **Directional** | Sun, moon |
|
|
100
|
+
| **Point** | Lamps, torches |
|
|
101
|
+
| **Spot** | Flashlight, stage |
|
|
102
|
+
| **Ambient** | Base illumination |
|
|
103
|
+
|
|
104
|
+
### Performance Consideration
|
|
105
|
+
|
|
106
|
+
- Real-time shadows are expensive
|
|
107
|
+
- Bake when possible
|
|
108
|
+
- Shadow cascades for large worlds
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 6. Level of Detail (LOD)
|
|
113
|
+
|
|
114
|
+
### LOD Strategy
|
|
115
|
+
|
|
116
|
+
| Distance | Model |
|
|
117
|
+
|----------|-------|
|
|
118
|
+
| Near | Full detail |
|
|
119
|
+
| Medium | 50% triangles |
|
|
120
|
+
| Far | 25% or billboard |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 7. Anti-Patterns
|
|
125
|
+
|
|
126
|
+
| ❌ Don't | ✅ Do |
|
|
127
|
+
|----------|-------|
|
|
128
|
+
| Mesh colliders everywhere | Simple shapes |
|
|
129
|
+
| Real-time shadows on mobile | Baked or blob shadows |
|
|
130
|
+
| One LOD for all distances | Distance-based LOD |
|
|
131
|
+
| Unoptimized shaders | Profile and simplify |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
> **Remember:** 3D is about illusion. Create the impression of detail, not the detail itself.
|