Skip to content

Components

tracend edited this page Dec 7, 2014 · 7 revisions

Functionality is encapsulated in independent components, which communicate with the main lib using the ```construct`` object loaded in the global namespace.

The officially supported list of components are available at: http://github.com/construct-components

Developers are encouraged to extend the core library with their own components, that could be either app specific or re-usable in nature.

The template for any given component is at: http://github.com/constructjs/component

Collections are compiled for types of components, to shorten the dependency list on the application level.

construct-asset construct-terrain

object-lod

construct-tree construct-bush construct-grass app.ui.slider construct.grass

construct-building construct-road

construct-vehicles

construct-human construct-animal

=======================

construct-objects

construct-physics

<div class="construct">
	<construct-water></construct-water>
</div>

<div class="construct">
	<elem-steam></element-steam>
	<elem-rain></element-rain>
	<elem-fire></element-fire>
	<elem-smoke></element-smoke>
	<elem-water></element-water>
	<elem-clouds></element-clouds>

construct-water construct-fog construct-rain

<div class="construct">

	<obj-sprite></object-sprite>

	<obj-crate></object-crate>
	<obj-barrel></object-barrel>
	<obj-rock></object-rock>
	<obj-tree></object-tree>
</div>


<div class="construct">
	<char-player></character-player>
	<char-player></avatar-player>
	<char-npc></avatar-npc>
</div>

Sample application

<x-construct>
	<scene>
		<sea is=“construct-water”></sea>
	</scene>
</x-construct>
Clone this wiki locally