mirror of
				https://github.com/flame-engine/flame.git
				synced 2025-11-04 13:08:09 +08:00 
			
		
		
		
	docs: Update components diagram on the docs to be simpler [Proposal] (#2666)
Update components diagram on the docs to be simpler. It seems we no longer have any abstract classes to note (other than the abstract concept of "Effects"). I feel right now the colouring (while pretty) is just "highlighting" the effects node on the graph for no particular reason. I think it would be simpler and more immediate to understand if we remove this distinction on this diagram. Just a thought, though. Hard to assess what will be clearer to someone not so familiar with the concepts. Current version:  New version: ``` mermaid graph TD %% Config %% classDef default fill:#282828,stroke:#F6BE00; %% Nodes %% Component(Component) Misc(" TimerComponent ParticleComponent SpriteBatchComponent ") Effects("Effects<br/>(See the effects section)") Game(Game) FlameGame(FlameGame) PositionComponent(PositionComponent) Sprites(" SpriteComponent SpriteGroupComponent SpriteAnimationComponent SpriteAnimationGroupComponent ParallaxComponent IsoMetricTileMapComponent ") HudMarginComponent(HudMarginComponent) HudComponents(" HudButtonComponent JoystickComponent ") OtherPositionComponents(" ButtonComponent CustomPainterComponent ShapeComponent SpriteButtonComponent TextComponent TextBoxComponent NineTileBoxComponent ") %% Flow %% Component --> Misc Component --> Effects Component --> PositionComponent Component --> FlameGame Game --> FlameGame PositionComponent --> Sprites PositionComponent --> HudMarginComponent PositionComponent --> OtherPositionComponents HudMarginComponent --> HudComponents ```
This commit is contained in:
		@ -1,34 +1,16 @@
 | 
				
			|||||||
``` {mermaid}
 | 
					``` {mermaid}
 | 
				
			||||||
%%{init: { 'theme': 'dark' } }%%
 | 
					 | 
				
			||||||
  graph TD  
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    %% Node Color %%
 | 
					 | 
				
			||||||
    classDef default fill:#282828,stroke:#F6BE00;
 | 
					 | 
				
			||||||
    classDef yellow fill:#F6BE00,color:#000;
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    %% Nodes %%
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    z(Abstract Class):::yellow
 | 
					 | 
				
			||||||
    x(Normal Class)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 ```
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
```{mermaid}
 | 
					 | 
				
			||||||
%%{init: { 'theme': 'dark'  } }%%
 | 
					 | 
				
			||||||
graph TD
 | 
					graph TD
 | 
				
			||||||
    %% Node Color %%
 | 
					    %% Config %%
 | 
				
			||||||
    classDef default fill:#282828,stroke:#F6BE00;
 | 
					    classDef default fill:#282828,stroke:#F6BE00;
 | 
				
			||||||
    classDef yellow fill:#F6BE00,color:#000;
 | 
					 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    %% Nodes %%
 | 
					    %% Nodes %%
 | 
				
			||||||
       
 | 
					 | 
				
			||||||
    Component(Component)
 | 
					    Component(Component)
 | 
				
			||||||
    Misc("
 | 
					    Misc("
 | 
				
			||||||
        TimerComponent
 | 
					        TimerComponent
 | 
				
			||||||
        ParticleComponent
 | 
					        ParticleComponent
 | 
				
			||||||
        SpriteBatchComponent
 | 
					        SpriteBatchComponent
 | 
				
			||||||
    ")
 | 
					    ")
 | 
				
			||||||
    Effects("Effects<br/>(See the effects section)"):::yellow
 | 
					    Effects("Effects<br/>(See the effects section)")
 | 
				
			||||||
    Game(Game)
 | 
					    Game(Game)
 | 
				
			||||||
    FlameGame(FlameGame)
 | 
					    FlameGame(FlameGame)
 | 
				
			||||||
    PositionComponent(PositionComponent)
 | 
					    PositionComponent(PositionComponent)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user