Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
Version bumped to 0.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
probityrules committed Oct 20, 2015
1 parent 91e47c0 commit 96a150f
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 112 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Platypus",
"version": "0.6.4",
"version": "0.6.5",
"homepage": "https://github.com/PBS-KIDS/Platypus",
"authors": [
"probityrules",
Expand Down
2 changes: 1 addition & 1 deletion build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This command will:

**NEXT version**

The same process as above, but uses "NEXT" as the version. This is used to generate minified builds with the latest source between release versions.
The same process as above, but uses "NEXT" as the version and doesn't generate documentation. This is used to generate minified builds with the latest source between release versions.

grunt next

Expand Down
2 changes: 1 addition & 1 deletion build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Platypus",
"version": "0.6.4",
"version": "0.6.5",
"description": "Platypus Docs",
"url": "https://github.com/PBS-KIDS/Platypus",
"logo": "assets/platypus-title.png",
Expand Down
Binary file removed docs/Platypus_docs-0.6.4.zip
Binary file not shown.
Binary file added docs/Platypus_docs-0.6.5.zip
Binary file not shown.
113 changes: 58 additions & 55 deletions lib/platypus.combined.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ this.platypus = this.platypus || {};
* @type String
* @static
**/
platypus.version = /*=version*/"NEXT"; // injected by build process
platypus.version = /*=version*/"0.6.5"; // injected by build process

/**
* The build date for this release in UTC format.
* @property buildDate
* @type String
* @static
**/
platypus.buildDate = /*=date*/"Tue, 20 Oct 2015 18:50:23 GMT"; // injected by build process
platypus.buildDate = /*=date*/"Tue, 20 Oct 2015 19:41:33 GMT"; // injected by build process

})();

