From 493ec31cb19b4211c703762d14a4e6232c4c2143 Mon Sep 17 00:00:00 2001 From: Rubén Beltrán del Río Date: Sat, 21 Apr 2018 17:45:38 -0500 Subject: Physics Engine (#4) * Add matter-js as a dependency * Add body component * Fix renderable node doc * Add the physics node type * Correct typo in physics enabled node types * Update docs on render system * Add physics system * Update changelog * Add physics engine to main app * Tweak the gravity of the world * Add body to sumo factory * Add angle component * Add angle to entity * Add angle to the nodes * Pass angle between systems * Set default angle to 0 * Split systems and nodes * Fix indentaion in physics world control * Add third sumo entity * Adjust values for constriants and physics * Correct docs in new nodes * Update built-in docs --- lib/nodes/renderable_with_attributes.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lib/nodes/renderable_with_attributes.js (limited to 'lib/nodes/renderable_with_attributes.js') 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 +}; -- cgit