@duet3d/objectmodel 3.4.0-b2 → 3.4.0-b3

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.
@@ -153,3 +153,16 @@ class ModelObject {
153
153
  }
154
154
  }
155
155
  exports.default = ModelObject;
156
+ /**
157
+ * Initialize a class item from the given data
158
+ * @param itemType Item type to create
159
+ * @param data Data to assign
160
+ * @returns Initialized item instance
161
+ */
162
+ function initItem(itemType, data) {
163
+ const result = new itemType();
164
+ for (let key in data) {
165
+ result[key] = data[key];
166
+ }
167
+ return result;
168
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duet3d/objectmodel",
3
- "version": "3.4.0-b2",
3
+ "version": "3.4.0-b3",
4
4
  "description": "TypeScript implementation of the Duet3D Object Model",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",