@woosh/meep-engine 2.43.48 → 2.43.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,6 +55,9 @@ export class DataType {
|
|
|
55
55
|
* @returns {DataType}
|
|
56
56
|
*/
|
|
57
57
|
static from(id, name) {
|
|
58
|
+
assert.isNonNegativeInteger(id, 'id');
|
|
59
|
+
assert.isString(name, 'name');
|
|
60
|
+
|
|
58
61
|
const r = new DataType();
|
|
59
62
|
|
|
60
63
|
r.id = id;
|
|
@@ -63,3 +66,10 @@ export class DataType {
|
|
|
63
66
|
return r;
|
|
64
67
|
}
|
|
65
68
|
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @readonly
|
|
73
|
+
* @type {boolean}
|
|
74
|
+
*/
|
|
75
|
+
DataType.prototype.isDataType = true;
|
|
@@ -110,6 +110,7 @@ export class NodeDescription {
|
|
|
110
110
|
* @returns {NodeParameterDescription}
|
|
111
111
|
*/
|
|
112
112
|
getParameter(id) {
|
|
113
|
+
assert.isNonNegativeInteger(id, 'id');
|
|
113
114
|
|
|
114
115
|
const paramDescriptors = this.parameters;
|
|
115
116
|
|
|
@@ -133,6 +134,13 @@ export class NodeDescription {
|
|
|
133
134
|
* @param {PortDirection} direction
|
|
134
135
|
*/
|
|
135
136
|
createPort(type, name, direction) {
|
|
137
|
+
assert.defined(type, 'type');
|
|
138
|
+
assert.notNull(type, 'type');
|
|
139
|
+
assert.equal(type.isDataType, true, 'type.isDataType !== true');
|
|
140
|
+
|
|
141
|
+
assert.defined(direction, 'direction');
|
|
142
|
+
assert.isString(name, 'name');
|
|
143
|
+
|
|
136
144
|
const port = new Port();
|
|
137
145
|
|
|
138
146
|
const id = pickNewSetId(this.ports);
|
|
@@ -154,6 +162,8 @@ export class NodeDescription {
|
|
|
154
162
|
* @returns {Port|null}
|
|
155
163
|
*/
|
|
156
164
|
getPortById(id) {
|
|
165
|
+
assert.isNonNegativeInteger(id, 'id');
|
|
166
|
+
|
|
157
167
|
for (const port of this.ports) {
|
|
158
168
|
if (port.id === id) {
|
|
159
169
|
return port;
|
|
@@ -170,6 +180,7 @@ export class NodeDescription {
|
|
|
170
180
|
* @return {Port|undefined}
|
|
171
181
|
*/
|
|
172
182
|
getPortByName(name) {
|
|
183
|
+
assert.isString(name, 'name');
|
|
173
184
|
|
|
174
185
|
for (const port of this.ports) {
|
|
175
186
|
if (port.name === name) {
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"productName": "Meep",
|
|
6
6
|
"description": "production-ready JavaScript game engine based on Entity Component System Architecture",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.43.
|
|
8
|
+
"version": "2.43.49",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|