2024-06-27 13:57:18 -05:00
|
|
|
import {Container} from '@pixi/react';
|
|
|
|
|
2024-06-27 02:57:28 -05:00
|
|
|
import Entity from './entity.jsx';
|
2024-06-18 07:24:20 -05:00
|
|
|
|
2024-06-24 09:19:24 -05:00
|
|
|
export default function Entities({entities}) {
|
2024-06-18 07:24:20 -05:00
|
|
|
const renderables = [];
|
2024-06-11 18:42:48 -05:00
|
|
|
for (const id in entities) {
|
2024-06-18 07:24:20 -05:00
|
|
|
renderables.push(
|
2024-06-27 02:57:28 -05:00
|
|
|
<Entity
|
|
|
|
entity={entities[id]}
|
2024-06-21 04:50:17 -05:00
|
|
|
key={id}
|
2024-06-27 02:57:28 -05:00
|
|
|
/>
|
2024-06-11 18:42:48 -05:00
|
|
|
);
|
|
|
|
}
|
2024-06-27 13:57:18 -05:00
|
|
|
return (
|
|
|
|
<Container
|
|
|
|
sortableChildren
|
|
|
|
>
|
|
|
|
{renderables}
|
|
|
|
</Container>
|
|
|
|
);
|
2024-06-11 18:42:48 -05:00
|
|
|
}
|