diff options
Diffstat (limited to 'lib/nodes')
| -rw-r--r-- | lib/nodes/physical.js | 26 | ||||
| -rw-r--r-- | lib/nodes/physical_with_attributes.js | 31 | ||||
| -rw-r--r-- | lib/nodes/renderable.js | 9 | ||||
| -rw-r--r-- | lib/nodes/renderable_couple.js | 28 | ||||
| -rw-r--r-- | lib/nodes/renderable_with_attributes.js | 30 |
5 files changed, 118 insertions, 6 deletions
diff --git a/lib/nodes/physical.js b/lib/nodes/physical.js new file mode 100644 index 0000000..77139ec --- /dev/null +++ b/lib/nodes/physical.js @@ -0,0 +1,26 @@ +import { Node } from '@serpentity/serpentity'; + +import BodyComponent from '../components/body'; + +/** + * Node identifying an entity that can interact with physics + * + * @extends {external:Serpentity.Node} + * @class PhysicalNode + */ +export default class PhysicalNode extends Node { + +}; + +/** + * Holds the types that are used to identify an entity with a physical + * body + * + * @property {object} types + * @name types + * @memberof PhysicalNode + */ +PhysicalNode.types = { + body: BodyComponent +}; + diff --git a/lib/nodes/physical_with_attributes.js b/lib/nodes/physical_with_attributes.js new file mode 100644 index 0000000..96ba79d --- /dev/null +++ b/lib/nodes/physical_with_attributes.js @@ -0,0 +1,31 @@ +import { Node } from '@serpentity/serpentity'; + +import AngleComponent from '../components/angle'; +import BodyComponent from '../components/body'; +import PositionComponent from '@serpentity/components.position'; + +/** + * Node identifying an entity that can interact with physics and has + * components updated from its values + * + * @extends {external:Serpentity.Node} + * @class PhysicalWithAttributesNode + */ +export default class PhysicalWithAttributesNode extends Node { + +}; + +/** + * Holds the types that are used to identify an entity with a physics + * object and external attributes + * + * @property {object} types + * @name types + * @memberof PhysicalWithAttributesNode + */ +PhysicalWithAttributesNode.types = { + angle: AngleComponent, + position: PositionComponent, + body: BodyComponent +}; + diff --git a/lib/nodes/renderable.js b/lib/nodes/renderable.js index 0a3a111..12227a3 100644 --- a/lib/nodes/renderable.js +++ b/lib/nodes/renderable.js @@ -1,11 +1,9 @@ import { Node } from '@serpentity/serpentity'; import PixiContainerComponent from '../components/pixi_container'; -import PositionComponent from '@serpentity/components.position'; /** - * Node identifying a renderable entity, should have position and a - * symbol to render + * Node identifying a renderable entity, should have a pixi renderable * * @extends {external:Serpentity.Node} * @class RenderableNode @@ -15,13 +13,12 @@ export default class RenderableNode extends Node { }; /** - * Holds the types that are used to identify a wave entity + * Holds the types that are used to identify a renderable entity * * @property {object} types * @name types - * @memberof WaveNode + * @memberof RenderableNode */ RenderableNode.types = { - position: PositionComponent, container: PixiContainerComponent }; diff --git a/lib/nodes/renderable_couple.js b/lib/nodes/renderable_couple.js new file mode 100644 index 0000000..39ab886 --- /dev/null +++ b/lib/nodes/renderable_couple.js @@ -0,0 +1,28 @@ +import { Node } from '@serpentity/serpentity'; + +import CoupledEntitiesComponent from '../components/coupled_entities'; +import PixiContainerComponent from '../components/pixi_container'; + +/** + * Node identifying an entity that has coupled entities and can be + * rendered + * + * @extends {external:Serpentity.Node} + * @class RenderableCoupleNode + */ +export default class RenderableCoupleNode extends Node { + +}; + +/** + * Holds the types that are used to identify a renderable couple + * + * @property {object} types + * @name types + * @memberof RenderableCoupleNode + */ +RenderableCoupleNode.types = { + coupledEntities: CoupledEntitiesComponent, + container: PixiContainerComponent +}; + diff --git a/lib/nodes/renderable_with_attributes.js b/lib/nodes/renderable_with_attributes.js new file mode 100644 index 0000000..817036c --- /dev/null +++ b/lib/nodes/renderable_with_attributes.js @@ -0,0 +1,30 @@ +import { Node } from '@serpentity/serpentity'; + +import AngleComponent from '../components/angle'; +import PixiContainerComponent from '../components/pixi_container'; +import PositionComponent from '@serpentity/components.position'; + +/** + * Node identifying a renderable entity, should have position and a + * symbol to render + * + * @extends {external:Serpentity.Node} + * @class RenderableWithAttributesNode + */ +export default class RenderableWithAttributesNode extends Node { + +}; + +/** + * Holds the types that are used to identify a renderable with external + * attributes + * + * @property {object} types + * @name types + * @memberof RenderableWithAttributesNode + */ +RenderableWithAttributesNode.types = { + angle: AngleComponent, + position: PositionComponent, + container: PixiContainerComponent +}; |