refactor(onitama): centralize visual constants in config
Introduce `TEXT_POSITION` and `VISUAL` objects to the configuration to manage magic numbers for positioning, radii, stroke widths, and alphas. Update renderers and spawners to use these constants instead of hardcoded values or direct calculations.
This commit is contained in:
@@ -17,6 +17,19 @@ export class ShapeViewerScene extends ReactiveScene {
|
||||
super.create();
|
||||
this.drawShapeViewer();
|
||||
this.createControls();
|
||||
this.createBackButton();
|
||||
}
|
||||
|
||||
private createBackButton(): void {
|
||||
createButton({
|
||||
scene: this,
|
||||
label: "← Back",
|
||||
x: 80,
|
||||
y: 30,
|
||||
onClick: async () => {
|
||||
await this.sceneController.launch(SceneKey.IndexScene);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
private drawShapeViewer(): void {
|
||||
|
||||
Reference in New Issue
Block a user