From 8e1dd99b9381f9a03154251a8b808d0bf9291a0b Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 9 Jan 2024 21:57:35 -0500 Subject: [PATCH] refactor(render): fix circular dependencies --- src/render/gameobject.ts | 4 +++- src/render/render.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/render/gameobject.ts b/src/render/gameobject.ts index e5eab03c..b8ce9218 100644 --- a/src/render/gameobject.ts +++ b/src/render/gameobject.ts @@ -2,7 +2,9 @@ import Phaser from 'phaser'; import type { JSX } from 'react'; import { isValidElement } from '../element'; -import { attachRef, createContainer, setProps } from '.'; +import { createContainer } from './container'; +import { setProps } from './props'; +import { attachRef } from './ref'; /** * Creates Phaser game object and adds it to the container. diff --git a/src/render/render.ts b/src/render/render.ts index a2cbdd0e..3f23f6bc 100644 --- a/src/render/render.ts +++ b/src/render/render.ts @@ -1,7 +1,8 @@ import Phaser from 'phaser'; import type { JSX } from 'react'; -import { createContainer, createGameObject } from '.'; +import { createContainer } from './container'; +import { createGameObject } from './gameobject'; /** * Renders a piece of JSX into a Phaser scene.