Autotiles are a new asset type with a tab that shows every tile of the floor (2x3) or wall (2x2) block and an animated sample pattern (#118)
game-maker / gate (push) Successful in 1m50s
game-maker / suite (push) Successful in 5m59s

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5 committed 2026-09-17 21:35:29 +02:00
1 parent c17b2b5426
commit 1a9f07c4ac
24 files changed
+1797 -18

No files matched your search

+11 -1
View File
@@ -30,6 +30,7 @@ import { GraphEditor } from './graph/GraphEditor';
import { Inspector } from './inspector/Inspector';
import { ListEditor } from './list/ListEditor';
import { AnimationEditor } from './animation/AnimationEditor';
import { AutotileEditor } from './autotile/AutotileEditor';
import { AssetPanel } from './panels/AssetPanel';
import { HierarchyPanel } from './panels/HierarchyPanel';
import { Toolbar } from './panels/Toolbar';
@@ -55,6 +56,7 @@ export type CentreTab =
| 'game'
| 'texture'
| 'animation'
| 'autotile'
| 'container'
| 'list'
| 'plugins';
@@ -72,6 +74,7 @@ const TAB_ORDER = [
'particles',
'texture',
'animation',
'autotile',
'container',
'list',
'plugins',
@@ -86,6 +89,7 @@ const TAB_LABELS: Record<CentreTab, string> = {
particles: 'Particles',
texture: 'Texture',
animation: 'Animation',
autotile: 'Autotile',
container: 'Container',
list: 'List',
plugins: 'Plugins',
@@ -100,6 +104,7 @@ const TAB_OF_ASSET: Partial<Record<AssetType, CentreTab>> = {
particles: 'particles',
texture: 'texture',
animation: 'animation',
autotile: 'autotile',
container: 'container',
};
@@ -127,6 +132,7 @@ export class Editor implements PlayHost {
readonly particlesEditor: ParticlesEditor;
readonly textureEditor: TextureEditor;
readonly animationEditor: AnimationEditor;
readonly autotileEditor: AutotileEditor;
readonly containerEditor: ContainerEditor;
readonly listEditor: ListEditor;
/** Plugins tab: the switch per file in `data/plugins/`. */
@@ -177,6 +183,7 @@ export class Editor implements PlayHost {
this.particlesEditor = new ParticlesEditor(state);
this.textureEditor = new TextureEditor(state);
this.animationEditor = new AnimationEditor(state);
this.autotileEditor = new AutotileEditor(state);
this.containerEditor = new ContainerEditor(state);
this.listEditor = new ListEditor(state);
this.hierarchy = new HierarchyPanel(state);
@@ -235,6 +242,7 @@ export class Editor implements PlayHost {
particles: this.particlesEditor,
texture: this.textureEditor,
animation: this.animationEditor,
autotile: this.autotileEditor,
container: this.containerEditor,
list: this.listEditor,
plugins: this.pluginsPane,
@@ -408,6 +416,7 @@ export class Editor implements PlayHost {
this.gameView.animate();
this.console.refresh();
if (this.tab === 'animation') this.animationEditor.tick(step);
if (this.tab === 'autotile') this.autotileEditor.tick(step);
// Play repaints the machine tab itself (see `PlaySession.tick`); an editor run has no session
// to do it, and its states move just the same.
if (this.tab === 'statemachine' && this.editorRun.isRunning) this.stateMachineEditor.canvas.redraw();
@@ -426,7 +435,8 @@ export class Editor implements PlayHost {
(this.viewport.visible && this.viewport.animates) ||
(this.gameView.visible && this.gameView.animates) ||
this.tab === 'particles' ||
(this.tab === 'animation' && this.animationEditor.isPlaying)
(this.tab === 'animation' && this.animationEditor.isPlaying) ||
(this.tab === 'autotile' && this.autotileEditor.isPlaying)
);
}