@threekit-tools/treble 0.0.98 → 0.0.99

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.
@@ -245,9 +245,21 @@ var initPlayer = function (config) {
245
245
  hydrate: true,
246
246
  });
247
247
  updatedAttributes = attributes.map(function (attr) {
248
- return Object.assign({}, attr, configuration[attr.name]
249
- ? { value: configuration[attr.name] }
250
- : undefined);
248
+ var value = configuration[attr.name];
249
+ var preppedAttr = Object.assign({}, attr, value ? { value: value } : undefined);
250
+ if (preppedAttr.type === 'Color') {
251
+ preppedAttr.defaultValue = {
252
+ r: preppedAttr.defaultValue.r,
253
+ g: preppedAttr.defaultValue.g,
254
+ b: preppedAttr.defaultValue.b,
255
+ };
256
+ preppedAttr.value = {
257
+ r: preppedAttr.value.r,
258
+ g: preppedAttr.value.g,
259
+ b: preppedAttr.value.b,
260
+ };
261
+ }
262
+ return preppedAttr;
251
263
  });
252
264
  dispatch((0, attributes_1.setAttributes)(updatedAttributes));
253
265
  return [4, ((_a = EVENTS.postConfigurationChange) === null || _a === void 0 ? void 0 : _a.call(EVENTS, updatedAttributes, {}, previousAttributes))];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threekit-tools/treble",
3
- "version": "0.0.98",
3
+ "version": "0.0.99",
4
4
  "author": "Amaan Saeed",
5
5
  "license": "MIT",
6
6
  "files": [