22 lines
381 B
JavaScript
22 lines
381 B
JavaScript
import {Container} from '@pixi/react';
|
|
|
|
import Entity from './entity.jsx';
|
|
|
|
export default function Entities({entities}) {
|
|
const renderables = [];
|
|
for (const id in entities) {
|
|
renderables.push(
|
|
<Entity
|
|
entity={entities[id]}
|
|
key={id}
|
|
/>
|
|
);
|
|
}
|
|
return (
|
|
<Container
|
|
sortableChildren
|
|
>
|
|
{renderables}
|
|
</Container>
|
|
);
|
|
} |