@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.
- package/dist/store/treble.js +15 -3
- package/package.json +1 -1
package/dist/store/treble.js
CHANGED
|
@@ -245,9 +245,21 @@ var initPlayer = function (config) {
|
|
|
245
245
|
hydrate: true,
|
|
246
246
|
});
|
|
247
247
|
updatedAttributes = attributes.map(function (attr) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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))];
|