Layout component for A-Frame.
Automatically positions child entities in 3D space, with several layouts to choose from. Define the layout on the parent entity:
And then the positions will automatically be calculated and set:
As entities are added or removed, the layout component will trigger a reflow on the positions.
We move then entire group around while maintaining the layout:
|type||Type of layout. Can be one of
|columns||Number of columns (for type
|margin||Margin in meters (for type
|marginColumn||Margin in meters just for the columns (for type
|marginRow||Margin in meters just for the rows (for type
|orderAttribute||Attribute name used to explicitly order the children versus relying on inherent DOM order.||''|
|plane||Which plane direction for 2D layout. Can be
|radius||Radius in meters (for type
|reverse||Whether to reverse direction of layout.||false|
|align||Alignment of the center of layout (for type
Install and use by directly including the browser files:
My A-Frame Scene
Install via NPM:
npm install aframe-layout-component
Then register and use.