ワンクリックで
flame-docs
[Flame] Flame engine quick reference. Component lifecycle, Collision, Effects, Camera and core API reference. (project)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
[Flame] Flame engine quick reference. Component lifecycle, Collision, Effects, Camera and core API reference. (project)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
[Utility] Analyzes user prompts and efficiently loads only relevant rule documents. Auto-generates category-document mapping config file on first invocation by scanning project documents. Supports both automatic and manual invocation. (project)
[Dev] Extracts and organizes best practices for a given topic into a minimal tree structure (max depth 3, max 5 children per node). Use during task planning when writing subtasks in Docs/{name}_Task.md - output is added under each subtask as a concise reference guide. Pure reasoning task with strict formatting rules: keywords/noun phrases only, no prose. (project)
[Utility] Analyzes user prompts and efficiently loads only relevant rule documents. Auto-generates category-document mapping config file on first invocation by scanning project documents. Supports both automatic and manual invocation. (project)
[Design System] Quantitative accessibility audit for UI - contrast ratios, font sizes, tap targets, heading hierarchy. Use when (1) checking WCAG color contrast compliance, (2) auditing text sizes for readability, (3) validating touch/click target sizes, (4) reviewing heading structure and landmarks, (5) user asks to 'check accessibility', 'audit contrast', 'WCAG compliance', or 'a11y check'.
[Aesthetics] Positions aesthetics within art/design history, identifies what traditions it echoes, and spots clichés, generic trends, and AI-slop patterns to avoid. Outputs Critical Notes as Memo nodes in Brain canvas.
[Aesthetics] Maps aesthetic briefs to cultural references: art movements, photography, film, architecture, music, fashion. Outputs reference lists with visual language analysis. Organizes findings as Image and Memo nodes in Brain canvas.
| name | flame-docs |
| description | [Flame] Flame engine quick reference. Component lifecycle, Collision, Effects, Camera and core API reference. (project) |
onLoad() → onMount() → update(dt)/render(canvas) → onRemove()
| Method | Timing | Purpose |
|---|---|---|
onLoad() | Once, async | Resource loading, initialization |
onMount() | On tree addition | Set parent/game references |
update(dt) | Every frame | State update (dt = delta seconds) |
render(canvas) | Every frame | Draw to screen |
onRemove() | On removal | Cleanup |
| Class | Purpose | Key Properties/Methods |
|---|---|---|
FlameGame | Game root | pauseEngine(), resumeEngine(), overlays |
World | Hosts game components | add(), children |
Component | Base component | add(), remove(), children, parent |
PositionComponent | Position/size/rotation | position, size, angle, anchor, scale |
SpriteComponent | Static sprite | sprite, paint |
SpriteAnimationComponent | Animation | animation, playing |
CameraComponent | Camera control | follow(), moveTo(), setBounds(), viewport |
RectangleComponent - RectangleCircleComponent - CirclePolygonComponent - Polygon// Add to Game or World
class MyGame extends FlameGame with HasCollisionDetection {}
| Hitbox | Purpose |
|---|---|
RectangleHitbox | Rectangular collision area |
CircleHitbox | Circular collision area |
PolygonHitbox | Polygon (convex only) |
ScreenHitbox | Screen boundaries |
CompositeHitbox | Composite hitbox |
class MyComponent extends PositionComponent with CollisionCallbacks {
@override
void onCollisionStart(Set<Vector2> points, PositionComponent other) {}
@override
void onCollision(Set<Vector2> points, PositionComponent other) {}
@override
void onCollisionEnd(PositionComponent other) {}
}
CollisionType.active - Checks against all hitboxesCollisionType.passive - Only checked by active (better performance)CollisionType.inactive - Ignored| Effect | Purpose | Example |
|---|---|---|
MoveEffect.to() | Move to target | Character movement |
MoveEffect.by() | Move by offset | Relative movement |
RotateEffect.to() | Rotate to angle | Direction change |
ScaleEffect.to() | Change size | Zoom in/out |
ColorEffect | Color/opacity | Hit effect |
SequenceEffect | Sequential execution | Complex animation |
OpacityEffect | Opacity | Fade in/out |
MoveEffect.to(
Vector2(100, 100),
EffectController(duration: 1.0, curve: Curves.easeInOut),
);
| Method | Purpose |
|---|---|
follow(target) | Follow target |
moveTo(position) | Move to coordinates |
moveBy(offset) | Move by offset |
stop() | Stop movement |
setBounds(shape) | Limit camera movement |
canSee(component) | Check visibility |
| Viewport | Purpose |
|---|---|
MaxViewport | Expand to max space (default) |
FixedResolutionViewport | Fixed resolution + aspect ratio |
FixedAspectRatioViewport | Fixed aspect ratio, scales |
FixedSizeViewport | Fixed size |
// Game
class MyGame extends FlameGame with RiverpodGameMixin {}
// Component
class MyComponent extends Component with RiverpodComponentMixin {
@override
void onMount() {
super.onMount();
final state = ref.watch(myProvider);
}
}
// Widget
RiverpodAwareGameWidget<MyGame>(
game: game,
)
class MyGame extends Forge2DGame {}
class MyBody extends BodyComponent {
@override
Body createBody() {
final shape = CircleShape()..radius = 10;
final fixtureDef = FixtureDef(shape);
final bodyDef = BodyDef(type: BodyType.dynamic);
return world.createBody(bodyDef)..createFixture(fixtureDef);
}
}
// Sound effects
FlameAudio.play('explosion.mp3');
// BGM
FlameAudio.bgm.play('background.mp3');
FlameAudio.bgm.stop();
FlameAudio.bgm.pause();
FlameAudio.bgm.resume();
await add(MyComponent()); // In onLoad
add(MyComponent()); // In update
removeFromParent(); // Self
component.removeFromParent(); // Other component
children.query<Enemy>(); // Find by type
componentsAtPoint(position); // Find by position
findByKey(ComponentKey.named('player')); // Find by key
class MyComponent extends PositionComponent {
MyComponent() : super(priority: 10); // Higher = rendered on top
}