aboutsummaryrefslogtreecommitdiff
path: root/lib/nodes/renderable_with_attributes.js
diff options
context:
space:
mode:
authorRubén Beltrán del Río <ben@nsovocal.com>2018-04-21 17:45:38 -0500
committerGitHub <noreply@github.com>2018-04-21 17:45:38 -0500
commit493ec31cb19b4211c703762d14a4e6232c4c2143 (patch)
treec0c33fab8f2fb040dc714ab76f0eb5479f001b2e /lib/nodes/renderable_with_attributes.js
parent0616b3f00653c66b5e34814653e33413b9ec034e (diff)
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
Diffstat (limited to 'lib/nodes/renderable_with_attributes.js')
-rw-r--r--lib/nodes/renderable_with_attributes.js30
1 files changed, 30 insertions, 0 deletions
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
+};