# sc-workshop/supercellswf-animate architecture

> Architecture diagram of the GitHub repository sc-workshop/supercellswf-animate, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sc-workshop/supercellswf-animate
- Repository: https://github.com/sc-workshop/supercellswf-animate

## Overview

##### Main Components

a. Extension Architecture:
- Adobe Animate Host Application (as the container)
- CEP (Common Extensibility Platform) Interface
- Plugin Core Components
- Publisher Interface
- Installer System

b. Key Relationships:
- Data flow between components
- File format transformations
- Integration points with Adobe Animate

##### Specific Component Details

Frontend Layer:
- Publisher UI (React-based)
- Settings panels
- Export options
- Localization system
- Component hierarchy

Native Plugin Layer:
- C++ Core Plugin
- FCMPlugin interface
- Window management
- Graphics processing

Installation Layer:
- Installer runtime
- Native installer components
- Configuration management

##### Flow Directions

Key interactions:
- Adobe Animate → Plugin Interface
- User Input → Publisher UI → Export Pipeline
- Asset Processing Flow
- File Output Generation

##### Important Subsystems to Highlight

- Export Pipeline:
- Asset processing
- Texture management
- SC file generation
- Error handling

- Configuration System:
- Settings management
- Localization
- Feature matrix

**┌─────────────────────────────────────────────┐**
- Adobe Animate Host               │
- ┤
- CEP Interface                 │
- ┬─────────────┬──────────────┤
- Publisher UI │   Plugin    │  Installer   │
- (React)      │   Core      │  System      │
- ┴─────────────┴──────────────┤
- Native C++ Components             │
- ┤
- File System I/O                │
- ┘

Key Technical Considerations:

##### Error handling and logging pathways

Remember to:
- Technical details about file format handling
- Clear boundaries between Adobe's platform and custom components
- Cross-platform considerations (Windows support)
- Extension points for future features

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph AdobeAnimate["Adobe Animate Host Application"]
        CEP["CEP Interface"]
        click CEP "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/publisher/src/CEP/index.ts"
    end

    subgraph PublisherUI["Publisher UI Layer"]
        Publisher["Publisher Main"]
        click Publisher "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/publisher/src/Publisher.tsx"
        Settings["Settings Panel"]
        click Settings "https://github.com/sc-workshop/SupercellSWF-Animate/tree/master/publisher/src/Components/Publisher/Settings"
        SharedComp["Shared Components"]
        click SharedComp "https://github.com/sc-workshop/SupercellSWF-Animate/tree/master/publisher/src/Components/Shared"
        Locales["Publisher Locales"]
        click Locales "https://github.com/sc-workshop/SupercellSWF-Animate/tree/master/publisher/src/locales"
    end

    subgraph NativePlugin["Native Plugin Layer"]
        FCMPlugin["FCM Plugin Core"]
        click FCMPlugin "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/FCMPugin.cpp"
        Module["Module Core"]
        click Module "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Module/Module.cpp"
        PluginPub["Publisher Interface"]
        click PluginPub "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Plugin/Publisher.cpp"
    end

    subgraph Writers["Writer Components"]
        MovieClip["MovieClip Writer"]
        click MovieClip "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Writer/MovieclipWriter.cpp"
        Shape["Shape Writer"]
        click Shape "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Writer/ShapeWriter.cpp"
        TextField["TextField Writer"]
        click TextField "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Writer/TextFieldWriter.cpp"
    end

    subgraph WindowMgmt["Window Management"]
        PluginWindow["Main Window"]
        click PluginWindow "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Window/PluginWindow.cpp"
        WindowComps["Window Components"]
        click WindowComps "https://github.com/sc-workshop/SupercellSWF-Animate/tree/master/plugin/supercell-flash-plugin/source/Window/Components"
    end

    subgraph Config["Configuration System"]
        Features["Features Config"]
        click Features "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/resources/features.json"
        ConfigModule["Config Module"]
        click ConfigModule "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Module/Config.cpp"
        LocalizationCore["Localization Core"]
        click LocalizationCore "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Module/Localization.cpp"
        PluginLocales["Plugin Locales"]
        click PluginLocales "https://github.com/sc-workshop/SupercellSWF-Animate/tree/master/plugin/resources/locales"
    end

    subgraph Installer["Installer System"]
        NativeComps["Native Components"]
        click NativeComps "https://github.com/sc-workshop/SupercellSWF-Animate/tree/master/installer/native/source"
        Runtime["Installer Runtime"]
        click Runtime "https://github.com/sc-workshop/SupercellSWF-Animate/tree/master/installer/runtime/core"
        InstallScripts["Installation Scripts"]
        click InstallScripts "https://github.com/sc-workshop/SupercellSWF-Animate/tree/master/installer/source/core/scripts/install"
    end

    subgraph ErrorSystem["Error Handling"]
        ExceptionHandler["Exception Handler"]
        click ExceptionHandler "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Module/SCPluginException.cpp"
        ErrorDialog["Error Dialog"]
        click ErrorDialog "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Window/Components/ErrorDialog.cpp"
    end

    subgraph AssetProc["Asset Processing"]
        Atlas["Atlas System"]
        click Atlas "https://github.com/sc-workshop/SupercellSWF-Animate/blob/master/plugin/supercell-flash-plugin/source/Writer/Reassemble/Atlas.cpp"
        GraphicItems["Graphic Items"]
        click GraphicItems "https://github.com/sc-workshop/SupercellSWF-Animate/tree/master/plugin/supercell-flash-plugin/source/Writer/GraphicItem"
    end

    AdobeAnimate --> CEP
    CEP --> PublisherUI
    CEP --> NativePlugin
    PublisherUI --> NativePlugin
    NativePlugin --> Writers
    NativePlugin --> WindowMgmt
    NativePlugin --> Config
    NativePlugin --> ErrorSystem
    Writers --> AssetProc
    Config --> LocalizationCore
    LocalizationCore --> PluginLocales
    LocalizationCore --> Locales

    classDef default fill:#f9f9f9,stroke:#333,stroke-width:1px
    classDef host fill:#e1f5fe,stroke:#0288d1
    classDef ui fill:#e8f5e9,stroke:#388e3c
    classDef native fill:#fff3e0,stroke:#f57c00
    classDef error fill:#ffebee,stroke:#d32f2f
    classDef config fill:#f3e5f5,stroke:#7b1fa2
    classDef asset fill:#fce4ec,stroke:#c2185b

    class AdobeAnimate,CEP host
    class PublisherUI,Publisher,Settings,SharedComp ui
    class NativePlugin,FCMPlugin,Module,Writers,MovieClip,Shape,TextField native
    class ErrorSystem,ExceptionHandler,ErrorDialog error
    class Config,Features,ConfigModule,LocalizationCore config
    class AssetProc,Atlas,GraphicItems asset
```