Expand Down Expand Up @@ -14407,7 +14407,6 @@ Replicates logic for a wind-up toy: listens for a wind-up message over a series
* @class Mover
* @uses Component
*/
// Requires: ["Motion", "../Vector.js"]
/*global platypus */
/*jslint plusplus:true */
(function () {
Expand Down Expand Up @@ -14909,58 +14908,12 @@ This component causes an entity to be a position on a [[NodeMap]]. This componen
//##############################################################################

/**
# COMPONENT **NodeMap**
This component sets up a NodeMap to be used by the [[NodeResident]] component on this entity's child entities.

## Dependencies
- [[EntityContainer]] - This component expects the entity to have an `EntityContainer` component so it knows when `NodeResident` children are added.

## Messages

### Listens for:
- **add-node** - Expects a node definition to create a node in the NodeMap.
- @param definition.nodeId (string or array) - This value becomes the id of the Node. Arrays are joined using "|" to create the id string.
- @param definition.type (string) - This determines the type of the node.
- @param definition.x (number) - Sets the x axis position of the node.
- @param definition.y (number) - Sets the y axis position of the node.
- @param definition.z (number) - Sets the z axis position of the node.
- @param definition.neighbors (object) - A list of key/value pairs where the keys are directions from the node and values are node ids. For example: {"west": "node12"}.
- **child-entity-added** - Checks the child entity for a nodeId and if found adds the child to the corresponding node.
- @param entity (Entity) - The entity that may be placed on a node.

## JSON Definition
{
"type": "NodeMap"

"map": [
// Optional. An array of node definitions to create the NodeMap.

{
"NodeId": "Node1",
// A string or array that becomes the id of the Node. Arrays are joined using "|" to create the id string.

"type": "path",
// A string that determines the type of the node.

"x": 0,
// Sets the x axis position of the node.

"y": 0,
// Sets the y axis position of the node.

"z": 0,
// Sets the z axis position of the node.

"neighbors": {
// A list of key/value pairs where the keys are directions from the node and values are node ids.

"west": "node0",
"east": "node2"
}
}
]
}
*/
* This component sets up a NodeMap to be used by the [[NodeResident]] component on this entity's child entities.
*
* @namespace platypus.components
* @class NodeMap
* @uses Component
*/
/*global platypus */
/*jslint plusplus:true */
(function () {
Expand Down Expand Up @@ -15052,6 +15005,37 @@ This component sets up a NodeMap to be used by the [[NodeResident]] component on

this.residentsAwaitingNode = [];

/**
* An array of node definitions to create the NodeMap. A node definition can take the following form:
*
* {
* "NodeId": "Node1",
* // A string or array that becomes the id of the Node. Arrays are joined using "|" to create the id string.
*
* "type": "path",
* // A string that determines the type of the node.
*
* "x": 0,
* // Sets the x axis position of the node.
*
* "y": 0,
* // Sets the y axis position of the node.
*
* "z": 0,
* // Sets the z axis position of the node.
*
* "neighbors": {
* // A list of key/value pairs where the keys are directions from the node and values are node ids.
*
* "west": "node0",
* "east": "node2"
* }
* }
*
* @property map
* @type Array
* @default []
*/
if (definition.map) {
for (i = 0; i < definition.map.length; i++) {
this.addNode(new Node(definition.map[i], this));
Expand All @@ -15060,6 +15044,18 @@ This component sets up a NodeMap to be used by the [[NodeResident]] component on
},

events: {
/**
* Expects a node definition to create a node in the NodeMap.
*
* @method 'add-node'
* @param definition {Object} Key/value pairs.
* @param definition.nodeId {String|Array} This value becomes the id of the Node. Arrays are joined using "|" to create the id string.
* @param definition.type {String} This determines the type of the node.
* @param definition.x {String} Sets the x axis position of the node.
* @param definition.y {String} Sets the y axis position of the node.
* @param definition.z {String} Sets the z axis position of the node.
* @param definition.neighbors {Object} A list of key/value pairs where the keys are directions from the node and values are node ids. For example: {"west": "node12"}.
*/
"add-node": function (nodeDefinition) {
var i = 0,
entity = null,
Expand All @@ -15083,6 +15079,13 @@ This component sets up a NodeMap to be used by the [[NodeResident]] component on
}
}
},

/**
* Checks the child entity for a nodeId and if found adds the child to the corresponding node.
*
* @method 'child-entity-added'
* @param entity {Entity} The entity that may be placed on a node, or if the entity is a node it is added to the map of nodes.
*/
"child-entity-added": function (entity) {
if(entity.isNode){ // a node
this.owner.triggerEvent('add-node', entity);
Expand Down
2 changes: 1 addition & 1 deletion lib/platypus.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/components/Mover.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @class Mover
* @uses Component
*/
// Requires: ["Motion", "../Vector.js"]
/*global platypus */
/*jslint plusplus:true */
(function () {
Expand Down
108 changes: 56 additions & 52 deletions src/components/NodeMap.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,10 @@
/**
# COMPONENT **NodeMap**
This component sets up a NodeMap to be used by the [[NodeResident]] component on this entity's child entities.
## Dependencies
- [[EntityContainer]] - This component expects the entity to have an `EntityContainer` component so it knows when `NodeResident` children are added.
## Messages
### Listens for:
- **add-node** - Expects a node definition to create a node in the NodeMap.
- @param definition.nodeId (string or array) - This value becomes the id of the Node. Arrays are joined using "|" to create the id string.
- @param definition.type (string) - This determines the type of the node.
- @param definition.x (number) - Sets the x axis position of the node.
- @param definition.y (number) - Sets the y axis position of the node.
- @param definition.z (number) - Sets the z axis position of the node.
- @param definition.neighbors (object) - A list of key/value pairs where the keys are directions from the node and values are node ids. For example: {"west": "node12"}.
- **child-entity-added** - Checks the child entity for a nodeId and if found adds the child to the corresponding node.
- @param entity (Entity) - The entity that may be placed on a node.
## JSON Definition
{
"type": "NodeMap"
"map": [
// Optional. An array of node definitions to create the NodeMap.
{
"NodeId": "Node1",
// A string or array that becomes the id of the Node. Arrays are joined using "|" to create the id string.
"type": "path",
// A string that determines the type of the node.
"x": 0,
// Sets the x axis position of the node.
"y": 0,
// Sets the y axis position of the node.
"z": 0,
// Sets the z axis position of the node.
"neighbors": {
// A list of key/value pairs where the keys are directions from the node and values are node ids.
"west": "node0",
"east": "node2"
}
}
]
}
*/
* This component sets up a NodeMap to be used by the [[NodeResident]] component on this entity's child entities.
*
* @namespace platypus.components
* @class NodeMap
* @uses Component
*/
/*global platypus */
/*jslint plusplus:true */
(function () {
Expand Down Expand Up @@ -142,6 +96,37 @@ This component sets up a NodeMap to be used by the [[NodeResident]] component on

this.residentsAwaitingNode = [];

/**
* An array of node definitions to create the NodeMap. A node definition can take the following form:
*
* {
* "NodeId": "Node1",
* // A string or array that becomes the id of the Node. Arrays are joined using "|" to create the id string.
*
* "type": "path",
* // A string that determines the type of the node.
*
* "x": 0,
* // Sets the x axis position of the node.
*
* "y": 0,
* // Sets the y axis position of the node.
*
* "z": 0,
* // Sets the z axis position of the node.
*
* "neighbors": {
* // A list of key/value pairs where the keys are directions from the node and values are node ids.
*
* "west": "node0",
* "east": "node2"
* }
* }
*
* @property map
* @type Array
* @default []
*/
if (definition.map) {
for (i = 0; i < definition.map.length; i++) {
this.addNode(new Node(definition.map[i], this));
Expand All @@ -150,6 +135,18 @@ This component sets up a NodeMap to be used by the [[NodeResident]] component on
},

events: {
/**
* Expects a node definition to create a node in the NodeMap.
*
* @method 'add-node'
* @param definition {Object} Key/value pairs.
* @param definition.nodeId {String|Array} This value becomes the id of the Node. Arrays are joined using "|" to create the id string.
* @param definition.type {String} This determines the type of the node.
* @param definition.x {String} Sets the x axis position of the node.
* @param definition.y {String} Sets the y axis position of the node.
* @param definition.z {String} Sets the z axis position of the node.
* @param definition.neighbors {Object} A list of key/value pairs where the keys are directions from the node and values are node ids. For example: {"west": "node12"}.
*/
"add-node": function (nodeDefinition) {
var i = 0,
entity = null,
Expand All @@ -173,6 +170,13 @@ This component sets up a NodeMap to be used by the [[NodeResident]] component on
}
}
},

/**
* Checks the child entity for a nodeId and if found adds the child to the corresponding node.
*
* @method 'child-entity-added'
* @param entity {Entity} The entity that may be placed on a node, or if the entity is a node it is added to the map of nodes.
*/
"child-entity-added": function (entity) {
if(entity.isNode){ // a node
this.owner.triggerEvent('add-node', entity);
Expand Down

0 comments on commit 96a150f

Please sign in to comment.