From a77658c88f5d905439d9b14bbe9d531b026cacb7 Mon Sep 17 00:00:00 2001 From: Erik Onarheim Date: Tue, 26 Dec 2023 09:04:56 -0600 Subject: [PATCH] fix: Allow materials to be null on GraphicsComponent --- CHANGELOG.md | 2 +- src/engine/Graphics/GraphicsComponent.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd6c75134..e3b39d8d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed -- +- Fixed TS type on `GraphicsComponent` and allow `.material` to be null to unset, current workaround is using `.material = null as any` ### Updates diff --git a/src/engine/Graphics/GraphicsComponent.ts b/src/engine/Graphics/GraphicsComponent.ts index 037c3ee81..c9b27a216 100644 --- a/src/engine/Graphics/GraphicsComponent.ts +++ b/src/engine/Graphics/GraphicsComponent.ts @@ -264,7 +264,7 @@ export class GraphicsComponent extends Component<'ex.graphics'> { public layers: GraphicsLayers; - public material: Material; + public material: Material | null = null; public getGraphic(name: string): Graphic | undefined { return this._graphics[name];