Socket
Socket
Sign inDemoInstall

@systemic-games/pixels-edit-animation

Package Overview
Dependencies
3
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 1.0.0

dist/cjs/__tests__/test.test.js

153

dist/cjs/AppDataSet.js

@@ -6,6 +6,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var EditDataSet_1 = __importDefault(require("./edit/EditDataSet"));
var EditProfile_1 = __importDefault(require("./edit/EditProfile"));
var AppDataSet = /** @class */ (function () {
function AppDataSet(options) {
const EditDataSet_1 = __importDefault(require("./edit/EditDataSet"));
const EditProfile_1 = __importDefault(require("./edit/EditProfile"));
class AppDataSet {
constructor(options) {
var _a, _b, _c, _d, _e;

@@ -18,57 +18,37 @@ this._patterns = (_a = options === null || options === void 0 ? void 0 : options.patterns) !== null && _a !== void 0 ? _a : [];

}
Object.defineProperty(AppDataSet.prototype, "patterns", {
get: function () {
return this._patterns;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AppDataSet.prototype, "animations", {
get: function () {
return this._animations;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AppDataSet.prototype, "audioClips", {
get: function () {
return this._audioClips;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AppDataSet.prototype, "profiles", {
get: function () {
return this._profiles;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AppDataSet.prototype, "defaultProfile", {
get: function () {
return this._defaultProfile;
},
enumerable: false,
configurable: true
});
AppDataSet.prototype.findPattern = function (name) {
return this._patterns.find(function (p) { return p.name === name; });
};
AppDataSet.prototype.findAnimation = function (name) {
return this._animations.find(function (p) { return p.name === name; });
};
AppDataSet.prototype.findAudioClip = function (name) {
return this._audioClips.find(function (p) { return p.name === name; });
};
AppDataSet.prototype.findProfile = function (name) {
return this._profiles.find(function (p) { return p.name === name; });
};
AppDataSet.prototype.extractForAnimation = function (animation) {
get patterns() {
return this._patterns;
}
get animations() {
return this._animations;
}
get audioClips() {
return this._audioClips;
}
get profiles() {
return this._profiles;
}
get defaultProfile() {
return this._defaultProfile;
}
findPattern(name) {
return this._patterns.find((p) => p.name === name);
}
findAnimation(name) {
return this._animations.find((p) => p.name === name);
}
findAudioClip(name) {
return this._audioClips.find((p) => p.name === name);
}
findProfile(name) {
return this._profiles.find((p) => p.name === name);
}
extractForAnimation(animation) {
// The EditDataSet that will only contain the given animation and its patterns
var dataSet = new EditDataSet_1.default();
const dataSet = new EditDataSet_1.default();
// Add the single animation we need
dataSet.animations.push(animation);
// Include all patterns used by the animations
this._patterns.forEach(function (pattern) {
var required = animation.requiresPattern(pattern);
this._patterns.forEach((pattern) => {
const required = animation.requiresPattern(pattern);
if (required) {

@@ -84,15 +64,14 @@ if (required.asRgb) {

return dataSet;
};
AppDataSet.prototype.extractForAnimations = function (animations) {
var _a;
}
extractForAnimations(animations) {
// The EditDataSet that will only contain the given animation and its patterns
var dataSet = new EditDataSet_1.default();
const dataSet = new EditDataSet_1.default();
// Add the single animation we need
(_a = dataSet.animations).push.apply(_a, animations);
dataSet.animations.push(...animations);
// Include all patterns used by the animations
this._patterns.forEach(function (pattern) {
var asRgb = false;
if (animations.find(function (anim) {
this._patterns.forEach((pattern) => {
let asRgb = false;
if (animations.find((anim) => {
var _a;
var required = anim.requiresPattern(pattern);
const required = anim.requiresPattern(pattern);
asRgb = (_a = required === null || required === void 0 ? void 0 : required.asRgb) !== null && _a !== void 0 ? _a : false;

@@ -110,5 +89,4 @@ return !!required;

return dataSet;
};
AppDataSet.prototype.extractForProfile = function (profile) {
var _a;
}
extractForProfile(profile) {
if (!this._profiles.includes(profile)) {

@@ -119,17 +97,17 @@ throw new Error("Profile not in AppDataSet");

// for the given profile
var dataSet = new EditDataSet_1.default({
const dataSet = new EditDataSet_1.default({
profile: profile.duplicate(),
});
// And add the animations that the given profile uses
var animations = dataSet.profile.collectAnimations();
const animations = dataSet.profile.collectAnimations();
// Add default rules and animations to profile / set
if (this._defaultProfile) {
// Rules that are in fact copied over
var copiedRules_1 = [];
this._defaultProfile.rules.forEach(function (rule) {
var cond = rule.condition;
const copiedRules = [];
this._defaultProfile.rules.forEach((rule) => {
const cond = rule.condition;
if (cond &&
!dataSet.profile.rules.find(function (r) { var _a; return ((_a = r.condition) === null || _a === void 0 ? void 0 : _a.type) === cond.type; })) {
var ruleCopy = rule.duplicate();
copiedRules_1.push(ruleCopy);
!dataSet.profile.rules.find((r) => { var _a; return ((_a = r.condition) === null || _a === void 0 ? void 0 : _a.type) === cond.type; })) {
const ruleCopy = rule.duplicate();
copiedRules.push(ruleCopy);
dataSet.profile.rules.push(ruleCopy);

@@ -139,12 +117,12 @@ }

// Copied animations
var copiedAnims_1 = new Map();
const copiedAnims = new Map();
// Add animations used by default rules
this._defaultProfile.collectAnimations().forEach(function (editAnim) {
copiedRules_1.forEach(function (copiedRule) {
this._defaultProfile.collectAnimations().forEach((editAnim) => {
copiedRules.forEach((copiedRule) => {
if (copiedRule.requiresAnimation(editAnim)) {
var copiedAnim = copiedAnims_1.get(editAnim);
let copiedAnim = copiedAnims.get(editAnim);
if (!copiedAnim) {
copiedAnim = editAnim.duplicate();
animations.push(copiedAnim);
copiedAnims_1.set(editAnim, copiedAnim);
copiedAnims.set(editAnim, copiedAnim);
}

@@ -157,9 +135,9 @@ copiedRule.replaceAnimation(editAnim, copiedAnim);

// Copy our animations list to the resulting EditDataSet
(_a = dataSet.animations).push.apply(_a, animations);
dataSet.animations.push(...animations);
// Include all patterns used by the animations
this._patterns.forEach(function (pattern) {
var asRgb = false;
if (animations.find(function (anim) {
this._patterns.forEach((pattern) => {
let asRgb = false;
if (animations.find((anim) => {
var _a;
var required = anim.requiresPattern(pattern);
const required = anim.requiresPattern(pattern);
asRgb = (_a = required === null || required === void 0 ? void 0 : required.asRgb) !== null && _a !== void 0 ? _a : false;

@@ -177,5 +155,4 @@ return !!required;

return dataSet;
};
return AppDataSet;
}());
}
}
exports.default = AppDataSet;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ColorTypeValues = void 0;
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
/**
* @enum
*/
exports.ColorTypeValues = {

@@ -6,0 +9,0 @@ Rgb: (0, pixels_core_utils_1.enumValue)(0),

"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPropsWithSkipEnum = exports.skipEnum = exports.getPropsWithDisplayOrder = exports.displayOrder = exports.getPropsWithWidget = exports.widget = exports.getPropsWithUnits = exports.units = exports.getPropsWithRange = exports.range = exports.getPropsWithName = exports.name = void 0;
function addMetadata(metadataKey, target, metadata) {
var properties = Reflect.getMetadata(metadataKey, target);
const properties = Reflect.getMetadata(metadataKey, target);
if (properties) {

@@ -26,3 +15,3 @@ properties.push(metadata);

return function registerProperty(target, propertyKey) {
var metadata = __assign({ propertyKey: propertyKey }, data); //TODO error without cast
const metadata = Object.assign({ propertyKey }, data); //TODO error without cast
addMetadata(metadataKey, target, metadata);

@@ -35,6 +24,6 @@ };

}
var nameKey = Symbol("pixelAnimationName");
const nameKey = Symbol("pixelAnimationName");
// Name decorator factory
function name(name) {
return createDecorator(nameKey, { name: name });
return createDecorator(nameKey, { name });
}

@@ -47,10 +36,9 @@ exports.name = name;

exports.getPropsWithName = getPropsWithName;
var rangeKey = Symbol("pixelAnimationRange");
const rangeKey = Symbol("pixelAnimationRange");
// Range decorator factory
function range(min, max, step) {
if (step === void 0) { step = 0; }
function range(min, max, step = 0) {
return createDecorator(rangeKey, {
min: min,
max: max,
step: step,
min,
max,
step,
});

@@ -64,6 +52,6 @@ }

exports.getPropsWithRange = getPropsWithRange;
var unitKey = Symbol("pixelAnimationUnits");
const unitKey = Symbol("pixelAnimationUnits");
// Units decorator factory
function units(unit) {
return createDecorator(unitKey, { unit: unit });
return createDecorator(unitKey, { unit });
}

@@ -76,6 +64,6 @@ exports.units = units;

exports.getPropsWithUnits = getPropsWithUnits;
var widgetKey = Symbol("pixelAnimationWidget");
const widgetKey = Symbol("pixelAnimationWidget");
// Widget decorator factory
function widget(type) {
return createDecorator(widgetKey, { type: type });
return createDecorator(widgetKey, { type });
}

@@ -88,6 +76,6 @@ exports.widget = widget;

exports.getPropsWithWidget = getPropsWithWidget;
var displayOrderKey = Symbol("pixelAnimationDisplayOrder");
const displayOrderKey = Symbol("pixelAnimationDisplayOrder");
// Display order decorator factory
function displayOrder(index) {
return createDecorator(displayOrderKey, { index: index });
return createDecorator(displayOrderKey, { index });
}

@@ -100,6 +88,6 @@ exports.displayOrder = displayOrder;

exports.getPropsWithDisplayOrder = getPropsWithDisplayOrder;
var skipEnumKey = Symbol("pixelAnimationSkipEnum");
const skipEnumKey = Symbol("pixelAnimationSkipEnum");
// Skip decorator
function skipEnum(target, propertyKey) {
addMetadata(skipEnumKey, target, { propertyKey: propertyKey });
addMetadata(skipEnumKey, target, { propertyKey });
}

@@ -106,0 +94,0 @@ exports.skipEnum = skipEnum;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Editable = /** @class */ (function () {
function Editable() {
}
return Editable;
}());
class Editable {
}
exports.default = Editable;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,19 +6,14 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var Editable_1 = __importDefault(require("./Editable"));
var EditAction = /** @class */ (function (_super) {
__extends(EditAction, _super);
function EditAction() {
return _super !== null && _super.apply(this, arguments) || this;
}
EditAction.prototype.replaceAnimation = function (_oldAnimation, _newAnimation
const Editable_1 = __importDefault(require("./Editable"));
class EditAction extends Editable_1.default {
replaceAnimation(_oldAnimation, _newAnimation
// eslint-disable-next-line @typescript-eslint/no-empty-function
) { };
EditAction.prototype.requiresAnimation = function (_animation) {
) { }
requiresAnimation(_animation) {
return false;
};
EditAction.prototype.collectAnimations = function () {
}
collectAnimations() {
return [];
};
return EditAction;
}(Editable_1.default));
}
}
exports.default = EditAction;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,25 +12,17 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditAction_1 = __importDefault(require("./EditAction"));
var decorators_1 = require("./decorators");
var EditActionPlayAnimation = /** @class */ (function (_super) {
__extends(EditActionPlayAnimation, _super);
function EditActionPlayAnimation(animation, faceIndex, loopCount) {
if (faceIndex === void 0) { faceIndex = -1; }
if (loopCount === void 0) { loopCount = 1; }
var _this = _super.call(this) || this;
_this.animation = animation;
_this.faceIndex = faceIndex;
_this.loopCount = loopCount;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditAction_1 = __importDefault(require("./EditAction"));
const decorators_1 = require("./decorators");
class EditActionPlayAnimation extends EditAction_1.default {
constructor(animation, faceIndex = -1, loopCount = 1) {
super();
this.animation = animation;
this.faceIndex = faceIndex;
this.loopCount = loopCount;
}
Object.defineProperty(EditActionPlayAnimation.prototype, "type", {
get: function () {
return pixels_core_animation_1.ActionTypeValues.PlayAnimation;
},
enumerable: false,
configurable: true
});
EditActionPlayAnimation.prototype.toAction = function (editSet, _set) {
get type() {
return pixels_core_animation_1.ActionTypeValues.PlayAnimation;
}
toAction(editSet, _set) {
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.ActionPlayAnimation(), {

@@ -58,31 +35,30 @@ animIndex: this.animation

});
};
EditActionPlayAnimation.prototype.duplicate = function () {
}
duplicate() {
return new EditActionPlayAnimation(this.animation, this.faceIndex, this.loopCount);
};
EditActionPlayAnimation.prototype.replaceAnimation = function (oldAnimation, newAnimation) {
}
replaceAnimation(oldAnimation, newAnimation) {
if (this.animation === oldAnimation) {
this.animation = newAnimation;
}
};
EditActionPlayAnimation.prototype.requiresAnimation = function (animation) {
}
requiresAnimation(animation) {
return this.animation === animation;
};
EditActionPlayAnimation.prototype.collectAnimations = function () {
}
collectAnimations() {
return this.animation ? [this.animation] : [];
};
__decorate([
(0, decorators_1.name)("Lighting Pattern")
], EditActionPlayAnimation.prototype, "animation", void 0);
__decorate([
(0, decorators_1.widget)("playbackFace"),
(0, decorators_1.name)("Play on Face")
], EditActionPlayAnimation.prototype, "faceIndex", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(1, 10),
(0, decorators_1.name)("Repeat Count")
], EditActionPlayAnimation.prototype, "loopCount", void 0);
return EditActionPlayAnimation;
}(EditAction_1.default));
}
}
__decorate([
(0, decorators_1.name)("Lighting Pattern")
], EditActionPlayAnimation.prototype, "animation", void 0);
__decorate([
(0, decorators_1.widget)("playbackFace"),
(0, decorators_1.name)("Play on Face")
], EditActionPlayAnimation.prototype, "faceIndex", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(1, 10),
(0, decorators_1.name)("Repeat Count")
], EditActionPlayAnimation.prototype, "loopCount", void 0);
exports.default = EditActionPlayAnimation;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,21 +12,15 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditAction_1 = __importDefault(require("./EditAction"));
var decorators_1 = require("./decorators");
var EditActionPlayAudioClip = /** @class */ (function (_super) {
__extends(EditActionPlayAudioClip, _super);
function EditActionPlayAudioClip(clip) {
var _this = _super.call(this) || this;
_this.clip = clip;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditAction_1 = __importDefault(require("./EditAction"));
const decorators_1 = require("./decorators");
class EditActionPlayAudioClip extends EditAction_1.default {
constructor(clip) {
super();
this.clip = clip;
}
Object.defineProperty(EditActionPlayAudioClip.prototype, "type", {
get: function () {
return pixels_core_animation_1.ActionTypeValues.PlayAnimation;
},
enumerable: false,
configurable: true
});
EditActionPlayAudioClip.prototype.toAction = function (_editSet, _set) {
get type() {
return pixels_core_animation_1.ActionTypeValues.PlayAnimation;
}
toAction(_editSet, _set) {
var _a, _b;

@@ -51,11 +30,10 @@ return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.ActionPlayAudioClip(), {

});
};
EditActionPlayAudioClip.prototype.duplicate = function () {
}
duplicate() {
return new EditActionPlayAudioClip(this.clip);
};
__decorate([
(0, decorators_1.name)("Audio Clip")
], EditActionPlayAudioClip.prototype, "clip", void 0);
return EditActionPlayAudioClip;
}(EditAction_1.default));
}
}
__decorate([
(0, decorators_1.name)("Audio Clip")
], EditActionPlayAudioClip.prototype, "clip", void 0);
exports.default = EditActionPlayAudioClip;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,17 +6,13 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var Editable_1 = __importDefault(require("./Editable"));
var EditAnimation = /** @class */ (function (_super) {
__extends(EditAnimation, _super);
function EditAnimation(name) {
if (name === void 0) { name = ""; }
var _this = _super.call(this) || this;
_this.name = name;
return _this;
const Editable_1 = __importDefault(require("./Editable"));
class EditAnimation extends Editable_1.default {
constructor(name = "") {
super();
this.name = name;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
EditAnimation.prototype.requiresPattern = function (pattern) {
requiresPattern(pattern) {
return undefined;
};
return EditAnimation;
}(Editable_1.default));
}
}
exports.default = EditAnimation;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,38 +12,27 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditAnimation_1 = __importDefault(require("./EditAnimation"));
var EditRgbTrack_1 = __importDefault(require("./EditRgbTrack"));
var decorators_1 = require("./decorators");
var EditAnimationGradient = /** @class */ (function (_super) {
__extends(EditAnimationGradient, _super);
function EditAnimationGradient(options) {
var _this = this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditAnimation_1 = __importDefault(require("./EditAnimation"));
const EditRgbTrack_1 = __importDefault(require("./EditRgbTrack"));
const decorators_1 = require("./decorators");
class EditAnimationGradient extends EditAnimation_1.default {
constructor(options) {
var _a, _b;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : pixels_core_animation_1.Constants.faceMaskAllLeds;
_this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : pixels_core_animation_1.Constants.faceMaskAllLeds;
this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
}
Object.defineProperty(EditAnimationGradient.prototype, "type", {
get: function () {
return pixels_core_animation_1.AnimationTypeValues.Gradient;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationGradient.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationGradient.prototype.toAnimation = function (editSet, bits) {
get type() {
return pixels_core_animation_1.AnimationTypeValues.Gradient;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, bits) {
// Add gradient
var gradientTrackOffset = bits.rgbTracks.length;
const gradientTrackOffset = bits.rgbTracks.length;
if (this.gradient) {

@@ -70,6 +44,6 @@ bits.rgbTracks.push(new EditRgbTrack_1.default(this.gradient).toTrack(editSet, bits));

faceMask: this.faces,
gradientTrackOffset: gradientTrackOffset,
gradientTrackOffset,
});
};
EditAnimationGradient.prototype.duplicate = function () {
}
duplicate() {
var _a;

@@ -82,20 +56,19 @@ return new EditAnimationGradient({

});
};
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationGradient.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("faceMask"),
(0, decorators_1.range)(0, 19, 1),
(0, decorators_1.name)("Face Mask")
], EditAnimationGradient.prototype, "faces", void 0);
__decorate([
(0, decorators_1.widget)("gradient"),
(0, decorators_1.name)("Gradient")
], EditAnimationGradient.prototype, "gradient", void 0);
return EditAnimationGradient;
}(EditAnimation_1.default));
}
}
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationGradient.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("faceMask"),
(0, decorators_1.range)(0, 19, 1),
(0, decorators_1.name)("Face Mask")
], EditAnimationGradient.prototype, "faces", void 0);
__decorate([
(0, decorators_1.widget)("gradient"),
(0, decorators_1.name)("Gradient")
], EditAnimationGradient.prototype, "gradient", void 0);
exports.default = EditAnimationGradient;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,39 +12,28 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditAnimation_1 = __importDefault(require("./EditAnimation"));
var EditRgbTrack_1 = __importDefault(require("./EditRgbTrack"));
var decorators_1 = require("./decorators");
var EditAnimationGradientPattern = /** @class */ (function (_super) {
__extends(EditAnimationGradientPattern, _super);
function EditAnimationGradientPattern(options) {
var _this = this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditAnimation_1 = __importDefault(require("./EditAnimation"));
const EditRgbTrack_1 = __importDefault(require("./EditRgbTrack"));
const decorators_1 = require("./decorators");
class EditAnimationGradientPattern extends EditAnimation_1.default {
constructor(options) {
var _a, _b;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.pattern = options === null || options === void 0 ? void 0 : options.pattern;
_this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
_this.overrideWithFace = (_b = options === null || options === void 0 ? void 0 : options.overrideWithFace) !== null && _b !== void 0 ? _b : false;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.pattern = options === null || options === void 0 ? void 0 : options.pattern;
this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
this.overrideWithFace = (_b = options === null || options === void 0 ? void 0 : options.overrideWithFace) !== null && _b !== void 0 ? _b : false;
}
Object.defineProperty(EditAnimationGradientPattern.prototype, "type", {
get: function () {
return pixels_core_animation_1.AnimationTypeValues.GradientPattern;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationGradientPattern.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationGradientPattern.prototype.toAnimation = function (editSet, bits) {
get type() {
return pixels_core_animation_1.AnimationTypeValues.GradientPattern;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, bits) {
var _a, _b;
var gradientTrackOffset = bits.rgbTracks.length;
const gradientTrackOffset = bits.rgbTracks.length;
// Add gradient

@@ -75,7 +49,7 @@ if (this.gradient) {

trackCount: (_b = (_a = this.pattern) === null || _a === void 0 ? void 0 : _a.gradients.length) !== null && _b !== void 0 ? _b : 0,
gradientTrackOffset: gradientTrackOffset,
gradientTrackOffset,
overrideWithFace: this.overrideWithFace ? 1 : 0,
});
};
EditAnimationGradientPattern.prototype.duplicate = function () {
}
duplicate() {
var _a;

@@ -89,27 +63,26 @@ return new EditAnimationGradientPattern({

});
};
EditAnimationGradientPattern.prototype.requiresPattern = function (pattern) {
}
requiresPattern(pattern) {
if (this.pattern === pattern) {
return { asRgb: false };
}
};
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationGradientPattern.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("grayscalePattern"),
(0, decorators_1.name)("LED Pattern")
], EditAnimationGradientPattern.prototype, "pattern", void 0);
__decorate([
(0, decorators_1.widget)("gradient"),
(0, decorators_1.name)("RGB Gradient")
], EditAnimationGradientPattern.prototype, "gradient", void 0);
__decorate([
(0, decorators_1.name)("Override color based on face")
], EditAnimationGradientPattern.prototype, "overrideWithFace", void 0);
return EditAnimationGradientPattern;
}(EditAnimation_1.default));
}
}
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationGradientPattern.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("grayscalePattern"),
(0, decorators_1.name)("LED Pattern")
], EditAnimationGradientPattern.prototype, "pattern", void 0);
__decorate([
(0, decorators_1.widget)("gradient"),
(0, decorators_1.name)("RGB Gradient")
], EditAnimationGradientPattern.prototype, "gradient", void 0);
__decorate([
(0, decorators_1.name)("Override color based on face")
], EditAnimationGradientPattern.prototype, "overrideWithFace", void 0);
exports.default = EditAnimationGradientPattern;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,35 +12,24 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditAnimation_1 = __importDefault(require("./EditAnimation"));
var decorators_1 = require("./decorators");
var EditAnimationKeyframed = /** @class */ (function (_super) {
__extends(EditAnimationKeyframed, _super);
function EditAnimationKeyframed(options) {
var _this = this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditAnimation_1 = __importDefault(require("./EditAnimation"));
const decorators_1 = require("./decorators");
class EditAnimationKeyframed extends EditAnimation_1.default {
constructor(options) {
var _a, _b;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.pattern = options === null || options === void 0 ? void 0 : options.pattern;
_this.flowOrder = (_b = options === null || options === void 0 ? void 0 : options.flowOrder) !== null && _b !== void 0 ? _b : false;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.pattern = options === null || options === void 0 ? void 0 : options.pattern;
this.flowOrder = (_b = options === null || options === void 0 ? void 0 : options.flowOrder) !== null && _b !== void 0 ? _b : false;
}
Object.defineProperty(EditAnimationKeyframed.prototype, "type", {
get: function () {
return pixels_core_animation_1.AnimationTypeValues.Keyframed;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationKeyframed.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationKeyframed.prototype.toAnimation = function (editSet, _bits) {
get type() {
return pixels_core_animation_1.AnimationTypeValues.Keyframed;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, _bits) {
var _a, _b;

@@ -68,4 +42,4 @@ return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.AnimationKeyframed(), {

});
};
EditAnimationKeyframed.prototype.duplicate = function () {
}
duplicate() {
return new EditAnimationKeyframed({

@@ -77,23 +51,22 @@ name: this.name,

});
};
EditAnimationKeyframed.prototype.requiresPattern = function (pattern) {
}
requiresPattern(pattern) {
if (this.pattern === pattern) {
return { asRgb: true };
}
};
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationKeyframed.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("rgbPattern"),
(0, decorators_1.name)("LED Pattern")
], EditAnimationKeyframed.prototype, "pattern", void 0);
__decorate([
(0, decorators_1.name)("Traveling Order")
], EditAnimationKeyframed.prototype, "flowOrder", void 0);
return EditAnimationKeyframed;
}(EditAnimation_1.default));
}
}
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationKeyframed.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("rgbPattern"),
(0, decorators_1.name)("LED Pattern")
], EditAnimationKeyframed.prototype, "pattern", void 0);
__decorate([
(0, decorators_1.name)("Traveling Order")
], EditAnimationKeyframed.prototype, "flowOrder", void 0);
exports.default = EditAnimationKeyframed;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,46 +12,35 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditAnimation_1 = __importDefault(require("./EditAnimation"));
var EditRgbTrack_1 = __importDefault(require("./EditRgbTrack"));
var decorators_1 = require("./decorators");
var EditAnimationNoise = /** @class */ (function (_super) {
__extends(EditAnimationNoise, _super);
function EditAnimationNoise(options) {
var _this = this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditAnimation_1 = __importDefault(require("./EditAnimation"));
const EditRgbTrack_1 = __importDefault(require("./EditRgbTrack"));
const decorators_1 = require("./decorators");
class EditAnimationNoise extends EditAnimation_1.default {
constructor(options) {
var _a, _b, _c, _d, _e;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
_this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : pixels_core_animation_1.Constants.faceMaskAllLeds;
_this.blinkDuration = (_c = options === null || options === void 0 ? void 0 : options.blinkDuration) !== null && _c !== void 0 ? _c : 0.1;
_this.blinkGradient = options === null || options === void 0 ? void 0 : options.blinkGradient;
_this.blinkCount = (_d = options === null || options === void 0 ? void 0 : options.blinkCount) !== null && _d !== void 0 ? _d : 10;
_this.fade = (_e = options === null || options === void 0 ? void 0 : options.fade) !== null && _e !== void 0 ? _e : 0;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : pixels_core_animation_1.Constants.faceMaskAllLeds;
this.blinkDuration = (_c = options === null || options === void 0 ? void 0 : options.blinkDuration) !== null && _c !== void 0 ? _c : 0.1;
this.blinkGradient = options === null || options === void 0 ? void 0 : options.blinkGradient;
this.blinkCount = (_d = options === null || options === void 0 ? void 0 : options.blinkCount) !== null && _d !== void 0 ? _d : 10;
this.fade = (_e = options === null || options === void 0 ? void 0 : options.fade) !== null && _e !== void 0 ? _e : 0;
}
Object.defineProperty(EditAnimationNoise.prototype, "type", {
get: function () {
return pixels_core_animation_1.AnimationTypeValues.Noise;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationNoise.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationNoise.prototype.toAnimation = function (editSet, bits) {
get type() {
return pixels_core_animation_1.AnimationTypeValues.Noise;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, bits) {
// Add gradient
var gradientTrackOffset = bits.rgbTracks.length;
const gradientTrackOffset = bits.rgbTracks.length;
if (this.gradient) {
bits.rgbTracks.push(new EditRgbTrack_1.default(this.gradient).toTrack(editSet, bits));
}
var blinkTrackOffset = bits.rgbTracks.length;
const blinkTrackOffset = bits.rgbTracks.length;
if (this.blinkGradient) {

@@ -77,4 +51,4 @@ bits.rgbTracks.push(new EditRgbTrack_1.default(this.blinkGradient).toTrack(editSet, bits));

duration: this.duration * 1000,
gradientTrackOffset: gradientTrackOffset,
blinkTrackOffset: blinkTrackOffset,
gradientTrackOffset,
blinkTrackOffset,
blinkCount: this.blinkCount,

@@ -85,4 +59,4 @@ blinkDuration: this.blinkDuration * 255,

});
};
EditAnimationNoise.prototype.duplicate = function () {
}
duplicate() {
var _a;

@@ -99,39 +73,38 @@ return new EditAnimationNoise({

});
};
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationNoise.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("gradient"),
(0, decorators_1.name)("Overall Gradient")
], EditAnimationNoise.prototype, "gradient", void 0);
__decorate([
(0, decorators_1.widget)("faceMask"),
(0, decorators_1.range)(0, 19, 1),
(0, decorators_1.name)("Face Mask")
], EditAnimationNoise.prototype, "faces", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.001, 0.1),
(0, decorators_1.name)("Blink Duration Ratio")
], EditAnimationNoise.prototype, "blinkDuration", void 0);
__decorate([
(0, decorators_1.widget)("gradient"),
(0, decorators_1.name)("Individual Gradient")
], EditAnimationNoise.prototype, "blinkGradient", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(10, 100),
(0, decorators_1.name)("Blink Count")
], EditAnimationNoise.prototype, "blinkCount", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0, 1),
(0, decorators_1.name)("Fading Sharpness")
], EditAnimationNoise.prototype, "fade", void 0);
return EditAnimationNoise;
}(EditAnimation_1.default));
}
}
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationNoise.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("gradient"),
(0, decorators_1.name)("Overall Gradient")
], EditAnimationNoise.prototype, "gradient", void 0);
__decorate([
(0, decorators_1.widget)("faceMask"),
(0, decorators_1.range)(0, 19, 1),
(0, decorators_1.name)("Face Mask")
], EditAnimationNoise.prototype, "faces", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.001, 0.1),
(0, decorators_1.name)("Blink Duration Ratio")
], EditAnimationNoise.prototype, "blinkDuration", void 0);
__decorate([
(0, decorators_1.widget)("gradient"),
(0, decorators_1.name)("Individual Gradient")
], EditAnimationNoise.prototype, "blinkGradient", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(10, 100),
(0, decorators_1.name)("Blink Count")
], EditAnimationNoise.prototype, "blinkCount", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0, 1),
(0, decorators_1.name)("Fading Sharpness")
], EditAnimationNoise.prototype, "fade", void 0);
exports.default = EditAnimationNoise;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,37 +12,26 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditAnimation_1 = __importDefault(require("./EditAnimation"));
var decorators_1 = require("./decorators");
var EditAnimationRainbow = /** @class */ (function (_super) {
__extends(EditAnimationRainbow, _super);
function EditAnimationRainbow(options) {
var _this = this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditAnimation_1 = __importDefault(require("./EditAnimation"));
const decorators_1 = require("./decorators");
class EditAnimationRainbow extends EditAnimation_1.default {
constructor(options) {
var _a, _b, _c, _d, _e;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : pixels_core_animation_1.Constants.faceMaskAllLeds;
_this.count = (_c = options === null || options === void 0 ? void 0 : options.count) !== null && _c !== void 0 ? _c : 1;
_this.fade = (_d = options === null || options === void 0 ? void 0 : options.fade) !== null && _d !== void 0 ? _d : 0;
_this.traveling = (_e = options === null || options === void 0 ? void 0 : options.traveling) !== null && _e !== void 0 ? _e : true;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : pixels_core_animation_1.Constants.faceMaskAllLeds;
this.count = (_c = options === null || options === void 0 ? void 0 : options.count) !== null && _c !== void 0 ? _c : 1;
this.fade = (_d = options === null || options === void 0 ? void 0 : options.fade) !== null && _d !== void 0 ? _d : 0;
this.traveling = (_e = options === null || options === void 0 ? void 0 : options.traveling) !== null && _e !== void 0 ? _e : true;
}
Object.defineProperty(EditAnimationRainbow.prototype, "type", {
get: function () {
return pixels_core_animation_1.AnimationTypeValues.Rainbow;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationRainbow.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationRainbow.prototype.toAnimation = function (_editSet, _bits) {
get type() {
return pixels_core_animation_1.AnimationTypeValues.Rainbow;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(_editSet, _bits) {
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.AnimationRainbow(), {

@@ -70,4 +44,4 @@ duration: this.duration * 1000,

});
};
EditAnimationRainbow.prototype.duplicate = function () {
}
duplicate() {
return new EditAnimationRainbow({

@@ -81,29 +55,28 @@ name: this.name,

});
};
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationRainbow.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("faceMask"),
(0, decorators_1.range)(0, 19, 1),
(0, decorators_1.name)("Face Mask")
], EditAnimationRainbow.prototype, "faces", void 0);
__decorate([
(0, decorators_1.widget)("index"),
(0, decorators_1.range)(1, 10, 1),
(0, decorators_1.name)("Repeat Count")
], EditAnimationRainbow.prototype, "count", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0, 1),
(0, decorators_1.name)("Fading Sharpness")
], EditAnimationRainbow.prototype, "fade", void 0);
__decorate([
(0, decorators_1.name)("Traveling Order")
], EditAnimationRainbow.prototype, "traveling", void 0);
return EditAnimationRainbow;
}(EditAnimation_1.default));
}
}
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0.1),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationRainbow.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("faceMask"),
(0, decorators_1.range)(0, 19, 1),
(0, decorators_1.name)("Face Mask")
], EditAnimationRainbow.prototype, "faces", void 0);
__decorate([
(0, decorators_1.widget)("index"),
(0, decorators_1.range)(1, 10, 1),
(0, decorators_1.name)("Repeat Count")
], EditAnimationRainbow.prototype, "count", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0, 1),
(0, decorators_1.name)("Fading Sharpness")
], EditAnimationRainbow.prototype, "fade", void 0);
__decorate([
(0, decorators_1.name)("Traveling Order")
], EditAnimationRainbow.prototype, "traveling", void 0);
exports.default = EditAnimationRainbow;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,39 +12,28 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditAnimation_1 = __importDefault(require("./EditAnimation"));
var EditColor_1 = __importDefault(require("./EditColor"));
var decorators_1 = require("./decorators");
var EditAnimationSimple = /** @class */ (function (_super) {
__extends(EditAnimationSimple, _super);
function EditAnimationSimple(options) {
var _this = this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditAnimation_1 = __importDefault(require("./EditAnimation"));
const EditColor_1 = __importDefault(require("./EditColor"));
const decorators_1 = require("./decorators");
class EditAnimationSimple extends EditAnimation_1.default {
constructor(options) {
var _a, _b, _c, _d, _e;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
var color = (_a = options === null || options === void 0 ? void 0 : options.color) !== null && _a !== void 0 ? _a : pixels_core_animation_1.Color.red;
_this._duration = (_b = options === null || options === void 0 ? void 0 : options.duration) !== null && _b !== void 0 ? _b : 1;
_this.faces = (_c = options === null || options === void 0 ? void 0 : options.faces) !== null && _c !== void 0 ? _c : pixels_core_animation_1.Constants.faceMaskAllLeds;
_this.color = color instanceof pixels_core_animation_1.Color ? EditColor_1.default.fromColor(color) : color;
_this.count = (_d = options === null || options === void 0 ? void 0 : options.count) !== null && _d !== void 0 ? _d : 1;
_this.fade = (_e = options === null || options === void 0 ? void 0 : options.fade) !== null && _e !== void 0 ? _e : 0.1;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
const color = (_a = options === null || options === void 0 ? void 0 : options.color) !== null && _a !== void 0 ? _a : pixels_core_animation_1.Color.red;
this._duration = (_b = options === null || options === void 0 ? void 0 : options.duration) !== null && _b !== void 0 ? _b : 1;
this.faces = (_c = options === null || options === void 0 ? void 0 : options.faces) !== null && _c !== void 0 ? _c : pixels_core_animation_1.Constants.faceMaskAllLeds;
this.color = color instanceof pixels_core_animation_1.Color ? EditColor_1.default.fromColor(color) : color;
this.count = (_d = options === null || options === void 0 ? void 0 : options.count) !== null && _d !== void 0 ? _d : 1;
this.fade = (_e = options === null || options === void 0 ? void 0 : options.fade) !== null && _e !== void 0 ? _e : 0.1;
}
Object.defineProperty(EditAnimationSimple.prototype, "type", {
get: function () {
return pixels_core_animation_1.AnimationTypeValues.Simple;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationSimple.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationSimple.prototype.toAnimation = function (editSet, bits) {
get type() {
return pixels_core_animation_1.AnimationTypeValues.Simple;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, bits) {
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.AnimationSimple(), {

@@ -72,4 +46,4 @@ duration: this.duration * 1000,

});
};
EditAnimationSimple.prototype.duplicate = function () {
}
duplicate() {
return new EditAnimationSimple({

@@ -82,29 +56,28 @@ name: this.name,

});
};
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationSimple.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("faceMask"),
(0, decorators_1.range)(0, 19, 1),
(0, decorators_1.name)("Face Mask")
], EditAnimationSimple.prototype, "faces", void 0);
__decorate([
(0, decorators_1.name)("Color")
], EditAnimationSimple.prototype, "color", void 0);
__decorate([
(0, decorators_1.widget)("index"),
(0, decorators_1.range)(1, 10, 1),
(0, decorators_1.name)("Repeat Count")
], EditAnimationSimple.prototype, "count", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 1),
(0, decorators_1.name)("Fading Sharpness")
], EditAnimationSimple.prototype, "fade", void 0);
return EditAnimationSimple;
}(EditAnimation_1.default));
}
}
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 30, 0),
(0, decorators_1.units)("s"),
(0, decorators_1.name)("Duration")
], EditAnimationSimple.prototype, "duration", null);
__decorate([
(0, decorators_1.widget)("faceMask"),
(0, decorators_1.range)(0, 19, 1),
(0, decorators_1.name)("Face Mask")
], EditAnimationSimple.prototype, "faces", void 0);
__decorate([
(0, decorators_1.name)("Color")
], EditAnimationSimple.prototype, "color", void 0);
__decorate([
(0, decorators_1.widget)("index"),
(0, decorators_1.range)(1, 10, 1),
(0, decorators_1.name)("Repeat Count")
], EditAnimationSimple.prototype, "count", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.1, 1),
(0, decorators_1.name)("Fading Sharpness")
], EditAnimationSimple.prototype, "fade", void 0);
exports.default = EditAnimationSimple;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,12 +6,9 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var Editable_1 = __importDefault(require("./Editable"));
var EditAudioClip = /** @class */ (function (_super) {
__extends(EditAudioClip, _super);
function EditAudioClip() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.id = -1;
return _this;
const Editable_1 = __importDefault(require("./Editable"));
class EditAudioClip extends Editable_1.default {
constructor() {
super(...arguments);
this.id = -1;
}
return EditAudioClip;
}(Editable_1.default));
}
exports.default = EditAudioClip;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,19 +6,15 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var ColorType_1 = require("./ColorType");
var Editable_1 = __importDefault(require("./Editable"));
var EditColor = /** @class */ (function (_super) {
__extends(EditColor, _super);
function EditColor(type, color) {
if (type === void 0) { type = ColorType_1.ColorTypeValues.Rgb; }
if (color === void 0) { color = pixels_core_animation_1.Color.black; }
var _this = _super.call(this) || this;
_this.type = type;
_this.color = color;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const ColorType_1 = require("./ColorType");
const Editable_1 = __importDefault(require("./Editable"));
class EditColor extends Editable_1.default {
constructor(type = ColorType_1.ColorTypeValues.Rgb, color = pixels_core_animation_1.Color.black) {
super();
this.type = type;
this.color = color;
}
EditColor.fromColor = function (color) {
static fromColor(color) {
return new EditColor(ColorType_1.ColorTypeValues.Rgb, color);
};
EditColor.prototype.toColorIndex = function (refPalette) {
}
toColorIndex(refPalette) {
switch (this.type) {

@@ -47,8 +28,8 @@ case ColorType_1.ColorTypeValues.Rgb:

default:
throw new Error("Unsupported EditColor type: ".concat(this.type));
throw new Error(`Unsupported EditColor type: ${this.type}`);
}
};
EditColor.toColorIndex = function (refPalette, color) {
var colorGamma = (0, pixels_core_animation_1.gamma)(color);
var colorIndex = refPalette.findIndex(function (c) { return colorGamma.equals(c); });
}
static toColorIndex(refPalette, color) {
const colorGamma = (0, pixels_core_animation_1.gamma)(color);
let colorIndex = refPalette.findIndex((c) => colorGamma.equals(c));
if (colorIndex === -1) {

@@ -59,8 +40,7 @@ colorIndex = refPalette.length;

return colorIndex;
};
EditColor.prototype.duplicate = function () {
}
duplicate() {
return new EditColor(this.type, this.color.duplicate());
};
return EditColor;
}(Editable_1.default));
}
}
exports.default = EditColor;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,10 +6,5 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var Editable_1 = __importDefault(require("./Editable"));
var EditCondition = /** @class */ (function (_super) {
__extends(EditCondition, _super);
function EditCondition() {
return _super !== null && _super.apply(this, arguments) || this;
}
return EditCondition;
}(Editable_1.default));
const Editable_1 = __importDefault(require("./Editable"));
class EditCondition extends Editable_1.default {
}
exports.default = EditCondition;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,24 +12,16 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditCondition_1 = __importDefault(require("./EditCondition"));
var decorators_1 = require("./decorators");
var EditConditionBatteryState = /** @class */ (function (_super) {
__extends(EditConditionBatteryState, _super);
function EditConditionBatteryState(flags, recheckAfter) {
if (flags === void 0) { flags = 0; }
if (recheckAfter === void 0) { recheckAfter = 1; }
var _this = _super.call(this) || this;
_this.flags = flags;
_this.recheckAfter = recheckAfter;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditCondition_1 = __importDefault(require("./EditCondition"));
const decorators_1 = require("./decorators");
class EditConditionBatteryState extends EditCondition_1.default {
constructor(flags = 0, recheckAfter = 1) {
super();
this.flags = flags;
this.recheckAfter = recheckAfter;
}
Object.defineProperty(EditConditionBatteryState.prototype, "type", {
get: function () {
return pixels_core_animation_1.ConditionTypeValues.BatteryState;
},
enumerable: false,
configurable: true
});
EditConditionBatteryState.prototype.toCondition = function (_editSet, _set) {
get type() {
return pixels_core_animation_1.ConditionTypeValues.BatteryState;
}
toCondition(_editSet, _set) {
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.ConditionBatteryState(), {

@@ -54,17 +31,16 @@ flags: this.flags,

});
};
EditConditionBatteryState.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionBatteryState(this.flags, this.recheckAfter);
};
__decorate([
(0, decorators_1.widget)("bitfield"),
(0, decorators_1.name)("Battery State")
], EditConditionBatteryState.prototype, "flags", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(5, 60),
(0, decorators_1.units)("s")
], EditConditionBatteryState.prototype, "recheckAfter", void 0);
return EditConditionBatteryState;
}(EditCondition_1.default));
}
}
__decorate([
(0, decorators_1.widget)("bitfield"),
(0, decorators_1.name)("Battery State")
], EditConditionBatteryState.prototype, "flags", void 0);
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(5, 60),
(0, decorators_1.units)("s")
], EditConditionBatteryState.prototype, "recheckAfter", void 0);
exports.default = EditConditionBatteryState;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,35 +12,27 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditCondition_1 = __importDefault(require("./EditCondition"));
var decorators_1 = require("./decorators");
var EditConditionConnectionState = /** @class */ (function (_super) {
__extends(EditConditionConnectionState, _super);
function EditConditionConnectionState(flags) {
if (flags === void 0) { flags = 0; }
var _this = _super.call(this) || this;
_this.flags = flags;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditCondition_1 = __importDefault(require("./EditCondition"));
const decorators_1 = require("./decorators");
class EditConditionConnectionState extends EditCondition_1.default {
constructor(flags = 0) {
super();
this.flags = flags;
}
Object.defineProperty(EditConditionConnectionState.prototype, "type", {
get: function () {
return pixels_core_animation_1.ConditionTypeValues.ConnectionState;
},
enumerable: false,
configurable: true
});
EditConditionConnectionState.prototype.toCondition = function (_editSet, _set) {
get type() {
return pixels_core_animation_1.ConditionTypeValues.ConnectionState;
}
toCondition(_editSet, _set) {
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.ConditionConnectionState(), {
flags: this.flags,
});
};
EditConditionConnectionState.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionConnectionState(this.flags);
};
__decorate([
(0, decorators_1.widget)("bitfield"),
(0, decorators_1.name)("Connection Event")
], EditConditionConnectionState.prototype, "flags", void 0);
return EditConditionConnectionState;
}(EditCondition_1.default));
}
}
__decorate([
(0, decorators_1.widget)("bitfield"),
(0, decorators_1.name)("Connection Event")
], EditConditionConnectionState.prototype, "flags", void 0);
exports.default = EditConditionConnectionState;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,24 +6,15 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var EditCondition_1 = __importDefault(require("./EditCondition"));
var EditConditionCrooked = /** @class */ (function (_super) {
__extends(EditConditionCrooked, _super);
function EditConditionCrooked() {
return _super !== null && _super.apply(this, arguments) || this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const EditCondition_1 = __importDefault(require("./EditCondition"));
class EditConditionCrooked extends EditCondition_1.default {
get type() {
return pixels_core_animation_1.ConditionTypeValues.Crooked;
}
Object.defineProperty(EditConditionCrooked.prototype, "type", {
get: function () {
return pixels_core_animation_1.ConditionTypeValues.Crooked;
},
enumerable: false,
configurable: true
});
EditConditionCrooked.prototype.toCondition = function (_editSet, _set) {
toCondition(_editSet, _set) {
return new pixels_core_animation_1.ConditionCrooked();
};
EditConditionCrooked.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionCrooked();
};
return EditConditionCrooked;
}(EditCondition_1.default));
}
}
exports.default = EditConditionCrooked;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,24 +12,16 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditCondition_1 = __importDefault(require("./EditCondition"));
var decorators_1 = require("./decorators");
var EditConditionFaceCompare = /** @class */ (function (_super) {
__extends(EditConditionFaceCompare, _super);
function EditConditionFaceCompare(flags, faceIndex) {
if (flags === void 0) { flags = 0; }
if (faceIndex === void 0) { faceIndex = 0; }
var _this = _super.call(this) || this;
_this.flags = flags;
_this.faceIndex = faceIndex;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditCondition_1 = __importDefault(require("./EditCondition"));
const decorators_1 = require("./decorators");
class EditConditionFaceCompare extends EditCondition_1.default {
constructor(flags = 0, faceIndex = 0) {
super();
this.flags = flags;
this.faceIndex = faceIndex;
}
Object.defineProperty(EditConditionFaceCompare.prototype, "type", {
get: function () {
return pixels_core_animation_1.ConditionTypeValues.FaceCompare;
},
enumerable: false,
configurable: true
});
EditConditionFaceCompare.prototype.toCondition = function (_editSet, _set) {
get type() {
return pixels_core_animation_1.ConditionTypeValues.FaceCompare;
}
toCondition(_editSet, _set) {
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.ConditionFaceCompare(), {

@@ -54,17 +31,16 @@ faceIndex: this.faceIndex,

});
};
EditConditionFaceCompare.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionFaceCompare(this.flags, this.faceIndex);
};
__decorate([
(0, decorators_1.widget)("bitfield"),
(0, decorators_1.name)("Comparison")
], EditConditionFaceCompare.prototype, "flags", void 0);
__decorate([
(0, decorators_1.widget)("faceIndex"),
(0, decorators_1.range)(0, 19),
(0, decorators_1.name)("Than")
], EditConditionFaceCompare.prototype, "faceIndex", void 0);
return EditConditionFaceCompare;
}(EditCondition_1.default));
}
}
__decorate([
(0, decorators_1.widget)("bitfield"),
(0, decorators_1.name)("Comparison")
], EditConditionFaceCompare.prototype, "flags", void 0);
__decorate([
(0, decorators_1.widget)("faceIndex"),
(0, decorators_1.range)(0, 19),
(0, decorators_1.name)("Than")
], EditConditionFaceCompare.prototype, "faceIndex", void 0);
exports.default = EditConditionFaceCompare;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,24 +6,15 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var EditCondition_1 = __importDefault(require("./EditCondition"));
var EditConditionHandling = /** @class */ (function (_super) {
__extends(EditConditionHandling, _super);
function EditConditionHandling() {
return _super !== null && _super.apply(this, arguments) || this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const EditCondition_1 = __importDefault(require("./EditCondition"));
class EditConditionHandling extends EditCondition_1.default {
get type() {
return pixels_core_animation_1.ConditionTypeValues.Handling;
}
Object.defineProperty(EditConditionHandling.prototype, "type", {
get: function () {
return pixels_core_animation_1.ConditionTypeValues.Handling;
},
enumerable: false,
configurable: true
});
EditConditionHandling.prototype.toCondition = function (_editSet, _set) {
toCondition(_editSet, _set) {
return new pixels_core_animation_1.ConditionHandling();
};
EditConditionHandling.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionHandling();
};
return EditConditionHandling;
}(EditCondition_1.default));
}
}
exports.default = EditConditionHandling;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,35 +12,27 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditCondition_1 = __importDefault(require("./EditCondition"));
var decorators_1 = require("./decorators");
var EditConditionHelloGoodbye = /** @class */ (function (_super) {
__extends(EditConditionHelloGoodbye, _super);
function EditConditionHelloGoodbye(flags) {
if (flags === void 0) { flags = 0; }
var _this = _super.call(this) || this;
_this.flags = flags;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditCondition_1 = __importDefault(require("./EditCondition"));
const decorators_1 = require("./decorators");
class EditConditionHelloGoodbye extends EditCondition_1.default {
constructor(flags = 0) {
super();
this.flags = flags;
}
Object.defineProperty(EditConditionHelloGoodbye.prototype, "type", {
get: function () {
return pixels_core_animation_1.ConditionTypeValues.HelloGoodbye;
},
enumerable: false,
configurable: true
});
EditConditionHelloGoodbye.prototype.toCondition = function (_editSet, _set) {
get type() {
return pixels_core_animation_1.ConditionTypeValues.HelloGoodbye;
}
toCondition(_editSet, _set) {
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.ConditionHelloGoodbye(), {
flags: this.flags,
});
};
EditConditionHelloGoodbye.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionHelloGoodbye(this.flags);
};
__decorate([
(0, decorators_1.widget)("bitfield"),
(0, decorators_1.name)("Hello / Goodbye")
], EditConditionHelloGoodbye.prototype, "flags", void 0);
return EditConditionHelloGoodbye;
}(EditCondition_1.default));
}
}
__decorate([
(0, decorators_1.widget)("bitfield"),
(0, decorators_1.name)("Hello / Goodbye")
], EditConditionHelloGoodbye.prototype, "flags", void 0);
exports.default = EditConditionHelloGoodbye;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,36 +12,28 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditCondition_1 = __importDefault(require("./EditCondition"));
var decorators_1 = require("./decorators");
var EditConditionIdle = /** @class */ (function (_super) {
__extends(EditConditionIdle, _super);
function EditConditionIdle(period) {
if (period === void 0) { period = 10; }
var _this = _super.call(this) || this;
_this.period = period;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditCondition_1 = __importDefault(require("./EditCondition"));
const decorators_1 = require("./decorators");
class EditConditionIdle extends EditCondition_1.default {
constructor(period = 10) {
super();
this.period = period;
}
Object.defineProperty(EditConditionIdle.prototype, "type", {
get: function () {
return pixels_core_animation_1.ConditionTypeValues.Idle;
},
enumerable: false,
configurable: true
});
EditConditionIdle.prototype.toCondition = function (_editSet, _set) {
get type() {
return pixels_core_animation_1.ConditionTypeValues.Idle;
}
toCondition(_editSet, _set) {
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.ConditionIdle(), {
repeatPeriodMs: Math.round(this.period * 1000),
});
};
EditConditionIdle.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionIdle(this.period);
};
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.5, 30, 0.5),
(0, decorators_1.units)("s")
], EditConditionIdle.prototype, "period", void 0);
return EditConditionIdle;
}(EditCondition_1.default));
}
}
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.5, 30, 0.5),
(0, decorators_1.units)("s")
], EditConditionIdle.prototype, "period", void 0);
exports.default = EditConditionIdle;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,36 +12,28 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditCondition_1 = __importDefault(require("./EditCondition"));
var decorators_1 = require("./decorators");
var EditConditionRolling = /** @class */ (function (_super) {
__extends(EditConditionRolling, _super);
function EditConditionRolling(recheckAfter) {
if (recheckAfter === void 0) { recheckAfter = 1; }
var _this = _super.call(this) || this;
_this.recheckAfter = recheckAfter;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditCondition_1 = __importDefault(require("./EditCondition"));
const decorators_1 = require("./decorators");
class EditConditionRolling extends EditCondition_1.default {
constructor(recheckAfter = 1) {
super();
this.recheckAfter = recheckAfter;
}
Object.defineProperty(EditConditionRolling.prototype, "type", {
get: function () {
return pixels_core_animation_1.ConditionTypeValues.Rolling;
},
enumerable: false,
configurable: true
});
EditConditionRolling.prototype.toCondition = function (_editSet, _set) {
get type() {
return pixels_core_animation_1.ConditionTypeValues.Rolling;
}
toCondition(_editSet, _set) {
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.ConditionRolling(), {
repeatPeriodMs: Math.round(this.recheckAfter * 1000),
});
};
EditConditionRolling.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionRolling(this.recheckAfter);
};
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.5, 5, 0.1),
(0, decorators_1.units)("s")
], EditConditionRolling.prototype, "recheckAfter", void 0);
return EditConditionRolling;
}(EditCondition_1.default));
}
}
__decorate([
(0, decorators_1.widget)("slider"),
(0, decorators_1.range)(0.5, 5, 0.1),
(0, decorators_1.units)("s")
], EditConditionRolling.prototype, "recheckAfter", void 0);
exports.default = EditConditionRolling;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,20 +6,17 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var EditProfile_1 = __importDefault(require("./EditProfile"));
var Editable_1 = __importDefault(require("./Editable"));
var EditDataSet = /** @class */ (function (_super) {
__extends(EditDataSet, _super);
function EditDataSet(options) {
var _this = this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const EditProfile_1 = __importDefault(require("./EditProfile"));
const Editable_1 = __importDefault(require("./Editable"));
class EditDataSet extends Editable_1.default {
constructor(options) {
var _a, _b, _c, _d;
_this = _super.call(this) || this;
_this.patterns = (_a = options === null || options === void 0 ? void 0 : options.patterns) !== null && _a !== void 0 ? _a : [];
_this.rgbPatterns = (_b = options === null || options === void 0 ? void 0 : options.rgbPatterns) !== null && _b !== void 0 ? _b : [];
_this.animations = (_c = options === null || options === void 0 ? void 0 : options.animations) !== null && _c !== void 0 ? _c : [];
_this.profile = (_d = options === null || options === void 0 ? void 0 : options.profile) !== null && _d !== void 0 ? _d : new EditProfile_1.default();
return _this;
super();
this.patterns = (_a = options === null || options === void 0 ? void 0 : options.patterns) !== null && _a !== void 0 ? _a : [];
this.rgbPatterns = (_b = options === null || options === void 0 ? void 0 : options.rgbPatterns) !== null && _b !== void 0 ? _b : [];
this.animations = (_c = options === null || options === void 0 ? void 0 : options.animations) !== null && _c !== void 0 ? _c : [];
this.profile = (_d = options === null || options === void 0 ? void 0 : options.profile) !== null && _d !== void 0 ? _d : new EditProfile_1.default();
}
EditDataSet.prototype.getPatternTrackOffset = function (pattern) {
var ret = 0;
for (var i = 0; i < this.patterns.length; ++i) {
getPatternTrackOffset(pattern) {
let ret = 0;
for (let i = 0; i < this.patterns.length; ++i) {
if (this.patterns[i] === pattern) {

@@ -48,7 +30,7 @@ return ret;

return -1;
};
EditDataSet.prototype.getPatternRGBTrackOffset = function (pattern) {
var ret = 0;
}
getPatternRGBTrackOffset(pattern) {
let ret = 0;
if (pattern) {
for (var i = 0; i < this.rgbPatterns.length; ++i) {
for (let i = 0; i < this.rgbPatterns.length; ++i) {
if (this.rgbPatterns[i] === pattern) {

@@ -63,25 +45,22 @@ return ret;

return -1;
};
EditDataSet.prototype.toDataSet = function () {
var _this = this;
var set = new pixels_core_animation_1.DataSet();
}
toDataSet() {
const set = new pixels_core_animation_1.DataSet();
// Add patterns
this.patterns.forEach(function (editPattern) {
var _a;
this.patterns.forEach((editPattern) => {
if (editPattern) {
var tracks = editPattern.toTracks(_this, set.animationBits);
(_a = set.animationBits.tracks).push.apply(_a, tracks);
const tracks = editPattern.toTracks(this, set.animationBits);
set.animationBits.tracks.push(...tracks);
}
});
this.rgbPatterns.forEach(function (editPattern) {
var _a;
this.rgbPatterns.forEach((editPattern) => {
if (editPattern) {
var tracks = editPattern.toRgbTracks(_this, set.animationBits);
(_a = set.animationBits.rgbTracks).push.apply(_a, tracks);
const tracks = editPattern.toRgbTracks(this, set.animationBits);
set.animationBits.rgbTracks.push(...tracks);
}
});
// Add animations
this.animations.forEach(function (editAnim) {
this.animations.forEach((editAnim) => {
if (editAnim) {
var anim = editAnim.toAnimation(_this, set.animationBits);
const anim = editAnim.toAnimation(this, set.animationBits);
set.animations.push(anim);

@@ -93,5 +72,4 @@ }

return set;
};
return EditDataSet;
}(Editable_1.default));
}
}
exports.default = EditDataSet;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,31 +6,23 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var Editable_1 = __importDefault(require("./Editable"));
var EditPattern = /** @class */ (function (_super) {
__extends(EditPattern, _super);
function EditPattern(name, gradients) {
if (name === void 0) { name = "Empty LED Pattern"; }
if (gradients === void 0) { gradients = []; }
var _this = _super.call(this) || this;
_this.name = name;
_this.gradients = gradients;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const Editable_1 = __importDefault(require("./Editable"));
class EditPattern extends Editable_1.default {
constructor(name = "Empty LED Pattern", gradients = []) {
super();
this.name = name;
this.gradients = gradients;
}
Object.defineProperty(EditPattern.prototype, "duration", {
get: function () {
return this.gradients.length
? Math.max.apply(Math, this.gradients.map(function (g) { return g.duration; })) : 1;
},
enumerable: false,
configurable: true
});
EditPattern.prototype.toRgbTracks = function (editSet, bits) {
return this.gradients.map(function (gradient, i) {
var _a;
get duration() {
return this.gradients.length
? Math.max(...this.gradients.map((g) => g.duration))
: 1;
}
toRgbTracks(editSet, bits) {
return this.gradients.map((gradient, i) => {
// Add the keyframes
var keyframesOffset = bits.rgbKeyframes.length;
(_a = bits.rgbKeyframes).push.apply(_a, gradient.keyframes.map(function (kf) { return kf.toRgbKeyframe(editSet, bits); }));
const keyframesOffset = bits.rgbKeyframes.length;
bits.rgbKeyframes.push(...gradient.keyframes.map((kf) => kf.toRgbKeyframe(editSet, bits)));
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.RgbTrack(), {
keyframesOffset: keyframesOffset,
keyframesOffset,
keyFrameCount: gradient.keyframes.length,

@@ -55,11 +32,10 @@ ledMask: 1 << i,

});
};
EditPattern.prototype.toTracks = function (editSet, bits) {
return this.gradients.map(function (gradient, i) {
var _a;
}
toTracks(editSet, bits) {
return this.gradients.map((gradient, i) => {
// Add the keyframes
var keyframesOffset = bits.keyframes.length;
(_a = bits.keyframes).push.apply(_a, gradient.keyframes.map(function (kf) { return kf.toKeyframe(editSet, bits); }));
const keyframesOffset = bits.keyframes.length;
bits.keyframes.push(...gradient.keyframes.map((kf) => kf.toKeyframe(editSet, bits)));
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.Track(), {
keyframesOffset: keyframesOffset,
keyframesOffset,
keyFrameCount: gradient.keyframes.length,

@@ -69,5 +45,4 @@ ledMask: 1 << i,

});
};
return EditPattern;
}(Editable_1.default));
}
}
exports.default = EditPattern;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,37 +6,30 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var Editable_1 = __importDefault(require("./Editable"));
var EditProfile = /** @class */ (function (_super) {
__extends(EditProfile, _super);
function EditProfile(name, description, rules) {
if (name === void 0) { name = "Profile"; }
if (description === void 0) { description = ""; }
if (rules === void 0) { rules = []; }
var _this = _super.call(this) || this;
_this.name = name;
_this.description = description;
_this.rules = rules;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const Editable_1 = __importDefault(require("./Editable"));
class EditProfile extends Editable_1.default {
constructor(name = "Profile", description = "", rules = []) {
super();
this.name = name;
this.description = description;
this.rules = rules;
}
EditProfile.prototype.toProfile = function (editSet, set) {
toProfile(editSet, set) {
// Add our rules to the set
var rulesOffset = set.rules.length;
this.rules.forEach(function (editRule) {
return set.rules.push(editRule.toRule(editSet, set));
});
var rulesCount = this.rules.length;
const rulesOffset = set.rules.length;
this.rules.forEach((editRule) => set.rules.push(editRule.toRule(editSet, set)));
const rulesCount = this.rules.length;
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.Profile(), {
rulesOffset: rulesOffset,
rulesCount: rulesCount,
rulesOffset,
rulesCount,
});
};
EditProfile.prototype.duplicate = function () {
return new EditProfile(this.name, this.description, this.rules.map(function (r) { return r.duplicate(); }));
};
EditProfile.prototype.collectAnimations = function () {
var animations = [];
this.rules.forEach(function (r) {
r.actions.forEach(function (action) {
action.collectAnimations().forEach(function (anim) {
}
duplicate() {
return new EditProfile(this.name, this.description, this.rules.map((r) => r.duplicate()));
}
collectAnimations() {
const animations = [];
this.rules.forEach((r) => {
r.actions.forEach((action) => {
action.collectAnimations().forEach((anim) => {
if (!animations.includes(anim)) {

@@ -64,5 +42,4 @@ animations.push(anim);

return animations;
};
return EditProfile;
}(Editable_1.default));
}
}
exports.default = EditProfile;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,47 +6,29 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var EditRgbKeyframe_1 = __importDefault(require("./EditRgbKeyframe"));
var Editable_1 = __importDefault(require("./Editable"));
var EditRgbGradient = /** @class */ (function (_super) {
__extends(EditRgbGradient, _super);
function EditRgbGradient(keyframes) {
if (keyframes === void 0) { keyframes = []; }
var _this = _super.call(this) || this;
_this.keyframes = keyframes;
return _this;
const EditRgbKeyframe_1 = __importDefault(require("./EditRgbKeyframe"));
const Editable_1 = __importDefault(require("./Editable"));
class EditRgbGradient extends Editable_1.default {
constructor(keyframes = []) {
super();
this.keyframes = keyframes;
}
Object.defineProperty(EditRgbGradient.prototype, "empty", {
get: function () {
return !this.keyframes.length;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbGradient.prototype, "duration", {
get: function () {
return this.keyframes.length
? Math.max.apply(Math, this.keyframes.map(function (k) { return k.time; })) : 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbGradient.prototype, "firstTime", {
get: function () {
return this.keyframes.length ? this.keyframes[0].time : 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbGradient.prototype, "lastTime", {
get: function () {
return this.keyframes.length
? this.keyframes[this.keyframes.length - 1].time
: 0;
},
enumerable: false,
configurable: true
});
EditRgbGradient.prototype.duplicate = function () {
var track = new EditRgbGradient();
get empty() {
return !this.keyframes.length;
}
get duration() {
return this.keyframes.length
? Math.max(...this.keyframes.map((k) => k.time))
: 0;
}
get firstTime() {
return this.keyframes.length ? this.keyframes[0].time : 0;
}
get lastTime() {
return this.keyframes.length
? this.keyframes[this.keyframes.length - 1].time
: 0;
}
duplicate() {
const track = new EditRgbGradient();
if (this.keyframes != null) {
this.keyframes.forEach(function (keyframe) {
this.keyframes.forEach((keyframe) => {
track.keyframes.push(keyframe.duplicate());

@@ -71,7 +38,7 @@ });

return track;
};
EditRgbGradient.createFromKeyFrames = function (keyframes) {
var rgbKeyframes = keyframes
.sort(function (kf1, kf2) { return kf1.time - kf2.time; })
.map(function (kf) { return new EditRgbKeyframe_1.default(kf.time, kf.color); });
}
static createFromKeyFrames(keyframes) {
const rgbKeyframes = keyframes
.sort((kf1, kf2) => kf1.time - kf2.time)
.map((kf) => new EditRgbKeyframe_1.default(kf.time, kf.color));
if (!rgbKeyframes.length || rgbKeyframes[0].time > 0) {

@@ -84,5 +51,4 @@ rgbKeyframes.splice(0, 0, new EditRgbKeyframe_1.default(0));

return new EditRgbGradient(rgbKeyframes);
};
return EditRgbGradient;
}(Editable_1.default));
}
}
exports.default = EditRgbGradient;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,33 +6,28 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var EditColor_1 = __importDefault(require("./EditColor"));
var Editable_1 = __importDefault(require("./Editable"));
var EditRgbKeyframe = /** @class */ (function (_super) {
__extends(EditRgbKeyframe, _super);
function EditRgbKeyframe(time, color) {
if (time === void 0) { time = 0; }
if (color === void 0) { color = pixels_core_animation_1.Color.black; }
var _this = _super.call(this) || this;
_this.time = time;
_this.color = color;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const EditColor_1 = __importDefault(require("./EditColor"));
const Editable_1 = __importDefault(require("./Editable"));
class EditRgbKeyframe extends Editable_1.default {
constructor(time = 0, color = pixels_core_animation_1.Color.black) {
super();
this.time = time;
this.color = color;
}
EditRgbKeyframe.prototype.toRgbKeyframe = function (_editSet, bits) {
var kf = new pixels_core_animation_1.RgbKeyframe();
toRgbKeyframe(_editSet, bits) {
const kf = new pixels_core_animation_1.RgbKeyframe();
// Add the color to the palette if not already there, otherwise grab the color index
var colorIndex = EditColor_1.default.toColorIndex(bits.palette, this.color);
const colorIndex = EditColor_1.default.toColorIndex(bits.palette, this.color);
kf.setTimeAndColorIndex(this.time, colorIndex);
return kf;
};
EditRgbKeyframe.prototype.toKeyframe = function (_editSet, _bits) {
var kf = new pixels_core_animation_1.SimpleKeyframe();
}
toKeyframe(_editSet, _bits) {
const kf = new pixels_core_animation_1.SimpleKeyframe();
// Get the intensity from the color and scale
kf.setTimeAndIntensity(this.time, this.color.desaturate() * 255);
return kf;
};
EditRgbKeyframe.prototype.duplicate = function () {
}
duplicate() {
return new EditRgbKeyframe(this.time, this.color.duplicate());
};
return EditRgbKeyframe;
}(Editable_1.default));
}
}
exports.default = EditRgbKeyframe;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,57 +6,35 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var EditRgbGradient_1 = __importDefault(require("./EditRgbGradient"));
var Editable_1 = __importDefault(require("./Editable"));
var EditRgbTrack = /** @class */ (function (_super) {
__extends(EditRgbTrack, _super);
function EditRgbTrack(gradient) {
if (gradient === void 0) { gradient = new EditRgbGradient_1.default(); }
var _this = _super.call(this) || this;
_this.ledIndices = [];
_this.gradient = gradient;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const EditRgbGradient_1 = __importDefault(require("./EditRgbGradient"));
const Editable_1 = __importDefault(require("./Editable"));
class EditRgbTrack extends Editable_1.default {
constructor(gradient = new EditRgbGradient_1.default()) {
super();
this.ledIndices = [];
this.gradient = gradient;
}
Object.defineProperty(EditRgbTrack.prototype, "empty", {
get: function () {
return this.gradient.empty;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbTrack.prototype, "duration", {
get: function () {
return this.gradient.duration;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbTrack.prototype, "firstTime", {
get: function () {
return this.gradient.firstTime;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbTrack.prototype, "lastTime", {
get: function () {
return this.gradient.lastTime;
},
enumerable: false,
configurable: true
});
EditRgbTrack.prototype.toTrack = function (editSet, bits) {
get empty() {
return this.gradient.empty;
}
get duration() {
return this.gradient.duration;
}
get firstTime() {
return this.gradient.firstTime;
}
get lastTime() {
return this.gradient.lastTime;
}
toTrack(editSet, bits) {
// Add the keyframes
var keyframesOffset = bits.rgbKeyframes.length;
this.gradient.keyframes.forEach(function (editKeyframe) {
return bits.rgbKeyframes.push(editKeyframe.toRgbKeyframe(editSet, bits));
});
const keyframesOffset = bits.rgbKeyframes.length;
this.gradient.keyframes.forEach((editKeyframe) => bits.rgbKeyframes.push(editKeyframe.toRgbKeyframe(editSet, bits)));
return (0, pixels_core_utils_1.safeAssign)(new pixels_core_animation_1.RgbTrack(), {
keyframesOffset: keyframesOffset,
keyframesOffset,
keyFrameCount: this.gradient.keyframes.length,
ledMask: this.ledIndices.reduce(function (acc, index) { return acc | (1 << index); }, 0),
ledMask: this.ledIndices.reduce((acc, index) => acc | (1 << index), 0),
});
};
return EditRgbTrack;
}(Editable_1.default));
}
}
exports.default = EditRgbTrack;
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -21,17 +6,14 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
var Editable_1 = __importDefault(require("./Editable"));
var EditRule = /** @class */ (function (_super) {
__extends(EditRule, _super);
function EditRule(condition, actions) {
if (actions === void 0) { actions = []; }
var _this = _super.call(this) || this;
_this.condition = condition;
_this.actions = actions;
return _this;
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const Editable_1 = __importDefault(require("./Editable"));
class EditRule extends Editable_1.default {
constructor(condition, actions = []) {
super();
this.condition = condition;
this.actions = actions;
}
EditRule.prototype.toRule = function (editSet, set) {
toRule(editSet, set) {
// Create our condition
var conditionIndex = set.conditions.length;
const conditionIndex = set.conditions.length;
if (this.condition) {

@@ -41,5 +23,5 @@ set.conditions.push(this.condition.toCondition(editSet, set));

// Create our action
var actionOffset = set.actions.length;
this.actions.forEach(function (editAction) {
var act = editAction.toAction(editSet, set);
const actionOffset = set.actions.length;
this.actions.forEach((editAction) => {
const act = editAction.toAction(editSet, set);
set.actions.push(act);

@@ -49,20 +31,19 @@ });

condition: conditionIndex,
actionOffset: actionOffset,
actionOffset,
actionCount: this.actions.length,
});
};
EditRule.prototype.duplicate = function () {
}
duplicate() {
var _a;
return new EditRule((_a = this.condition) === null || _a === void 0 ? void 0 : _a.duplicate(), this.actions.map(function (action) { return action.duplicate(); }));
};
EditRule.prototype.replaceAnimation = function (oldAnimation, newAnimation) {
this.actions.forEach(function (action) {
return new EditRule((_a = this.condition) === null || _a === void 0 ? void 0 : _a.duplicate(), this.actions.map((action) => action.duplicate()));
}
replaceAnimation(oldAnimation, newAnimation) {
this.actions.forEach((action) => {
action.replaceAnimation(oldAnimation, newAnimation);
});
};
EditRule.prototype.requiresAnimation = function (animation) {
return !!this.actions.find(function (a) { return a.requiresAnimation(animation); });
};
return EditRule;
}(Editable_1.default));
}
requiresAnimation(animation) {
return !!this.actions.find((a) => a.requiresAnimation(animation));
}
}
exports.default = EditRule;

@@ -7,63 +7,65 @@ "use strict";

exports.loadAppDataSet = exports.AppDataSet = exports.getPropsWithSkipEnum = exports.skipEnum = exports.getPropsWithDisplayOrder = exports.displayOrder = exports.getPropsWithWidget = exports.widget = exports.getPropsWithUnits = exports.units = exports.getPropsWithRange = exports.range = exports.getPropsWithName = exports.name = exports.EditRule = exports.EditRgbTrack = exports.EditRgbKeyframe = exports.EditRgbGradient = exports.EditProfile = exports.EditPattern = exports.EditDataSet = exports.EditConditionRolling = exports.EditConditionIdle = exports.EditConditionHelloGoodbye = exports.EditConditionHandling = exports.EditConditionFaceCompare = exports.EditConditionCrooked = exports.EditConditionConnectionState = exports.EditConditionBatteryState = exports.EditCondition = exports.EditColor = exports.EditAudioClip = exports.EditAnimationSimple = exports.EditAnimationRainbow = exports.EditAnimationNoise = exports.EditAnimationKeyframed = exports.EditAnimationGradientPattern = exports.EditAnimationGradient = exports.EditAnimation = exports.EditActionPlayAudioClip = exports.EditActionPlayAnimation = exports.EditAction = exports.Editable = exports.ColorTypeValues = void 0;
var ColorType_1 = require("./edit/ColorType");
const AppDataSet_1 = __importDefault(require("./AppDataSet"));
exports.AppDataSet = AppDataSet_1.default;
const ColorType_1 = require("./edit/ColorType");
Object.defineProperty(exports, "ColorTypeValues", { enumerable: true, get: function () { return ColorType_1.ColorTypeValues; } });
var Editable_1 = __importDefault(require("./edit/Editable"));
exports.Editable = Editable_1.default;
var EditAction_1 = __importDefault(require("./edit/EditAction"));
const EditAction_1 = __importDefault(require("./edit/EditAction"));
exports.EditAction = EditAction_1.default;
var EditActionPlayAnimation_1 = __importDefault(require("./edit/EditActionPlayAnimation"));
const EditActionPlayAnimation_1 = __importDefault(require("./edit/EditActionPlayAnimation"));
exports.EditActionPlayAnimation = EditActionPlayAnimation_1.default;
var EditActionPlayAudioClip_1 = __importDefault(require("./edit/EditActionPlayAudioClip"));
const EditActionPlayAudioClip_1 = __importDefault(require("./edit/EditActionPlayAudioClip"));
exports.EditActionPlayAudioClip = EditActionPlayAudioClip_1.default;
var EditAnimation_1 = __importDefault(require("./edit/EditAnimation"));
const EditAnimation_1 = __importDefault(require("./edit/EditAnimation"));
exports.EditAnimation = EditAnimation_1.default;
var EditAnimationGradient_1 = __importDefault(require("./edit/EditAnimationGradient"));
const EditAnimationGradient_1 = __importDefault(require("./edit/EditAnimationGradient"));
exports.EditAnimationGradient = EditAnimationGradient_1.default;
var EditAnimationGradientPattern_1 = __importDefault(require("./edit/EditAnimationGradientPattern"));
const EditAnimationGradientPattern_1 = __importDefault(require("./edit/EditAnimationGradientPattern"));
exports.EditAnimationGradientPattern = EditAnimationGradientPattern_1.default;
var EditAnimationKeyframed_1 = __importDefault(require("./edit/EditAnimationKeyframed"));
const EditAnimationKeyframed_1 = __importDefault(require("./edit/EditAnimationKeyframed"));
exports.EditAnimationKeyframed = EditAnimationKeyframed_1.default;
var EditAnimationNoise_1 = __importDefault(require("./edit/EditAnimationNoise"));
const EditAnimationNoise_1 = __importDefault(require("./edit/EditAnimationNoise"));
exports.EditAnimationNoise = EditAnimationNoise_1.default;
var EditAnimationRainbow_1 = __importDefault(require("./edit/EditAnimationRainbow"));
const EditAnimationRainbow_1 = __importDefault(require("./edit/EditAnimationRainbow"));
exports.EditAnimationRainbow = EditAnimationRainbow_1.default;
var EditAnimationSimple_1 = __importDefault(require("./edit/EditAnimationSimple"));
const EditAnimationSimple_1 = __importDefault(require("./edit/EditAnimationSimple"));
exports.EditAnimationSimple = EditAnimationSimple_1.default;
var EditAudioClip_1 = __importDefault(require("./edit/EditAudioClip"));
const EditAudioClip_1 = __importDefault(require("./edit/EditAudioClip"));
exports.EditAudioClip = EditAudioClip_1.default;
var EditColor_1 = __importDefault(require("./edit/EditColor"));
const EditColor_1 = __importDefault(require("./edit/EditColor"));
exports.EditColor = EditColor_1.default;
var EditCondition_1 = __importDefault(require("./edit/EditCondition"));
const EditCondition_1 = __importDefault(require("./edit/EditCondition"));
exports.EditCondition = EditCondition_1.default;
var EditConditionBatteryState_1 = __importDefault(require("./edit/EditConditionBatteryState"));
const EditConditionBatteryState_1 = __importDefault(require("./edit/EditConditionBatteryState"));
exports.EditConditionBatteryState = EditConditionBatteryState_1.default;
var EditConditionConnectionState_1 = __importDefault(require("./edit/EditConditionConnectionState"));
const EditConditionConnectionState_1 = __importDefault(require("./edit/EditConditionConnectionState"));
exports.EditConditionConnectionState = EditConditionConnectionState_1.default;
var EditConditionCrooked_1 = __importDefault(require("./edit/EditConditionCrooked"));
const EditConditionCrooked_1 = __importDefault(require("./edit/EditConditionCrooked"));
exports.EditConditionCrooked = EditConditionCrooked_1.default;
var EditConditionFaceCompare_1 = __importDefault(require("./edit/EditConditionFaceCompare"));
const EditConditionFaceCompare_1 = __importDefault(require("./edit/EditConditionFaceCompare"));
exports.EditConditionFaceCompare = EditConditionFaceCompare_1.default;
var EditConditionHandling_1 = __importDefault(require("./edit/EditConditionHandling"));
const EditConditionHandling_1 = __importDefault(require("./edit/EditConditionHandling"));
exports.EditConditionHandling = EditConditionHandling_1.default;
var EditConditionHelloGoodbye_1 = __importDefault(require("./edit/EditConditionHelloGoodbye"));
const EditConditionHelloGoodbye_1 = __importDefault(require("./edit/EditConditionHelloGoodbye"));
exports.EditConditionHelloGoodbye = EditConditionHelloGoodbye_1.default;
var EditConditionIdle_1 = __importDefault(require("./edit/EditConditionIdle"));
const EditConditionIdle_1 = __importDefault(require("./edit/EditConditionIdle"));
exports.EditConditionIdle = EditConditionIdle_1.default;
var EditConditionRolling_1 = __importDefault(require("./edit/EditConditionRolling"));
const EditConditionRolling_1 = __importDefault(require("./edit/EditConditionRolling"));
exports.EditConditionRolling = EditConditionRolling_1.default;
var EditDataSet_1 = __importDefault(require("./edit/EditDataSet"));
const EditDataSet_1 = __importDefault(require("./edit/EditDataSet"));
exports.EditDataSet = EditDataSet_1.default;
var EditPattern_1 = __importDefault(require("./edit/EditPattern"));
const EditPattern_1 = __importDefault(require("./edit/EditPattern"));
exports.EditPattern = EditPattern_1.default;
var EditProfile_1 = __importDefault(require("./edit/EditProfile"));
const EditProfile_1 = __importDefault(require("./edit/EditProfile"));
exports.EditProfile = EditProfile_1.default;
var EditRgbGradient_1 = __importDefault(require("./edit/EditRgbGradient"));
const EditRgbGradient_1 = __importDefault(require("./edit/EditRgbGradient"));
exports.EditRgbGradient = EditRgbGradient_1.default;
var EditRgbKeyframe_1 = __importDefault(require("./edit/EditRgbKeyframe"));
const EditRgbKeyframe_1 = __importDefault(require("./edit/EditRgbKeyframe"));
exports.EditRgbKeyframe = EditRgbKeyframe_1.default;
var EditRgbTrack_1 = __importDefault(require("./edit/EditRgbTrack"));
const EditRgbTrack_1 = __importDefault(require("./edit/EditRgbTrack"));
exports.EditRgbTrack = EditRgbTrack_1.default;
var EditRule_1 = __importDefault(require("./edit/EditRule"));
const EditRule_1 = __importDefault(require("./edit/EditRule"));
exports.EditRule = EditRule_1.default;
var decorators_1 = require("./edit/decorators");
const Editable_1 = __importDefault(require("./edit/Editable"));
exports.Editable = Editable_1.default;
const decorators_1 = require("./edit/decorators");
Object.defineProperty(exports, "name", { enumerable: true, get: function () { return decorators_1.name; } });

@@ -81,5 +83,3 @@ Object.defineProperty(exports, "getPropsWithName", { enumerable: true, get: function () { return decorators_1.getPropsWithName; } });

Object.defineProperty(exports, "getPropsWithSkipEnum", { enumerable: true, get: function () { return decorators_1.getPropsWithSkipEnum; } });
var AppDataSet_1 = __importDefault(require("./AppDataSet"));
exports.AppDataSet = AppDataSet_1.default;
var loadAppDataSet_1 = __importDefault(require("./loadAppDataSet"));
const loadAppDataSet_1 = __importDefault(require("./loadAppDataSet"));
exports.loadAppDataSet = loadAppDataSet_1.default;

@@ -6,28 +6,28 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
var AppDataSet_1 = __importDefault(require("./AppDataSet"));
var ColorType_1 = require("./edit/ColorType");
var EditActionPlayAnimation_1 = __importDefault(require("./edit/EditActionPlayAnimation"));
var EditActionPlayAudioClip_1 = __importDefault(require("./edit/EditActionPlayAudioClip"));
var EditAnimationGradient_1 = __importDefault(require("./edit/EditAnimationGradient"));
var EditAnimationGradientPattern_1 = __importDefault(require("./edit/EditAnimationGradientPattern"));
var EditAnimationKeyframed_1 = __importDefault(require("./edit/EditAnimationKeyframed"));
var EditAnimationRainbow_1 = __importDefault(require("./edit/EditAnimationRainbow"));
var EditAnimationSimple_1 = __importDefault(require("./edit/EditAnimationSimple"));
var EditAudioClip_1 = __importDefault(require("./edit/EditAudioClip"));
var EditColor_1 = __importDefault(require("./edit/EditColor"));
var EditConditionBatteryState_1 = __importDefault(require("./edit/EditConditionBatteryState"));
var EditConditionConnectionState_1 = __importDefault(require("./edit/EditConditionConnectionState"));
var EditConditionCrooked_1 = __importDefault(require("./edit/EditConditionCrooked"));
var EditConditionFaceCompare_1 = __importDefault(require("./edit/EditConditionFaceCompare"));
var EditConditionHandling_1 = __importDefault(require("./edit/EditConditionHandling"));
var EditConditionHelloGoodbye_1 = __importDefault(require("./edit/EditConditionHelloGoodbye"));
var EditConditionIdle_1 = __importDefault(require("./edit/EditConditionIdle"));
var EditConditionRolling_1 = __importDefault(require("./edit/EditConditionRolling"));
var EditPattern_1 = __importDefault(require("./edit/EditPattern"));
var EditProfile_1 = __importDefault(require("./edit/EditProfile"));
var EditRgbGradient_1 = __importDefault(require("./edit/EditRgbGradient"));
var EditRgbKeyframe_1 = __importDefault(require("./edit/EditRgbKeyframe"));
var EditRule_1 = __importDefault(require("./edit/EditRule"));
var pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const pixels_core_animation_1 = require("@systemic-games/pixels-core-animation");
const pixels_core_utils_1 = require("@systemic-games/pixels-core-utils");
const AppDataSet_1 = __importDefault(require("./AppDataSet"));
const ColorType_1 = require("./edit/ColorType");
const EditActionPlayAnimation_1 = __importDefault(require("./edit/EditActionPlayAnimation"));
const EditActionPlayAudioClip_1 = __importDefault(require("./edit/EditActionPlayAudioClip"));
const EditAnimationGradient_1 = __importDefault(require("./edit/EditAnimationGradient"));
const EditAnimationGradientPattern_1 = __importDefault(require("./edit/EditAnimationGradientPattern"));
const EditAnimationKeyframed_1 = __importDefault(require("./edit/EditAnimationKeyframed"));
const EditAnimationRainbow_1 = __importDefault(require("./edit/EditAnimationRainbow"));
const EditAnimationSimple_1 = __importDefault(require("./edit/EditAnimationSimple"));
const EditAudioClip_1 = __importDefault(require("./edit/EditAudioClip"));
const EditColor_1 = __importDefault(require("./edit/EditColor"));
const EditConditionBatteryState_1 = __importDefault(require("./edit/EditConditionBatteryState"));
const EditConditionConnectionState_1 = __importDefault(require("./edit/EditConditionConnectionState"));
const EditConditionCrooked_1 = __importDefault(require("./edit/EditConditionCrooked"));
const EditConditionFaceCompare_1 = __importDefault(require("./edit/EditConditionFaceCompare"));
const EditConditionHandling_1 = __importDefault(require("./edit/EditConditionHandling"));
const EditConditionHelloGoodbye_1 = __importDefault(require("./edit/EditConditionHelloGoodbye"));
const EditConditionIdle_1 = __importDefault(require("./edit/EditConditionIdle"));
const EditConditionRolling_1 = __importDefault(require("./edit/EditConditionRolling"));
const EditPattern_1 = __importDefault(require("./edit/EditPattern"));
const EditProfile_1 = __importDefault(require("./edit/EditProfile"));
const EditRgbGradient_1 = __importDefault(require("./edit/EditRgbGradient"));
const EditRgbKeyframe_1 = __importDefault(require("./edit/EditRgbKeyframe"));
const EditRule_1 = __importDefault(require("./edit/EditRule"));
function toRgbColor(color) {

@@ -39,10 +39,10 @@ var _a, _b, _c;

var _a;
return ((_a = keyframes === null || keyframes === void 0 ? void 0 : keyframes.map(function (k) { return new EditRgbKeyframe_1.default(k.time, toRgbColor(k.color)); })) !== null && _a !== void 0 ? _a : []);
return ((_a = keyframes === null || keyframes === void 0 ? void 0 : keyframes.map((k) => new EditRgbKeyframe_1.default(k.time, toRgbColor(k.color)))) !== null && _a !== void 0 ? _a : []);
}
function toGradients(gradients) {
var _a;
return ((_a = gradients === null || gradients === void 0 ? void 0 : gradients.map(function (g) { return new EditRgbGradient_1.default(toKeyframes(g.keyframes)); })) !== null && _a !== void 0 ? _a : []);
return ((_a = gradients === null || gradients === void 0 ? void 0 : gradients.map((g) => new EditRgbGradient_1.default(toKeyframes(g.keyframes)))) !== null && _a !== void 0 ? _a : []);
}
function toColor(color) {
var c = new EditColor_1.default();
const c = new EditColor_1.default();
if (color) {

@@ -56,3 +56,3 @@ switch (color.type) {

default:
throw Error("Unsupported color type ".concat(color.type));
throw Error(`Unsupported color type ${color.type}`);
}

@@ -65,11 +65,11 @@ c.color = toRgbColor(color === null || color === void 0 ? void 0 : color.rgbColor);

var _a;
return ((_a = patterns === null || patterns === void 0 ? void 0 : patterns.map(function (p) { return new EditPattern_1.default(p.name, toGradients(p.gradients)); })) !== null && _a !== void 0 ? _a : []);
return ((_a = patterns === null || patterns === void 0 ? void 0 : patterns.map((p) => new EditPattern_1.default(p.name, toGradients(p.gradients)))) !== null && _a !== void 0 ? _a : []);
}
function toAudioClips(audioClips) {
var _a;
return (_a = audioClips === null || audioClips === void 0 ? void 0 : audioClips.map(function (ac) { return (0, pixels_core_utils_1.safeAssign)(new EditAudioClip_1.default(), ac); })) !== null && _a !== void 0 ? _a : [];
return (_a = audioClips === null || audioClips === void 0 ? void 0 : audioClips.map((ac) => (0, pixels_core_utils_1.safeAssign)(new EditAudioClip_1.default(), ac))) !== null && _a !== void 0 ? _a : [];
}
function toCondition(condition) {
if (condition === null || condition === void 0 ? void 0 : condition.data) {
var data = condition.data;
const data = condition.data;
//TODO make those creations and assignments in a more generic way

@@ -95,3 +95,3 @@ //TODO check flags value

default:
throw Error("Unsupported condition type ".concat(condition.type));
throw Error(`Unsupported condition type ${condition.type}`);
}

@@ -102,6 +102,6 @@ }

var _a;
var actionsWithData = actions === null || actions === void 0 ? void 0 : actions.filter(function (act) { return !!act.data; });
return ((_a = actionsWithData === null || actionsWithData === void 0 ? void 0 : actionsWithData.map(function (act) {
const actionsWithData = actions === null || actions === void 0 ? void 0 : actions.filter((act) => !!act.data);
return ((_a = actionsWithData === null || actionsWithData === void 0 ? void 0 : actionsWithData.map((act) => {
var _a, _b;
var data = act.data;
const data = act.data;
//TODO make those creations and assignments in a more generic way

@@ -120,3 +120,3 @@ switch (act.type) {

default:
throw Error("Unsupported action type ".concat(act.type));
throw Error(`Unsupported action type ${act.type}`);
}

@@ -127,7 +127,6 @@ })) !== null && _a !== void 0 ? _a : []);

var _a;
return ((_a = rules === null || rules === void 0 ? void 0 : rules.map(function (r) {
var _a;
var rule = new EditRule_1.default();
return ((_a = rules === null || rules === void 0 ? void 0 : rules.map((r) => {
const rule = new EditRule_1.default();
rule.condition = toCondition(r.condition);
(_a = rule.actions).push.apply(_a, toActions(animations, audioClips, r.actions));
rule.actions.push(...toActions(animations, audioClips, r.actions));
return rule;

@@ -142,8 +141,8 @@ })) !== null && _a !== void 0 ? _a : []);

var _a, _b, _c, _d;
var patterns = toPatterns(jsonData.patterns);
var audioClips = toAudioClips(jsonData.audioClips);
var animationsWithData = (_a = jsonData === null || jsonData === void 0 ? void 0 : jsonData.animations) === null || _a === void 0 ? void 0 : _a.filter(function (anim) { return !!anim.data; });
var animations = (_b = animationsWithData === null || animationsWithData === void 0 ? void 0 : animationsWithData.map(function (anim) {
const patterns = toPatterns(jsonData.patterns);
const audioClips = toAudioClips(jsonData.audioClips);
const animationsWithData = (_a = jsonData === null || jsonData === void 0 ? void 0 : jsonData.animations) === null || _a === void 0 ? void 0 : _a.filter((anim) => !!anim.data);
const animations = (_b = animationsWithData === null || animationsWithData === void 0 ? void 0 : animationsWithData.map((anim) => {
var _a, _b, _c, _d;
var data = anim.data;
const data = anim.data;
switch (anim.type) {

@@ -192,12 +191,10 @@ //TODO make those creations and assignments in a more generic way

default:
throw Error("Unsupported animation type ".concat(anim.type));
throw Error(`Unsupported animation type ${anim.type}`);
}
})) !== null && _b !== void 0 ? _b : [];
var toMyProfile = function (profile) {
return toProfile(animations, audioClips, profile);
};
const toMyProfile = (profile) => toProfile(animations, audioClips, profile);
return new AppDataSet_1.default({
patterns: patterns,
animations: animations,
audioClips: audioClips,
patterns,
animations,
audioClips,
profiles: (_d = (_c = jsonData === null || jsonData === void 0 ? void 0 : jsonData.behaviors) === null || _c === void 0 ? void 0 : _c.map(toMyProfile)) !== null && _d !== void 0 ? _d : [],

@@ -204,0 +201,0 @@ defaultProfile: (jsonData === null || jsonData === void 0 ? void 0 : jsonData.defaultBehavior)

import EditDataSet from "./edit/EditDataSet";
import EditProfile from "./edit/EditProfile";
var AppDataSet = /** @class */ (function () {
function AppDataSet(options) {
export default class AppDataSet {
constructor(options) {
var _a, _b, _c, _d, _e;

@@ -12,57 +12,37 @@ this._patterns = (_a = options === null || options === void 0 ? void 0 : options.patterns) !== null && _a !== void 0 ? _a : [];

}
Object.defineProperty(AppDataSet.prototype, "patterns", {
get: function () {
return this._patterns;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AppDataSet.prototype, "animations", {
get: function () {
return this._animations;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AppDataSet.prototype, "audioClips", {
get: function () {
return this._audioClips;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AppDataSet.prototype, "profiles", {
get: function () {
return this._profiles;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AppDataSet.prototype, "defaultProfile", {
get: function () {
return this._defaultProfile;
},
enumerable: false,
configurable: true
});
AppDataSet.prototype.findPattern = function (name) {
return this._patterns.find(function (p) { return p.name === name; });
};
AppDataSet.prototype.findAnimation = function (name) {
return this._animations.find(function (p) { return p.name === name; });
};
AppDataSet.prototype.findAudioClip = function (name) {
return this._audioClips.find(function (p) { return p.name === name; });
};
AppDataSet.prototype.findProfile = function (name) {
return this._profiles.find(function (p) { return p.name === name; });
};
AppDataSet.prototype.extractForAnimation = function (animation) {
get patterns() {
return this._patterns;
}
get animations() {
return this._animations;
}
get audioClips() {
return this._audioClips;
}
get profiles() {
return this._profiles;
}
get defaultProfile() {
return this._defaultProfile;
}
findPattern(name) {
return this._patterns.find((p) => p.name === name);
}
findAnimation(name) {
return this._animations.find((p) => p.name === name);
}
findAudioClip(name) {
return this._audioClips.find((p) => p.name === name);
}
findProfile(name) {
return this._profiles.find((p) => p.name === name);
}
extractForAnimation(animation) {
// The EditDataSet that will only contain the given animation and its patterns
var dataSet = new EditDataSet();
const dataSet = new EditDataSet();
// Add the single animation we need
dataSet.animations.push(animation);
// Include all patterns used by the animations
this._patterns.forEach(function (pattern) {
var required = animation.requiresPattern(pattern);
this._patterns.forEach((pattern) => {
const required = animation.requiresPattern(pattern);
if (required) {

@@ -78,15 +58,14 @@ if (required.asRgb) {

return dataSet;
};
AppDataSet.prototype.extractForAnimations = function (animations) {
var _a;
}
extractForAnimations(animations) {
// The EditDataSet that will only contain the given animation and its patterns
var dataSet = new EditDataSet();
const dataSet = new EditDataSet();
// Add the single animation we need
(_a = dataSet.animations).push.apply(_a, animations);
dataSet.animations.push(...animations);
// Include all patterns used by the animations
this._patterns.forEach(function (pattern) {
var asRgb = false;
if (animations.find(function (anim) {
this._patterns.forEach((pattern) => {
let asRgb = false;
if (animations.find((anim) => {
var _a;
var required = anim.requiresPattern(pattern);
const required = anim.requiresPattern(pattern);
asRgb = (_a = required === null || required === void 0 ? void 0 : required.asRgb) !== null && _a !== void 0 ? _a : false;

@@ -104,5 +83,4 @@ return !!required;

return dataSet;
};
AppDataSet.prototype.extractForProfile = function (profile) {
var _a;
}
extractForProfile(profile) {
if (!this._profiles.includes(profile)) {

@@ -113,17 +91,17 @@ throw new Error("Profile not in AppDataSet");

// for the given profile
var dataSet = new EditDataSet({
const dataSet = new EditDataSet({
profile: profile.duplicate(),
});
// And add the animations that the given profile uses
var animations = dataSet.profile.collectAnimations();
const animations = dataSet.profile.collectAnimations();
// Add default rules and animations to profile / set
if (this._defaultProfile) {
// Rules that are in fact copied over
var copiedRules_1 = [];
this._defaultProfile.rules.forEach(function (rule) {
var cond = rule.condition;
const copiedRules = [];
this._defaultProfile.rules.forEach((rule) => {
const cond = rule.condition;
if (cond &&
!dataSet.profile.rules.find(function (r) { var _a; return ((_a = r.condition) === null || _a === void 0 ? void 0 : _a.type) === cond.type; })) {
var ruleCopy = rule.duplicate();
copiedRules_1.push(ruleCopy);
!dataSet.profile.rules.find((r) => { var _a; return ((_a = r.condition) === null || _a === void 0 ? void 0 : _a.type) === cond.type; })) {
const ruleCopy = rule.duplicate();
copiedRules.push(ruleCopy);
dataSet.profile.rules.push(ruleCopy);

@@ -133,12 +111,12 @@ }

// Copied animations
var copiedAnims_1 = new Map();
const copiedAnims = new Map();
// Add animations used by default rules
this._defaultProfile.collectAnimations().forEach(function (editAnim) {
copiedRules_1.forEach(function (copiedRule) {
this._defaultProfile.collectAnimations().forEach((editAnim) => {
copiedRules.forEach((copiedRule) => {
if (copiedRule.requiresAnimation(editAnim)) {
var copiedAnim = copiedAnims_1.get(editAnim);
let copiedAnim = copiedAnims.get(editAnim);
if (!copiedAnim) {
copiedAnim = editAnim.duplicate();
animations.push(copiedAnim);
copiedAnims_1.set(editAnim, copiedAnim);
copiedAnims.set(editAnim, copiedAnim);
}

@@ -151,9 +129,9 @@ copiedRule.replaceAnimation(editAnim, copiedAnim);

// Copy our animations list to the resulting EditDataSet
(_a = dataSet.animations).push.apply(_a, animations);
dataSet.animations.push(...animations);
// Include all patterns used by the animations
this._patterns.forEach(function (pattern) {
var asRgb = false;
if (animations.find(function (anim) {
this._patterns.forEach((pattern) => {
let asRgb = false;
if (animations.find((anim) => {
var _a;
var required = anim.requiresPattern(pattern);
const required = anim.requiresPattern(pattern);
asRgb = (_a = required === null || required === void 0 ? void 0 : required.asRgb) !== null && _a !== void 0 ? _a : false;

@@ -171,5 +149,3 @@ return !!required;

return dataSet;
};
return AppDataSet;
}());
export default AppDataSet;
}
}
import { enumValue } from "@systemic-games/pixels-core-utils";
export var ColorTypeValues = {
/**
* @enum
*/
export const ColorTypeValues = {
Rgb: enumValue(0),

@@ -4,0 +7,0 @@ Face: enumValue(),

@@ -1,14 +0,3 @@

var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function addMetadata(metadataKey, target, metadata) {
var properties = Reflect.getMetadata(metadataKey, target);
const properties = Reflect.getMetadata(metadataKey, target);
if (properties) {

@@ -23,3 +12,3 @@ properties.push(metadata);

return function registerProperty(target, propertyKey) {
var metadata = __assign({ propertyKey: propertyKey }, data); //TODO error without cast
const metadata = Object.assign({ propertyKey }, data); //TODO error without cast
addMetadata(metadataKey, target, metadata);

@@ -32,6 +21,6 @@ };

}
var nameKey = Symbol("pixelAnimationName");
const nameKey = Symbol("pixelAnimationName");
// Name decorator factory
export function name(name) {
return createDecorator(nameKey, { name: name });
return createDecorator(nameKey, { name });
}

@@ -42,10 +31,9 @@ // Get properties with a name decorator

}
var rangeKey = Symbol("pixelAnimationRange");
const rangeKey = Symbol("pixelAnimationRange");
// Range decorator factory
export function range(min, max, step) {
if (step === void 0) { step = 0; }
export function range(min, max, step = 0) {
return createDecorator(rangeKey, {
min: min,
max: max,
step: step,
min,
max,
step,
});

@@ -57,6 +45,6 @@ }

}
var unitKey = Symbol("pixelAnimationUnits");
const unitKey = Symbol("pixelAnimationUnits");
// Units decorator factory
export function units(unit) {
return createDecorator(unitKey, { unit: unit });
return createDecorator(unitKey, { unit });
}

@@ -67,6 +55,6 @@ // Get properties with a units decorator

}
var widgetKey = Symbol("pixelAnimationWidget");
const widgetKey = Symbol("pixelAnimationWidget");
// Widget decorator factory
export function widget(type) {
return createDecorator(widgetKey, { type: type });
return createDecorator(widgetKey, { type });
}

@@ -77,6 +65,6 @@ // Get properties with a widget decorator

}
var displayOrderKey = Symbol("pixelAnimationDisplayOrder");
const displayOrderKey = Symbol("pixelAnimationDisplayOrder");
// Display order decorator factory
export function displayOrder(index) {
return createDecorator(displayOrderKey, { index: index });
return createDecorator(displayOrderKey, { index });
}

@@ -87,6 +75,6 @@ // Get properties with a display order decorator

}
var skipEnumKey = Symbol("pixelAnimationSkipEnum");
const skipEnumKey = Symbol("pixelAnimationSkipEnum");
// Skip decorator
export function skipEnum(target, propertyKey) {
addMetadata(skipEnumKey, target, { propertyKey: propertyKey });
addMetadata(skipEnumKey, target, { propertyKey });
}

@@ -93,0 +81,0 @@ // Get properties with a display order decorator

@@ -1,6 +0,2 @@

var Editable = /** @class */ (function () {
function Editable() {
}
return Editable;
}());
export default Editable;
export default class Editable {
}

@@ -1,33 +0,12 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import Editable from "./Editable";
var EditAction = /** @class */ (function (_super) {
__extends(EditAction, _super);
function EditAction() {
return _super !== null && _super.apply(this, arguments) || this;
}
EditAction.prototype.replaceAnimation = function (_oldAnimation, _newAnimation
export default class EditAction extends Editable {
replaceAnimation(_oldAnimation, _newAnimation
// eslint-disable-next-line @typescript-eslint/no-empty-function
) { };
EditAction.prototype.requiresAnimation = function (_animation) {
) { }
requiresAnimation(_animation) {
return false;
};
EditAction.prototype.collectAnimations = function () {
}
collectAnimations() {
return [];
};
return EditAction;
}(Editable));
export default EditAction;
}
}

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,21 +11,13 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { name, range, widget } from "./decorators";
var EditActionPlayAnimation = /** @class */ (function (_super) {
__extends(EditActionPlayAnimation, _super);
function EditActionPlayAnimation(animation, faceIndex, loopCount) {
if (faceIndex === void 0) { faceIndex = -1; }
if (loopCount === void 0) { loopCount = 1; }
var _this = _super.call(this) || this;
_this.animation = animation;
_this.faceIndex = faceIndex;
_this.loopCount = loopCount;
return _this;
export default class EditActionPlayAnimation extends EditAction {
constructor(animation, faceIndex = -1, loopCount = 1) {
super();
this.animation = animation;
this.faceIndex = faceIndex;
this.loopCount = loopCount;
}
Object.defineProperty(EditActionPlayAnimation.prototype, "type", {
get: function () {
return ActionTypeValues.PlayAnimation;
},
enumerable: false,
configurable: true
});
EditActionPlayAnimation.prototype.toAction = function (editSet, _set) {
get type() {
return ActionTypeValues.PlayAnimation;
}
toAction(editSet, _set) {
return safeAssign(new ActionPlayAnimation(), {

@@ -53,31 +30,29 @@ animIndex: this.animation

});
};
EditActionPlayAnimation.prototype.duplicate = function () {
}
duplicate() {
return new EditActionPlayAnimation(this.animation, this.faceIndex, this.loopCount);
};
EditActionPlayAnimation.prototype.replaceAnimation = function (oldAnimation, newAnimation) {
}
replaceAnimation(oldAnimation, newAnimation) {
if (this.animation === oldAnimation) {
this.animation = newAnimation;
}
};
EditActionPlayAnimation.prototype.requiresAnimation = function (animation) {
}
requiresAnimation(animation) {
return this.animation === animation;
};
EditActionPlayAnimation.prototype.collectAnimations = function () {
}
collectAnimations() {
return this.animation ? [this.animation] : [];
};
__decorate([
name("Lighting Pattern")
], EditActionPlayAnimation.prototype, "animation", void 0);
__decorate([
widget("playbackFace"),
name("Play on Face")
], EditActionPlayAnimation.prototype, "faceIndex", void 0);
__decorate([
widget("slider"),
range(1, 10),
name("Repeat Count")
], EditActionPlayAnimation.prototype, "loopCount", void 0);
return EditActionPlayAnimation;
}(EditAction));
export default EditActionPlayAnimation;
}
}
__decorate([
name("Lighting Pattern")
], EditActionPlayAnimation.prototype, "animation", void 0);
__decorate([
widget("playbackFace"),
name("Play on Face")
], EditActionPlayAnimation.prototype, "faceIndex", void 0);
__decorate([
widget("slider"),
range(1, 10),
name("Repeat Count")
], EditActionPlayAnimation.prototype, "loopCount", void 0);

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,17 +11,11 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { name } from "./decorators";
var EditActionPlayAudioClip = /** @class */ (function (_super) {
__extends(EditActionPlayAudioClip, _super);
function EditActionPlayAudioClip(clip) {
var _this = _super.call(this) || this;
_this.clip = clip;
return _this;
export default class EditActionPlayAudioClip extends EditAction {
constructor(clip) {
super();
this.clip = clip;
}
Object.defineProperty(EditActionPlayAudioClip.prototype, "type", {
get: function () {
return ActionTypeValues.PlayAnimation;
},
enumerable: false,
configurable: true
});
EditActionPlayAudioClip.prototype.toAction = function (_editSet, _set) {
get type() {
return ActionTypeValues.PlayAnimation;
}
toAction(_editSet, _set) {
var _a, _b;

@@ -46,11 +25,9 @@ return safeAssign(new ActionPlayAudioClip(), {

});
};
EditActionPlayAudioClip.prototype.duplicate = function () {
}
duplicate() {
return new EditActionPlayAudioClip(this.clip);
};
__decorate([
name("Audio Clip")
], EditActionPlayAudioClip.prototype, "clip", void 0);
return EditActionPlayAudioClip;
}(EditAction));
export default EditActionPlayAudioClip;
}
}
__decorate([
name("Audio Clip")
], EditActionPlayAudioClip.prototype, "clip", void 0);

@@ -1,31 +0,11 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import Editable from "./Editable";
var EditAnimation = /** @class */ (function (_super) {
__extends(EditAnimation, _super);
function EditAnimation(name) {
if (name === void 0) { name = ""; }
var _this = _super.call(this) || this;
_this.name = name;
return _this;
export default class EditAnimation extends Editable {
constructor(name = "") {
super();
this.name = name;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
EditAnimation.prototype.requiresPattern = function (pattern) {
requiresPattern(pattern) {
return undefined;
};
return EditAnimation;
}(Editable));
export default EditAnimation;
}
}

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,33 +12,22 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { widget, range, units, name } from "./decorators";
var EditAnimationGradient = /** @class */ (function (_super) {
__extends(EditAnimationGradient, _super);
function EditAnimationGradient(options) {
var _this = this;
export default class EditAnimationGradient extends EditAnimation {
constructor(options) {
var _a, _b;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : Constants.faceMaskAllLeds;
_this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : Constants.faceMaskAllLeds;
this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
}
Object.defineProperty(EditAnimationGradient.prototype, "type", {
get: function () {
return AnimationTypeValues.Gradient;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationGradient.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationGradient.prototype.toAnimation = function (editSet, bits) {
get type() {
return AnimationTypeValues.Gradient;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, bits) {
// Add gradient
var gradientTrackOffset = bits.rgbTracks.length;
const gradientTrackOffset = bits.rgbTracks.length;
if (this.gradient) {

@@ -65,6 +39,6 @@ bits.rgbTracks.push(new EditRgbTrack(this.gradient).toTrack(editSet, bits));

faceMask: this.faces,
gradientTrackOffset: gradientTrackOffset,
gradientTrackOffset,
});
};
EditAnimationGradient.prototype.duplicate = function () {
}
duplicate() {
var _a;

@@ -77,20 +51,18 @@ return new EditAnimationGradient({

});
};
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationGradient.prototype, "duration", null);
__decorate([
widget("faceMask"),
range(0, 19, 1),
name("Face Mask")
], EditAnimationGradient.prototype, "faces", void 0);
__decorate([
widget("gradient"),
name("Gradient")
], EditAnimationGradient.prototype, "gradient", void 0);
return EditAnimationGradient;
}(EditAnimation));
export default EditAnimationGradient;
}
}
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationGradient.prototype, "duration", null);
__decorate([
widget("faceMask"),
range(0, 19, 1),
name("Face Mask")
], EditAnimationGradient.prototype, "faces", void 0);
__decorate([
widget("gradient"),
name("Gradient")
], EditAnimationGradient.prototype, "gradient", void 0);

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,34 +12,23 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { widget, range, units, name } from "./decorators";
var EditAnimationGradientPattern = /** @class */ (function (_super) {
__extends(EditAnimationGradientPattern, _super);
function EditAnimationGradientPattern(options) {
var _this = this;
export default class EditAnimationGradientPattern extends EditAnimation {
constructor(options) {
var _a, _b;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.pattern = options === null || options === void 0 ? void 0 : options.pattern;
_this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
_this.overrideWithFace = (_b = options === null || options === void 0 ? void 0 : options.overrideWithFace) !== null && _b !== void 0 ? _b : false;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.pattern = options === null || options === void 0 ? void 0 : options.pattern;
this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
this.overrideWithFace = (_b = options === null || options === void 0 ? void 0 : options.overrideWithFace) !== null && _b !== void 0 ? _b : false;
}
Object.defineProperty(EditAnimationGradientPattern.prototype, "type", {
get: function () {
return AnimationTypeValues.GradientPattern;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationGradientPattern.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationGradientPattern.prototype.toAnimation = function (editSet, bits) {
get type() {
return AnimationTypeValues.GradientPattern;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, bits) {
var _a, _b;
var gradientTrackOffset = bits.rgbTracks.length;
const gradientTrackOffset = bits.rgbTracks.length;
// Add gradient

@@ -70,7 +44,7 @@ if (this.gradient) {

trackCount: (_b = (_a = this.pattern) === null || _a === void 0 ? void 0 : _a.gradients.length) !== null && _b !== void 0 ? _b : 0,
gradientTrackOffset: gradientTrackOffset,
gradientTrackOffset,
overrideWithFace: this.overrideWithFace ? 1 : 0,
});
};
EditAnimationGradientPattern.prototype.duplicate = function () {
}
duplicate() {
var _a;

@@ -84,27 +58,25 @@ return new EditAnimationGradientPattern({

});
};
EditAnimationGradientPattern.prototype.requiresPattern = function (pattern) {
}
requiresPattern(pattern) {
if (this.pattern === pattern) {
return { asRgb: false };
}
};
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationGradientPattern.prototype, "duration", null);
__decorate([
widget("grayscalePattern"),
name("LED Pattern")
], EditAnimationGradientPattern.prototype, "pattern", void 0);
__decorate([
widget("gradient"),
name("RGB Gradient")
], EditAnimationGradientPattern.prototype, "gradient", void 0);
__decorate([
name("Override color based on face")
], EditAnimationGradientPattern.prototype, "overrideWithFace", void 0);
return EditAnimationGradientPattern;
}(EditAnimation));
export default EditAnimationGradientPattern;
}
}
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationGradientPattern.prototype, "duration", null);
__decorate([
widget("grayscalePattern"),
name("LED Pattern")
], EditAnimationGradientPattern.prototype, "pattern", void 0);
__decorate([
widget("gradient"),
name("RGB Gradient")
], EditAnimationGradientPattern.prototype, "gradient", void 0);
__decorate([
name("Override color based on face")
], EditAnimationGradientPattern.prototype, "overrideWithFace", void 0);

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,31 +11,20 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { widget, range, units, name } from "./decorators";
var EditAnimationKeyframed = /** @class */ (function (_super) {
__extends(EditAnimationKeyframed, _super);
function EditAnimationKeyframed(options) {
var _this = this;
export default class EditAnimationKeyframed extends EditAnimation {
constructor(options) {
var _a, _b;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.pattern = options === null || options === void 0 ? void 0 : options.pattern;
_this.flowOrder = (_b = options === null || options === void 0 ? void 0 : options.flowOrder) !== null && _b !== void 0 ? _b : false;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.pattern = options === null || options === void 0 ? void 0 : options.pattern;
this.flowOrder = (_b = options === null || options === void 0 ? void 0 : options.flowOrder) !== null && _b !== void 0 ? _b : false;
}
Object.defineProperty(EditAnimationKeyframed.prototype, "type", {
get: function () {
return AnimationTypeValues.Keyframed;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationKeyframed.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationKeyframed.prototype.toAnimation = function (editSet, _bits) {
get type() {
return AnimationTypeValues.Keyframed;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, _bits) {
var _a, _b;

@@ -63,4 +37,4 @@ return safeAssign(new AnimationKeyframed(), {

});
};
EditAnimationKeyframed.prototype.duplicate = function () {
}
duplicate() {
return new EditAnimationKeyframed({

@@ -72,23 +46,21 @@ name: this.name,

});
};
EditAnimationKeyframed.prototype.requiresPattern = function (pattern) {
}
requiresPattern(pattern) {
if (this.pattern === pattern) {
return { asRgb: true };
}
};
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationKeyframed.prototype, "duration", null);
__decorate([
widget("rgbPattern"),
name("LED Pattern")
], EditAnimationKeyframed.prototype, "pattern", void 0);
__decorate([
name("Traveling Order")
], EditAnimationKeyframed.prototype, "flowOrder", void 0);
return EditAnimationKeyframed;
}(EditAnimation));
export default EditAnimationKeyframed;
}
}
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationKeyframed.prototype, "duration", null);
__decorate([
widget("rgbPattern"),
name("LED Pattern")
], EditAnimationKeyframed.prototype, "pattern", void 0);
__decorate([
name("Traveling Order")
], EditAnimationKeyframed.prototype, "flowOrder", void 0);

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,41 +12,30 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { widget, range, units, name } from "./decorators";
var EditAnimationNoise = /** @class */ (function (_super) {
__extends(EditAnimationNoise, _super);
function EditAnimationNoise(options) {
var _this = this;
export default class EditAnimationNoise extends EditAnimation {
constructor(options) {
var _a, _b, _c, _d, _e;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
_this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : Constants.faceMaskAllLeds;
_this.blinkDuration = (_c = options === null || options === void 0 ? void 0 : options.blinkDuration) !== null && _c !== void 0 ? _c : 0.1;
_this.blinkGradient = options === null || options === void 0 ? void 0 : options.blinkGradient;
_this.blinkCount = (_d = options === null || options === void 0 ? void 0 : options.blinkCount) !== null && _d !== void 0 ? _d : 10;
_this.fade = (_e = options === null || options === void 0 ? void 0 : options.fade) !== null && _e !== void 0 ? _e : 0;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.gradient = options === null || options === void 0 ? void 0 : options.gradient;
this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : Constants.faceMaskAllLeds;
this.blinkDuration = (_c = options === null || options === void 0 ? void 0 : options.blinkDuration) !== null && _c !== void 0 ? _c : 0.1;
this.blinkGradient = options === null || options === void 0 ? void 0 : options.blinkGradient;
this.blinkCount = (_d = options === null || options === void 0 ? void 0 : options.blinkCount) !== null && _d !== void 0 ? _d : 10;
this.fade = (_e = options === null || options === void 0 ? void 0 : options.fade) !== null && _e !== void 0 ? _e : 0;
}
Object.defineProperty(EditAnimationNoise.prototype, "type", {
get: function () {
return AnimationTypeValues.Noise;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationNoise.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationNoise.prototype.toAnimation = function (editSet, bits) {
get type() {
return AnimationTypeValues.Noise;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, bits) {
// Add gradient
var gradientTrackOffset = bits.rgbTracks.length;
const gradientTrackOffset = bits.rgbTracks.length;
if (this.gradient) {
bits.rgbTracks.push(new EditRgbTrack(this.gradient).toTrack(editSet, bits));
}
var blinkTrackOffset = bits.rgbTracks.length;
const blinkTrackOffset = bits.rgbTracks.length;
if (this.blinkGradient) {

@@ -72,4 +46,4 @@ bits.rgbTracks.push(new EditRgbTrack(this.blinkGradient).toTrack(editSet, bits));

duration: this.duration * 1000,
gradientTrackOffset: gradientTrackOffset,
blinkTrackOffset: blinkTrackOffset,
gradientTrackOffset,
blinkTrackOffset,
blinkCount: this.blinkCount,

@@ -80,4 +54,4 @@ blinkDuration: this.blinkDuration * 255,

});
};
EditAnimationNoise.prototype.duplicate = function () {
}
duplicate() {
var _a;

@@ -94,39 +68,37 @@ return new EditAnimationNoise({

});
};
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationNoise.prototype, "duration", null);
__decorate([
widget("gradient"),
name("Overall Gradient")
], EditAnimationNoise.prototype, "gradient", void 0);
__decorate([
widget("faceMask"),
range(0, 19, 1),
name("Face Mask")
], EditAnimationNoise.prototype, "faces", void 0);
__decorate([
widget("slider"),
range(0.001, 0.1),
name("Blink Duration Ratio")
], EditAnimationNoise.prototype, "blinkDuration", void 0);
__decorate([
widget("gradient"),
name("Individual Gradient")
], EditAnimationNoise.prototype, "blinkGradient", void 0);
__decorate([
widget("slider"),
range(10, 100),
name("Blink Count")
], EditAnimationNoise.prototype, "blinkCount", void 0);
__decorate([
widget("slider"),
range(0, 1),
name("Fading Sharpness")
], EditAnimationNoise.prototype, "fade", void 0);
return EditAnimationNoise;
}(EditAnimation));
export default EditAnimationNoise;
}
}
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationNoise.prototype, "duration", null);
__decorate([
widget("gradient"),
name("Overall Gradient")
], EditAnimationNoise.prototype, "gradient", void 0);
__decorate([
widget("faceMask"),
range(0, 19, 1),
name("Face Mask")
], EditAnimationNoise.prototype, "faces", void 0);
__decorate([
widget("slider"),
range(0.001, 0.1),
name("Blink Duration Ratio")
], EditAnimationNoise.prototype, "blinkDuration", void 0);
__decorate([
widget("gradient"),
name("Individual Gradient")
], EditAnimationNoise.prototype, "blinkGradient", void 0);
__decorate([
widget("slider"),
range(10, 100),
name("Blink Count")
], EditAnimationNoise.prototype, "blinkCount", void 0);
__decorate([
widget("slider"),
range(0, 1),
name("Fading Sharpness")
], EditAnimationNoise.prototype, "fade", void 0);

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,33 +11,22 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { widget, range, units, name } from "./decorators";
var EditAnimationRainbow = /** @class */ (function (_super) {
__extends(EditAnimationRainbow, _super);
function EditAnimationRainbow(options) {
var _this = this;
export default class EditAnimationRainbow extends EditAnimation {
constructor(options) {
var _a, _b, _c, _d, _e;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
_this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
_this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : Constants.faceMaskAllLeds;
_this.count = (_c = options === null || options === void 0 ? void 0 : options.count) !== null && _c !== void 0 ? _c : 1;
_this.fade = (_d = options === null || options === void 0 ? void 0 : options.fade) !== null && _d !== void 0 ? _d : 0;
_this.traveling = (_e = options === null || options === void 0 ? void 0 : options.traveling) !== null && _e !== void 0 ? _e : true;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
this._duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 1;
this.faces = (_b = options === null || options === void 0 ? void 0 : options.faces) !== null && _b !== void 0 ? _b : Constants.faceMaskAllLeds;
this.count = (_c = options === null || options === void 0 ? void 0 : options.count) !== null && _c !== void 0 ? _c : 1;
this.fade = (_d = options === null || options === void 0 ? void 0 : options.fade) !== null && _d !== void 0 ? _d : 0;
this.traveling = (_e = options === null || options === void 0 ? void 0 : options.traveling) !== null && _e !== void 0 ? _e : true;
}
Object.defineProperty(EditAnimationRainbow.prototype, "type", {
get: function () {
return AnimationTypeValues.Rainbow;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationRainbow.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationRainbow.prototype.toAnimation = function (_editSet, _bits) {
get type() {
return AnimationTypeValues.Rainbow;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(_editSet, _bits) {
return safeAssign(new AnimationRainbow(), {

@@ -65,4 +39,4 @@ duration: this.duration * 1000,

});
};
EditAnimationRainbow.prototype.duplicate = function () {
}
duplicate() {
return new EditAnimationRainbow({

@@ -76,29 +50,27 @@ name: this.name,

});
};
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationRainbow.prototype, "duration", null);
__decorate([
widget("faceMask"),
range(0, 19, 1),
name("Face Mask")
], EditAnimationRainbow.prototype, "faces", void 0);
__decorate([
widget("index"),
range(1, 10, 1),
name("Repeat Count")
], EditAnimationRainbow.prototype, "count", void 0);
__decorate([
widget("slider"),
range(0, 1),
name("Fading Sharpness")
], EditAnimationRainbow.prototype, "fade", void 0);
__decorate([
name("Traveling Order")
], EditAnimationRainbow.prototype, "traveling", void 0);
return EditAnimationRainbow;
}(EditAnimation));
export default EditAnimationRainbow;
}
}
__decorate([
widget("slider"),
range(0.1, 30, 0.1),
units("s"),
name("Duration")
], EditAnimationRainbow.prototype, "duration", null);
__decorate([
widget("faceMask"),
range(0, 19, 1),
name("Face Mask")
], EditAnimationRainbow.prototype, "faces", void 0);
__decorate([
widget("index"),
range(1, 10, 1),
name("Repeat Count")
], EditAnimationRainbow.prototype, "count", void 0);
__decorate([
widget("slider"),
range(0, 1),
name("Fading Sharpness")
], EditAnimationRainbow.prototype, "fade", void 0);
__decorate([
name("Traveling Order")
], EditAnimationRainbow.prototype, "traveling", void 0);

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,34 +12,23 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { widget, range, units, name } from "./decorators";
var EditAnimationSimple = /** @class */ (function (_super) {
__extends(EditAnimationSimple, _super);
function EditAnimationSimple(options) {
var _this = this;
export default class EditAnimationSimple extends EditAnimation {
constructor(options) {
var _a, _b, _c, _d, _e;
_this = _super.call(this, options === null || options === void 0 ? void 0 : options.name) || this;
var color = (_a = options === null || options === void 0 ? void 0 : options.color) !== null && _a !== void 0 ? _a : Color.red;
_this._duration = (_b = options === null || options === void 0 ? void 0 : options.duration) !== null && _b !== void 0 ? _b : 1;
_this.faces = (_c = options === null || options === void 0 ? void 0 : options.faces) !== null && _c !== void 0 ? _c : Constants.faceMaskAllLeds;
_this.color = color instanceof Color ? EditColor.fromColor(color) : color;
_this.count = (_d = options === null || options === void 0 ? void 0 : options.count) !== null && _d !== void 0 ? _d : 1;
_this.fade = (_e = options === null || options === void 0 ? void 0 : options.fade) !== null && _e !== void 0 ? _e : 0.1;
return _this;
super(options === null || options === void 0 ? void 0 : options.name);
const color = (_a = options === null || options === void 0 ? void 0 : options.color) !== null && _a !== void 0 ? _a : Color.red;
this._duration = (_b = options === null || options === void 0 ? void 0 : options.duration) !== null && _b !== void 0 ? _b : 1;
this.faces = (_c = options === null || options === void 0 ? void 0 : options.faces) !== null && _c !== void 0 ? _c : Constants.faceMaskAllLeds;
this.color = color instanceof Color ? EditColor.fromColor(color) : color;
this.count = (_d = options === null || options === void 0 ? void 0 : options.count) !== null && _d !== void 0 ? _d : 1;
this.fade = (_e = options === null || options === void 0 ? void 0 : options.fade) !== null && _e !== void 0 ? _e : 0.1;
}
Object.defineProperty(EditAnimationSimple.prototype, "type", {
get: function () {
return AnimationTypeValues.Simple;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditAnimationSimple.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: false,
configurable: true
});
EditAnimationSimple.prototype.toAnimation = function (editSet, bits) {
get type() {
return AnimationTypeValues.Simple;
}
get duration() {
return this._duration;
}
set duration(value) {
this._duration = value;
}
toAnimation(editSet, bits) {
return safeAssign(new AnimationSimple(), {

@@ -67,4 +41,4 @@ duration: this.duration * 1000,

});
};
EditAnimationSimple.prototype.duplicate = function () {
}
duplicate() {
return new EditAnimationSimple({

@@ -77,29 +51,27 @@ name: this.name,

});
};
__decorate([
widget("slider"),
range(0.1, 30, 0),
units("s"),
name("Duration")
], EditAnimationSimple.prototype, "duration", null);
__decorate([
widget("faceMask"),
range(0, 19, 1),
name("Face Mask")
], EditAnimationSimple.prototype, "faces", void 0);
__decorate([
name("Color")
], EditAnimationSimple.prototype, "color", void 0);
__decorate([
widget("index"),
range(1, 10, 1),
name("Repeat Count")
], EditAnimationSimple.prototype, "count", void 0);
__decorate([
widget("slider"),
range(0.1, 1),
name("Fading Sharpness")
], EditAnimationSimple.prototype, "fade", void 0);
return EditAnimationSimple;
}(EditAnimation));
export default EditAnimationSimple;
}
}
__decorate([
widget("slider"),
range(0.1, 30, 0),
units("s"),
name("Duration")
], EditAnimationSimple.prototype, "duration", null);
__decorate([
widget("faceMask"),
range(0, 19, 1),
name("Face Mask")
], EditAnimationSimple.prototype, "faces", void 0);
__decorate([
name("Color")
], EditAnimationSimple.prototype, "color", void 0);
__decorate([
widget("index"),
range(1, 10, 1),
name("Repeat Count")
], EditAnimationSimple.prototype, "count", void 0);
__decorate([
widget("slider"),
range(0.1, 1),
name("Fading Sharpness")
], EditAnimationSimple.prototype, "fade", void 0);

@@ -1,26 +0,7 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import Editable from "./Editable";
var EditAudioClip = /** @class */ (function (_super) {
__extends(EditAudioClip, _super);
function EditAudioClip() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.id = -1;
return _this;
export default class EditAudioClip extends Editable {
constructor() {
super(...arguments);
this.id = -1;
}
return EditAudioClip;
}(Editable));
export default EditAudioClip;
}

@@ -1,33 +0,14 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { Constants, Color, gamma } from "@systemic-games/pixels-core-animation";
import { ColorTypeValues } from "./ColorType";
import Editable from "./Editable";
var EditColor = /** @class */ (function (_super) {
__extends(EditColor, _super);
function EditColor(type, color) {
if (type === void 0) { type = ColorTypeValues.Rgb; }
if (color === void 0) { color = Color.black; }
var _this = _super.call(this) || this;
_this.type = type;
_this.color = color;
return _this;
export default class EditColor extends Editable {
constructor(type = ColorTypeValues.Rgb, color = Color.black) {
super();
this.type = type;
this.color = color;
}
EditColor.fromColor = function (color) {
static fromColor(color) {
return new EditColor(ColorTypeValues.Rgb, color);
};
EditColor.prototype.toColorIndex = function (refPalette) {
}
toColorIndex(refPalette) {
switch (this.type) {

@@ -41,8 +22,8 @@ case ColorTypeValues.Rgb:

default:
throw new Error("Unsupported EditColor type: ".concat(this.type));
throw new Error(`Unsupported EditColor type: ${this.type}`);
}
};
EditColor.toColorIndex = function (refPalette, color) {
var colorGamma = gamma(color);
var colorIndex = refPalette.findIndex(function (c) { return colorGamma.equals(c); });
}
static toColorIndex(refPalette, color) {
const colorGamma = gamma(color);
let colorIndex = refPalette.findIndex((c) => colorGamma.equals(c));
if (colorIndex === -1) {

@@ -53,8 +34,6 @@ colorIndex = refPalette.length;

return colorIndex;
};
EditColor.prototype.duplicate = function () {
}
duplicate() {
return new EditColor(this.type, this.color.duplicate());
};
return EditColor;
}(Editable));
export default EditColor;
}
}

@@ -1,24 +0,3 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import Editable from "./Editable";
var EditCondition = /** @class */ (function (_super) {
__extends(EditCondition, _super);
function EditCondition() {
return _super !== null && _super.apply(this, arguments) || this;
}
return EditCondition;
}(Editable));
export default EditCondition;
export default class EditCondition extends Editable {
}

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,20 +11,12 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { name, widget, range, units } from "./decorators";
var EditConditionBatteryState = /** @class */ (function (_super) {
__extends(EditConditionBatteryState, _super);
function EditConditionBatteryState(flags, recheckAfter) {
if (flags === void 0) { flags = 0; }
if (recheckAfter === void 0) { recheckAfter = 1; }
var _this = _super.call(this) || this;
_this.flags = flags;
_this.recheckAfter = recheckAfter;
return _this;
export default class EditConditionBatteryState extends EditCondition {
constructor(flags = 0, recheckAfter = 1) {
super();
this.flags = flags;
this.recheckAfter = recheckAfter;
}
Object.defineProperty(EditConditionBatteryState.prototype, "type", {
get: function () {
return ConditionTypeValues.BatteryState;
},
enumerable: false,
configurable: true
});
EditConditionBatteryState.prototype.toCondition = function (_editSet, _set) {
get type() {
return ConditionTypeValues.BatteryState;
}
toCondition(_editSet, _set) {
return safeAssign(new ConditionBatteryState(), {

@@ -49,17 +26,15 @@ flags: this.flags,

});
};
EditConditionBatteryState.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionBatteryState(this.flags, this.recheckAfter);
};
__decorate([
widget("bitfield"),
name("Battery State")
], EditConditionBatteryState.prototype, "flags", void 0);
__decorate([
widget("slider"),
range(5, 60),
units("s")
], EditConditionBatteryState.prototype, "recheckAfter", void 0);
return EditConditionBatteryState;
}(EditCondition));
export default EditConditionBatteryState;
}
}
__decorate([
widget("bitfield"),
name("Battery State")
], EditConditionBatteryState.prototype, "flags", void 0);
__decorate([
widget("slider"),
range(5, 60),
units("s")
], EditConditionBatteryState.prototype, "recheckAfter", void 0);

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,31 +11,22 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { name, widget } from "./decorators";
var EditConditionConnectionState = /** @class */ (function (_super) {
__extends(EditConditionConnectionState, _super);
function EditConditionConnectionState(flags) {
if (flags === void 0) { flags = 0; }
var _this = _super.call(this) || this;
_this.flags = flags;
return _this;
export default class EditConditionConnectionState extends EditCondition {
constructor(flags = 0) {
super();
this.flags = flags;
}
Object.defineProperty(EditConditionConnectionState.prototype, "type", {
get: function () {
return ConditionTypeValues.ConnectionState;
},
enumerable: false,
configurable: true
});
EditConditionConnectionState.prototype.toCondition = function (_editSet, _set) {
get type() {
return ConditionTypeValues.ConnectionState;
}
toCondition(_editSet, _set) {
return safeAssign(new ConditionConnectionState(), {
flags: this.flags,
});
};
EditConditionConnectionState.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionConnectionState(this.flags);
};
__decorate([
widget("bitfield"),
name("Connection Event")
], EditConditionConnectionState.prototype, "flags", void 0);
return EditConditionConnectionState;
}(EditCondition));
export default EditConditionConnectionState;
}
}
__decorate([
widget("bitfield"),
name("Connection Event")
], EditConditionConnectionState.prototype, "flags", void 0);

@@ -1,38 +0,13 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { ConditionTypeValues, ConditionCrooked, } from "@systemic-games/pixels-core-animation";
import EditCondition from "./EditCondition";
var EditConditionCrooked = /** @class */ (function (_super) {
__extends(EditConditionCrooked, _super);
function EditConditionCrooked() {
return _super !== null && _super.apply(this, arguments) || this;
export default class EditConditionCrooked extends EditCondition {
get type() {
return ConditionTypeValues.Crooked;
}
Object.defineProperty(EditConditionCrooked.prototype, "type", {
get: function () {
return ConditionTypeValues.Crooked;
},
enumerable: false,
configurable: true
});
EditConditionCrooked.prototype.toCondition = function (_editSet, _set) {
toCondition(_editSet, _set) {
return new ConditionCrooked();
};
EditConditionCrooked.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionCrooked();
};
return EditConditionCrooked;
}(EditCondition));
export default EditConditionCrooked;
}
}

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,20 +11,12 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { name, range, widget } from "./decorators";
var EditConditionFaceCompare = /** @class */ (function (_super) {
__extends(EditConditionFaceCompare, _super);
function EditConditionFaceCompare(flags, faceIndex) {
if (flags === void 0) { flags = 0; }
if (faceIndex === void 0) { faceIndex = 0; }
var _this = _super.call(this) || this;
_this.flags = flags;
_this.faceIndex = faceIndex;
return _this;
export default class EditConditionFaceCompare extends EditCondition {
constructor(flags = 0, faceIndex = 0) {
super();
this.flags = flags;
this.faceIndex = faceIndex;
}
Object.defineProperty(EditConditionFaceCompare.prototype, "type", {
get: function () {
return ConditionTypeValues.FaceCompare;
},
enumerable: false,
configurable: true
});
EditConditionFaceCompare.prototype.toCondition = function (_editSet, _set) {
get type() {
return ConditionTypeValues.FaceCompare;
}
toCondition(_editSet, _set) {
return safeAssign(new ConditionFaceCompare(), {

@@ -49,17 +26,15 @@ faceIndex: this.faceIndex,

});
};
EditConditionFaceCompare.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionFaceCompare(this.flags, this.faceIndex);
};
__decorate([
widget("bitfield"),
name("Comparison")
], EditConditionFaceCompare.prototype, "flags", void 0);
__decorate([
widget("faceIndex"),
range(0, 19),
name("Than")
], EditConditionFaceCompare.prototype, "faceIndex", void 0);
return EditConditionFaceCompare;
}(EditCondition));
export default EditConditionFaceCompare;
}
}
__decorate([
widget("bitfield"),
name("Comparison")
], EditConditionFaceCompare.prototype, "flags", void 0);
__decorate([
widget("faceIndex"),
range(0, 19),
name("Than")
], EditConditionFaceCompare.prototype, "faceIndex", void 0);

@@ -1,38 +0,13 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { ConditionTypeValues, ConditionHandling, } from "@systemic-games/pixels-core-animation";
import EditCondition from "./EditCondition";
var EditConditionHandling = /** @class */ (function (_super) {
__extends(EditConditionHandling, _super);
function EditConditionHandling() {
return _super !== null && _super.apply(this, arguments) || this;
export default class EditConditionHandling extends EditCondition {
get type() {
return ConditionTypeValues.Handling;
}
Object.defineProperty(EditConditionHandling.prototype, "type", {
get: function () {
return ConditionTypeValues.Handling;
},
enumerable: false,
configurable: true
});
EditConditionHandling.prototype.toCondition = function (_editSet, _set) {
toCondition(_editSet, _set) {
return new ConditionHandling();
};
EditConditionHandling.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionHandling();
};
return EditConditionHandling;
}(EditCondition));
export default EditConditionHandling;
}
}

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,31 +11,22 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { name, widget } from "./decorators";
var EditConditionHelloGoodbye = /** @class */ (function (_super) {
__extends(EditConditionHelloGoodbye, _super);
function EditConditionHelloGoodbye(flags) {
if (flags === void 0) { flags = 0; }
var _this = _super.call(this) || this;
_this.flags = flags;
return _this;
export default class EditConditionHelloGoodbye extends EditCondition {
constructor(flags = 0) {
super();
this.flags = flags;
}
Object.defineProperty(EditConditionHelloGoodbye.prototype, "type", {
get: function () {
return ConditionTypeValues.HelloGoodbye;
},
enumerable: false,
configurable: true
});
EditConditionHelloGoodbye.prototype.toCondition = function (_editSet, _set) {
get type() {
return ConditionTypeValues.HelloGoodbye;
}
toCondition(_editSet, _set) {
return safeAssign(new ConditionHelloGoodbye(), {
flags: this.flags,
});
};
EditConditionHelloGoodbye.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionHelloGoodbye(this.flags);
};
__decorate([
widget("bitfield"),
name("Hello / Goodbye")
], EditConditionHelloGoodbye.prototype, "flags", void 0);
return EditConditionHelloGoodbye;
}(EditCondition));
export default EditConditionHelloGoodbye;
}
}
__decorate([
widget("bitfield"),
name("Hello / Goodbye")
], EditConditionHelloGoodbye.prototype, "flags", void 0);

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,32 +11,23 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { range, units, widget } from "./decorators";
var EditConditionIdle = /** @class */ (function (_super) {
__extends(EditConditionIdle, _super);
function EditConditionIdle(period) {
if (period === void 0) { period = 10; }
var _this = _super.call(this) || this;
_this.period = period;
return _this;
export default class EditConditionIdle extends EditCondition {
constructor(period = 10) {
super();
this.period = period;
}
Object.defineProperty(EditConditionIdle.prototype, "type", {
get: function () {
return ConditionTypeValues.Idle;
},
enumerable: false,
configurable: true
});
EditConditionIdle.prototype.toCondition = function (_editSet, _set) {
get type() {
return ConditionTypeValues.Idle;
}
toCondition(_editSet, _set) {
return safeAssign(new ConditionIdle(), {
repeatPeriodMs: Math.round(this.period * 1000),
});
};
EditConditionIdle.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionIdle(this.period);
};
__decorate([
widget("slider"),
range(0.5, 30, 0.5),
units("s")
], EditConditionIdle.prototype, "period", void 0);
return EditConditionIdle;
}(EditCondition));
export default EditConditionIdle;
}
}
__decorate([
widget("slider"),
range(0.5, 30, 0.5),
units("s")
], EditConditionIdle.prototype, "period", void 0);

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -26,32 +11,23 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

import { range, units, widget } from "./decorators";
var EditConditionRolling = /** @class */ (function (_super) {
__extends(EditConditionRolling, _super);
function EditConditionRolling(recheckAfter) {
if (recheckAfter === void 0) { recheckAfter = 1; }
var _this = _super.call(this) || this;
_this.recheckAfter = recheckAfter;
return _this;
export default class EditConditionRolling extends EditCondition {
constructor(recheckAfter = 1) {
super();
this.recheckAfter = recheckAfter;
}
Object.defineProperty(EditConditionRolling.prototype, "type", {
get: function () {
return ConditionTypeValues.Rolling;
},
enumerable: false,
configurable: true
});
EditConditionRolling.prototype.toCondition = function (_editSet, _set) {
get type() {
return ConditionTypeValues.Rolling;
}
toCondition(_editSet, _set) {
return safeAssign(new ConditionRolling(), {
repeatPeriodMs: Math.round(this.recheckAfter * 1000),
});
};
EditConditionRolling.prototype.duplicate = function () {
}
duplicate() {
return new EditConditionRolling(this.recheckAfter);
};
__decorate([
widget("slider"),
range(0.5, 5, 0.1),
units("s")
], EditConditionRolling.prototype, "recheckAfter", void 0);
return EditConditionRolling;
}(EditCondition));
export default EditConditionRolling;
}
}
__decorate([
widget("slider"),
range(0.5, 5, 0.1),
units("s")
], EditConditionRolling.prototype, "recheckAfter", void 0);

@@ -1,34 +0,16 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { DataSet } from "@systemic-games/pixels-core-animation";
import EditProfile from "./EditProfile";
import Editable from "./Editable";
var EditDataSet = /** @class */ (function (_super) {
__extends(EditDataSet, _super);
function EditDataSet(options) {
var _this = this;
export default class EditDataSet extends Editable {
constructor(options) {
var _a, _b, _c, _d;
_this = _super.call(this) || this;
_this.patterns = (_a = options === null || options === void 0 ? void 0 : options.patterns) !== null && _a !== void 0 ? _a : [];
_this.rgbPatterns = (_b = options === null || options === void 0 ? void 0 : options.rgbPatterns) !== null && _b !== void 0 ? _b : [];
_this.animations = (_c = options === null || options === void 0 ? void 0 : options.animations) !== null && _c !== void 0 ? _c : [];
_this.profile = (_d = options === null || options === void 0 ? void 0 : options.profile) !== null && _d !== void 0 ? _d : new EditProfile();
return _this;
super();
this.patterns = (_a = options === null || options === void 0 ? void 0 : options.patterns) !== null && _a !== void 0 ? _a : [];
this.rgbPatterns = (_b = options === null || options === void 0 ? void 0 : options.rgbPatterns) !== null && _b !== void 0 ? _b : [];
this.animations = (_c = options === null || options === void 0 ? void 0 : options.animations) !== null && _c !== void 0 ? _c : [];
this.profile = (_d = options === null || options === void 0 ? void 0 : options.profile) !== null && _d !== void 0 ? _d : new EditProfile();
}
EditDataSet.prototype.getPatternTrackOffset = function (pattern) {
var ret = 0;
for (var i = 0; i < this.patterns.length; ++i) {
getPatternTrackOffset(pattern) {
let ret = 0;
for (let i = 0; i < this.patterns.length; ++i) {
if (this.patterns[i] === pattern) {

@@ -42,7 +24,7 @@ return ret;

return -1;
};
EditDataSet.prototype.getPatternRGBTrackOffset = function (pattern) {
var ret = 0;
}
getPatternRGBTrackOffset(pattern) {
let ret = 0;
if (pattern) {
for (var i = 0; i < this.rgbPatterns.length; ++i) {
for (let i = 0; i < this.rgbPatterns.length; ++i) {
if (this.rgbPatterns[i] === pattern) {

@@ -57,25 +39,22 @@ return ret;

return -1;
};
EditDataSet.prototype.toDataSet = function () {
var _this = this;
var set = new DataSet();
}
toDataSet() {
const set = new DataSet();
// Add patterns
this.patterns.forEach(function (editPattern) {
var _a;
this.patterns.forEach((editPattern) => {
if (editPattern) {
var tracks = editPattern.toTracks(_this, set.animationBits);
(_a = set.animationBits.tracks).push.apply(_a, tracks);
const tracks = editPattern.toTracks(this, set.animationBits);
set.animationBits.tracks.push(...tracks);
}
});
this.rgbPatterns.forEach(function (editPattern) {
var _a;
this.rgbPatterns.forEach((editPattern) => {
if (editPattern) {
var tracks = editPattern.toRgbTracks(_this, set.animationBits);
(_a = set.animationBits.rgbTracks).push.apply(_a, tracks);
const tracks = editPattern.toRgbTracks(this, set.animationBits);
set.animationBits.rgbTracks.push(...tracks);
}
});
// Add animations
this.animations.forEach(function (editAnim) {
this.animations.forEach((editAnim) => {
if (editAnim) {
var anim = editAnim.toAnimation(_this, set.animationBits);
const anim = editAnim.toAnimation(this, set.animationBits);
set.animations.push(anim);

@@ -87,5 +66,3 @@ }

return set;
};
return EditDataSet;
}(Editable));
export default EditDataSet;
}
}

@@ -1,45 +0,22 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { Track, RgbTrack, } from "@systemic-games/pixels-core-animation";
import { safeAssign } from "@systemic-games/pixels-core-utils";
import Editable from "./Editable";
var EditPattern = /** @class */ (function (_super) {
__extends(EditPattern, _super);
function EditPattern(name, gradients) {
if (name === void 0) { name = "Empty LED Pattern"; }
if (gradients === void 0) { gradients = []; }
var _this = _super.call(this) || this;
_this.name = name;
_this.gradients = gradients;
return _this;
export default class EditPattern extends Editable {
constructor(name = "Empty LED Pattern", gradients = []) {
super();
this.name = name;
this.gradients = gradients;
}
Object.defineProperty(EditPattern.prototype, "duration", {
get: function () {
return this.gradients.length
? Math.max.apply(Math, this.gradients.map(function (g) { return g.duration; })) : 1;
},
enumerable: false,
configurable: true
});
EditPattern.prototype.toRgbTracks = function (editSet, bits) {
return this.gradients.map(function (gradient, i) {
var _a;
get duration() {
return this.gradients.length
? Math.max(...this.gradients.map((g) => g.duration))
: 1;
}
toRgbTracks(editSet, bits) {
return this.gradients.map((gradient, i) => {
// Add the keyframes
var keyframesOffset = bits.rgbKeyframes.length;
(_a = bits.rgbKeyframes).push.apply(_a, gradient.keyframes.map(function (kf) { return kf.toRgbKeyframe(editSet, bits); }));
const keyframesOffset = bits.rgbKeyframes.length;
bits.rgbKeyframes.push(...gradient.keyframes.map((kf) => kf.toRgbKeyframe(editSet, bits)));
return safeAssign(new RgbTrack(), {
keyframesOffset: keyframesOffset,
keyframesOffset,
keyFrameCount: gradient.keyframes.length,

@@ -49,11 +26,10 @@ ledMask: 1 << i,

});
};
EditPattern.prototype.toTracks = function (editSet, bits) {
return this.gradients.map(function (gradient, i) {
var _a;
}
toTracks(editSet, bits) {
return this.gradients.map((gradient, i) => {
// Add the keyframes
var keyframesOffset = bits.keyframes.length;
(_a = bits.keyframes).push.apply(_a, gradient.keyframes.map(function (kf) { return kf.toKeyframe(editSet, bits); }));
const keyframesOffset = bits.keyframes.length;
bits.keyframes.push(...gradient.keyframes.map((kf) => kf.toKeyframe(editSet, bits)));
return safeAssign(new Track(), {
keyframesOffset: keyframesOffset,
keyframesOffset,
keyFrameCount: gradient.keyframes.length,

@@ -63,5 +39,3 @@ ledMask: 1 << i,

});
};
return EditPattern;
}(Editable));
export default EditPattern;
}
}

@@ -1,51 +0,29 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { Profile } from "@systemic-games/pixels-core-animation";
import { safeAssign } from "@systemic-games/pixels-core-utils";
import Editable from "./Editable";
var EditProfile = /** @class */ (function (_super) {
__extends(EditProfile, _super);
function EditProfile(name, description, rules) {
if (name === void 0) { name = "Profile"; }
if (description === void 0) { description = ""; }
if (rules === void 0) { rules = []; }
var _this = _super.call(this) || this;
_this.name = name;
_this.description = description;
_this.rules = rules;
return _this;
export default class EditProfile extends Editable {
constructor(name = "Profile", description = "", rules = []) {
super();
this.name = name;
this.description = description;
this.rules = rules;
}
EditProfile.prototype.toProfile = function (editSet, set) {
toProfile(editSet, set) {
// Add our rules to the set
var rulesOffset = set.rules.length;
this.rules.forEach(function (editRule) {
return set.rules.push(editRule.toRule(editSet, set));
});
var rulesCount = this.rules.length;
const rulesOffset = set.rules.length;
this.rules.forEach((editRule) => set.rules.push(editRule.toRule(editSet, set)));
const rulesCount = this.rules.length;
return safeAssign(new Profile(), {
rulesOffset: rulesOffset,
rulesCount: rulesCount,
rulesOffset,
rulesCount,
});
};
EditProfile.prototype.duplicate = function () {
return new EditProfile(this.name, this.description, this.rules.map(function (r) { return r.duplicate(); }));
};
EditProfile.prototype.collectAnimations = function () {
var animations = [];
this.rules.forEach(function (r) {
r.actions.forEach(function (action) {
action.collectAnimations().forEach(function (anim) {
}
duplicate() {
return new EditProfile(this.name, this.description, this.rules.map((r) => r.duplicate()));
}
collectAnimations() {
const animations = [];
this.rules.forEach((r) => {
r.actions.forEach((action) => {
action.collectAnimations().forEach((anim) => {
if (!animations.includes(anim)) {

@@ -58,5 +36,3 @@ animations.push(anim);

return animations;
};
return EditProfile;
}(Editable));
export default EditProfile;
}
}

@@ -1,61 +0,28 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import EditRgbKeyframe from "./EditRgbKeyframe";
import Editable from "./Editable";
var EditRgbGradient = /** @class */ (function (_super) {
__extends(EditRgbGradient, _super);
function EditRgbGradient(keyframes) {
if (keyframes === void 0) { keyframes = []; }
var _this = _super.call(this) || this;
_this.keyframes = keyframes;
return _this;
export default class EditRgbGradient extends Editable {
constructor(keyframes = []) {
super();
this.keyframes = keyframes;
}
Object.defineProperty(EditRgbGradient.prototype, "empty", {
get: function () {
return !this.keyframes.length;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbGradient.prototype, "duration", {
get: function () {
return this.keyframes.length
? Math.max.apply(Math, this.keyframes.map(function (k) { return k.time; })) : 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbGradient.prototype, "firstTime", {
get: function () {
return this.keyframes.length ? this.keyframes[0].time : 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbGradient.prototype, "lastTime", {
get: function () {
return this.keyframes.length
? this.keyframes[this.keyframes.length - 1].time
: 0;
},
enumerable: false,
configurable: true
});
EditRgbGradient.prototype.duplicate = function () {
var track = new EditRgbGradient();
get empty() {
return !this.keyframes.length;
}
get duration() {
return this.keyframes.length
? Math.max(...this.keyframes.map((k) => k.time))
: 0;
}
get firstTime() {
return this.keyframes.length ? this.keyframes[0].time : 0;
}
get lastTime() {
return this.keyframes.length
? this.keyframes[this.keyframes.length - 1].time
: 0;
}
duplicate() {
const track = new EditRgbGradient();
if (this.keyframes != null) {
this.keyframes.forEach(function (keyframe) {
this.keyframes.forEach((keyframe) => {
track.keyframes.push(keyframe.duplicate());

@@ -65,7 +32,7 @@ });

return track;
};
EditRgbGradient.createFromKeyFrames = function (keyframes) {
var rgbKeyframes = keyframes
.sort(function (kf1, kf2) { return kf1.time - kf2.time; })
.map(function (kf) { return new EditRgbKeyframe(kf.time, kf.color); });
}
static createFromKeyFrames(keyframes) {
const rgbKeyframes = keyframes
.sort((kf1, kf2) => kf1.time - kf2.time)
.map((kf) => new EditRgbKeyframe(kf.time, kf.color));
if (!rgbKeyframes.length || rgbKeyframes[0].time > 0) {

@@ -78,5 +45,3 @@ rgbKeyframes.splice(0, 0, new EditRgbKeyframe(0));

return new EditRgbGradient(rgbKeyframes);
};
return EditRgbGradient;
}(Editable));
export default EditRgbGradient;
}
}

@@ -1,47 +0,26 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { Color, SimpleKeyframe, RgbKeyframe, } from "@systemic-games/pixels-core-animation";
import EditColor from "./EditColor";
import Editable from "./Editable";
var EditRgbKeyframe = /** @class */ (function (_super) {
__extends(EditRgbKeyframe, _super);
function EditRgbKeyframe(time, color) {
if (time === void 0) { time = 0; }
if (color === void 0) { color = Color.black; }
var _this = _super.call(this) || this;
_this.time = time;
_this.color = color;
return _this;
export default class EditRgbKeyframe extends Editable {
constructor(time = 0, color = Color.black) {
super();
this.time = time;
this.color = color;
}
EditRgbKeyframe.prototype.toRgbKeyframe = function (_editSet, bits) {
var kf = new RgbKeyframe();
toRgbKeyframe(_editSet, bits) {
const kf = new RgbKeyframe();
// Add the color to the palette if not already there, otherwise grab the color index
var colorIndex = EditColor.toColorIndex(bits.palette, this.color);
const colorIndex = EditColor.toColorIndex(bits.palette, this.color);
kf.setTimeAndColorIndex(this.time, colorIndex);
return kf;
};
EditRgbKeyframe.prototype.toKeyframe = function (_editSet, _bits) {
var kf = new SimpleKeyframe();
}
toKeyframe(_editSet, _bits) {
const kf = new SimpleKeyframe();
// Get the intensity from the color and scale
kf.setTimeAndIntensity(this.time, this.color.desaturate() * 255);
return kf;
};
EditRgbKeyframe.prototype.duplicate = function () {
}
duplicate() {
return new EditRgbKeyframe(this.time, this.color.duplicate());
};
return EditRgbKeyframe;
}(Editable));
export default EditRgbKeyframe;
}
}

@@ -1,16 +0,1 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { RgbTrack } from "@systemic-games/pixels-core-animation";

@@ -20,53 +5,30 @@ import { safeAssign } from "@systemic-games/pixels-core-utils";

import Editable from "./Editable";
var EditRgbTrack = /** @class */ (function (_super) {
__extends(EditRgbTrack, _super);
function EditRgbTrack(gradient) {
if (gradient === void 0) { gradient = new EditRgbGradient(); }
var _this = _super.call(this) || this;
_this.ledIndices = [];
_this.gradient = gradient;
return _this;
export default class EditRgbTrack extends Editable {
constructor(gradient = new EditRgbGradient()) {
super();
this.ledIndices = [];
this.gradient = gradient;
}
Object.defineProperty(EditRgbTrack.prototype, "empty", {
get: function () {
return this.gradient.empty;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbTrack.prototype, "duration", {
get: function () {
return this.gradient.duration;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbTrack.prototype, "firstTime", {
get: function () {
return this.gradient.firstTime;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EditRgbTrack.prototype, "lastTime", {
get: function () {
return this.gradient.lastTime;
},
enumerable: false,
configurable: true
});
EditRgbTrack.prototype.toTrack = function (editSet, bits) {
get empty() {
return this.gradient.empty;
}
get duration() {
return this.gradient.duration;
}
get firstTime() {
return this.gradient.firstTime;
}
get lastTime() {
return this.gradient.lastTime;
}
toTrack(editSet, bits) {
// Add the keyframes
var keyframesOffset = bits.rgbKeyframes.length;
this.gradient.keyframes.forEach(function (editKeyframe) {
return bits.rgbKeyframes.push(editKeyframe.toRgbKeyframe(editSet, bits));
});
const keyframesOffset = bits.rgbKeyframes.length;
this.gradient.keyframes.forEach((editKeyframe) => bits.rgbKeyframes.push(editKeyframe.toRgbKeyframe(editSet, bits)));
return safeAssign(new RgbTrack(), {
keyframesOffset: keyframesOffset,
keyframesOffset,
keyFrameCount: this.gradient.keyframes.length,
ledMask: this.ledIndices.reduce(function (acc, index) { return acc | (1 << index); }, 0),
ledMask: this.ledIndices.reduce((acc, index) => acc | (1 << index), 0),
});
};
return EditRgbTrack;
}(Editable));
export default EditRgbTrack;
}
}

@@ -1,31 +0,13 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { Rule } from "@systemic-games/pixels-core-animation";
import { safeAssign } from "@systemic-games/pixels-core-utils";
import Editable from "./Editable";
var EditRule = /** @class */ (function (_super) {
__extends(EditRule, _super);
function EditRule(condition, actions) {
if (actions === void 0) { actions = []; }
var _this = _super.call(this) || this;
_this.condition = condition;
_this.actions = actions;
return _this;
export default class EditRule extends Editable {
constructor(condition, actions = []) {
super();
this.condition = condition;
this.actions = actions;
}
EditRule.prototype.toRule = function (editSet, set) {
toRule(editSet, set) {
// Create our condition
var conditionIndex = set.conditions.length;
const conditionIndex = set.conditions.length;
if (this.condition) {

@@ -35,5 +17,5 @@ set.conditions.push(this.condition.toCondition(editSet, set));

// Create our action
var actionOffset = set.actions.length;
this.actions.forEach(function (editAction) {
var act = editAction.toAction(editSet, set);
const actionOffset = set.actions.length;
this.actions.forEach((editAction) => {
const act = editAction.toAction(editSet, set);
set.actions.push(act);

@@ -43,20 +25,18 @@ });

condition: conditionIndex,
actionOffset: actionOffset,
actionOffset,
actionCount: this.actions.length,
});
};
EditRule.prototype.duplicate = function () {
}
duplicate() {
var _a;
return new EditRule((_a = this.condition) === null || _a === void 0 ? void 0 : _a.duplicate(), this.actions.map(function (action) { return action.duplicate(); }));
};
EditRule.prototype.replaceAnimation = function (oldAnimation, newAnimation) {
this.actions.forEach(function (action) {
return new EditRule((_a = this.condition) === null || _a === void 0 ? void 0 : _a.duplicate(), this.actions.map((action) => action.duplicate()));
}
replaceAnimation(oldAnimation, newAnimation) {
this.actions.forEach((action) => {
action.replaceAnimation(oldAnimation, newAnimation);
});
};
EditRule.prototype.requiresAnimation = function (animation) {
return !!this.actions.find(function (a) { return a.requiresAnimation(animation); });
};
return EditRule;
}(Editable));
export default EditRule;
}
requiresAnimation(animation) {
return !!this.actions.find((a) => a.requiresAnimation(animation));
}
}

@@ -0,3 +1,3 @@

import AppDataSet from "./AppDataSet";
import { ColorTypeValues } from "./edit/ColorType";
import Editable from "./edit/Editable";
import EditAction from "./edit/EditAction";

@@ -31,8 +31,8 @@ import EditActionPlayAnimation from "./edit/EditActionPlayAnimation";

import EditRule from "./edit/EditRule";
import Editable from "./edit/Editable";
import { name, getPropsWithName, range, getPropsWithRange, units, getPropsWithUnits, widget, getPropsWithWidget, displayOrder, getPropsWithDisplayOrder, skipEnum, getPropsWithSkipEnum, } from "./edit/decorators";
import loadAppDataSet from "./loadAppDataSet";
export { ColorTypeValues, Editable, EditAction, EditActionPlayAnimation, EditActionPlayAudioClip, EditAnimation, EditAnimationGradient, EditAnimationGradientPattern, EditAnimationKeyframed, EditAnimationNoise, EditAnimationRainbow, EditAnimationSimple, EditAudioClip, EditColor, EditCondition, EditConditionBatteryState, EditConditionConnectionState, EditConditionCrooked, EditConditionFaceCompare, EditConditionHandling, EditConditionHelloGoodbye, EditConditionIdle, EditConditionRolling, EditDataSet, EditPattern, EditProfile, EditRgbGradient, EditRgbKeyframe, EditRgbTrack, EditRule, };
import { name, getPropsWithName, range, getPropsWithRange, units, getPropsWithUnits, widget, getPropsWithWidget, displayOrder, getPropsWithDisplayOrder, skipEnum, getPropsWithSkipEnum, } from "./edit/decorators";
export { name, getPropsWithName, range, getPropsWithRange, units, getPropsWithUnits, widget, getPropsWithWidget, displayOrder, getPropsWithDisplayOrder, skipEnum, getPropsWithSkipEnum, };
import AppDataSet from "./AppDataSet";
export { AppDataSet };
import loadAppDataSet from "./loadAppDataSet";
export { loadAppDataSet, };
import { AnimationTypeValues, ActionTypeValues, ConditionTypeValues, Color, } from "@systemic-games/pixels-core-animation";
import { safeAssign } from "@systemic-games/pixels-core-utils";
import AppDataSet from "./AppDataSet";

@@ -26,3 +27,2 @@ import { ColorTypeValues } from "./edit/ColorType";

import EditRule from "./edit/EditRule";
import { safeAssign } from "@systemic-games/pixels-core-utils";
function toRgbColor(color) {

@@ -34,10 +34,10 @@ var _a, _b, _c;

var _a;
return ((_a = keyframes === null || keyframes === void 0 ? void 0 : keyframes.map(function (k) { return new EditRgbKeyframe(k.time, toRgbColor(k.color)); })) !== null && _a !== void 0 ? _a : []);
return ((_a = keyframes === null || keyframes === void 0 ? void 0 : keyframes.map((k) => new EditRgbKeyframe(k.time, toRgbColor(k.color)))) !== null && _a !== void 0 ? _a : []);
}
function toGradients(gradients) {
var _a;
return ((_a = gradients === null || gradients === void 0 ? void 0 : gradients.map(function (g) { return new EditRgbGradient(toKeyframes(g.keyframes)); })) !== null && _a !== void 0 ? _a : []);
return ((_a = gradients === null || gradients === void 0 ? void 0 : gradients.map((g) => new EditRgbGradient(toKeyframes(g.keyframes)))) !== null && _a !== void 0 ? _a : []);
}
function toColor(color) {
var c = new EditColor();
const c = new EditColor();
if (color) {

@@ -51,3 +51,3 @@ switch (color.type) {

default:
throw Error("Unsupported color type ".concat(color.type));
throw Error(`Unsupported color type ${color.type}`);
}

@@ -60,11 +60,11 @@ c.color = toRgbColor(color === null || color === void 0 ? void 0 : color.rgbColor);

var _a;
return ((_a = patterns === null || patterns === void 0 ? void 0 : patterns.map(function (p) { return new EditPattern(p.name, toGradients(p.gradients)); })) !== null && _a !== void 0 ? _a : []);
return ((_a = patterns === null || patterns === void 0 ? void 0 : patterns.map((p) => new EditPattern(p.name, toGradients(p.gradients)))) !== null && _a !== void 0 ? _a : []);
}
function toAudioClips(audioClips) {
var _a;
return (_a = audioClips === null || audioClips === void 0 ? void 0 : audioClips.map(function (ac) { return safeAssign(new EditAudioClip(), ac); })) !== null && _a !== void 0 ? _a : [];
return (_a = audioClips === null || audioClips === void 0 ? void 0 : audioClips.map((ac) => safeAssign(new EditAudioClip(), ac))) !== null && _a !== void 0 ? _a : [];
}
function toCondition(condition) {
if (condition === null || condition === void 0 ? void 0 : condition.data) {
var data = condition.data;
const data = condition.data;
//TODO make those creations and assignments in a more generic way

@@ -90,3 +90,3 @@ //TODO check flags value

default:
throw Error("Unsupported condition type ".concat(condition.type));
throw Error(`Unsupported condition type ${condition.type}`);
}

@@ -97,6 +97,6 @@ }

var _a;
var actionsWithData = actions === null || actions === void 0 ? void 0 : actions.filter(function (act) { return !!act.data; });
return ((_a = actionsWithData === null || actionsWithData === void 0 ? void 0 : actionsWithData.map(function (act) {
const actionsWithData = actions === null || actions === void 0 ? void 0 : actions.filter((act) => !!act.data);
return ((_a = actionsWithData === null || actionsWithData === void 0 ? void 0 : actionsWithData.map((act) => {
var _a, _b;
var data = act.data;
const data = act.data;
//TODO make those creations and assignments in a more generic way

@@ -115,3 +115,3 @@ switch (act.type) {

default:
throw Error("Unsupported action type ".concat(act.type));
throw Error(`Unsupported action type ${act.type}`);
}

@@ -122,7 +122,6 @@ })) !== null && _a !== void 0 ? _a : []);

var _a;
return ((_a = rules === null || rules === void 0 ? void 0 : rules.map(function (r) {
var _a;
var rule = new EditRule();
return ((_a = rules === null || rules === void 0 ? void 0 : rules.map((r) => {
const rule = new EditRule();
rule.condition = toCondition(r.condition);
(_a = rule.actions).push.apply(_a, toActions(animations, audioClips, r.actions));
rule.actions.push(...toActions(animations, audioClips, r.actions));
return rule;

@@ -137,8 +136,8 @@ })) !== null && _a !== void 0 ? _a : []);

var _a, _b, _c, _d;
var patterns = toPatterns(jsonData.patterns);
var audioClips = toAudioClips(jsonData.audioClips);
var animationsWithData = (_a = jsonData === null || jsonData === void 0 ? void 0 : jsonData.animations) === null || _a === void 0 ? void 0 : _a.filter(function (anim) { return !!anim.data; });
var animations = (_b = animationsWithData === null || animationsWithData === void 0 ? void 0 : animationsWithData.map(function (anim) {
const patterns = toPatterns(jsonData.patterns);
const audioClips = toAudioClips(jsonData.audioClips);
const animationsWithData = (_a = jsonData === null || jsonData === void 0 ? void 0 : jsonData.animations) === null || _a === void 0 ? void 0 : _a.filter((anim) => !!anim.data);
const animations = (_b = animationsWithData === null || animationsWithData === void 0 ? void 0 : animationsWithData.map((anim) => {
var _a, _b, _c, _d;
var data = anim.data;
const data = anim.data;
switch (anim.type) {

@@ -187,12 +186,10 @@ //TODO make those creations and assignments in a more generic way

default:
throw Error("Unsupported animation type ".concat(anim.type));
throw Error(`Unsupported animation type ${anim.type}`);
}
})) !== null && _b !== void 0 ? _b : [];
var toMyProfile = function (profile) {
return toProfile(animations, audioClips, profile);
};
const toMyProfile = (profile) => toProfile(animations, audioClips, profile);
return new AppDataSet({
patterns: patterns,
animations: animations,
audioClips: audioClips,
patterns,
animations,
audioClips,
profiles: (_d = (_c = jsonData === null || jsonData === void 0 ? void 0 : jsonData.behaviors) === null || _c === void 0 ? void 0 : _c.map(toMyProfile)) !== null && _d !== void 0 ? _d : [],

@@ -199,0 +196,0 @@ defaultProfile: (jsonData === null || jsonData === void 0 ? void 0 : jsonData.defaultBehavior)

@@ -0,0 +0,0 @@ import EditAnimation from "./edit/EditAnimation";

@@ -0,1 +1,4 @@

/**
* @enum
*/
export declare const ColorTypeValues: {

@@ -2,0 +5,0 @@ readonly Rgb: number;

@@ -0,0 +0,0 @@ export interface PropertyData {

export default abstract class Editable {
}
//# sourceMappingURL=Editable.d.ts.map

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Action } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Action } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Action } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationType, AnimationBits, AnimationPreset } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationType, AnimationBits, AnimationPreset } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationType, AnimationBits, AnimationPreset } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationType, AnimationBits, AnimationPreset } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationType, AnimationBits, AnimationPreset } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationType, AnimationBits, AnimationPreset } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationType, AnimationBits, AnimationPreset, Color } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import Editable from "./Editable";

@@ -0,0 +0,0 @@ import { Color } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Condition } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Condition, BatteryStateFlags } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Condition, ConnectionStateFlags } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Condition } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Condition, FaceCompareFlags } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Condition } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Condition, HelloGoodbyeFlags } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Condition } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, ActionType, Condition } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationBits, Track, RgbTrack } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, Profile } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { Color } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationBits, Color, SimpleKeyframe, RgbKeyframe } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { AnimationBits, RgbTrack } from "@systemic-games/pixels-core-animation";

@@ -0,0 +0,0 @@ import { DataSet, Rule } from "@systemic-games/pixels-core-animation";

@@ -0,3 +1,3 @@

import AppDataSet from "./AppDataSet";
import { ColorTypeValues, type ColorType } from "./edit/ColorType";
import Editable from "./edit/Editable";
import EditAction from "./edit/EditAction";

@@ -31,9 +31,9 @@ import EditActionPlayAnimation from "./edit/EditActionPlayAnimation";

import EditRule from "./edit/EditRule";
import Editable from "./edit/Editable";
import { PropertyData, NameProperty, name, getPropsWithName, RangeProperty, range, getPropsWithRange, type UnitsType, UnitsProperty, units, getPropsWithUnits, type WidgetType, WidgetProperty, widget, getPropsWithWidget, DisplayOrderProperty, displayOrder, getPropsWithDisplayOrder, skipEnum, getPropsWithSkipEnum } from "./edit/decorators";
import loadAppDataSet, { JsonRgbColor, JsonKeyframe, JsonGradient, JsonPattern, JsonAudioClip, JsonPreviewSettings, JsonColor, JsonAnimationData, JsonAnimation, JsonConditionData, JsonCondition, JsonActionData, JsonAction, JsonRule, JsonProfile, JsonDataSet } from "./loadAppDataSet";
export { ColorTypeValues, type ColorType, Editable, EditAction, EditActionPlayAnimation, EditActionPlayAudioClip, EditAnimation, EditAnimationGradient, EditAnimationGradientPattern, EditAnimationKeyframed, EditAnimationNoise, EditAnimationRainbow, EditAnimationSimple, EditAudioClip, EditColor, EditCondition, EditConditionBatteryState, EditConditionConnectionState, EditConditionCrooked, EditConditionFaceCompare, EditConditionHandling, EditConditionHelloGoodbye, EditConditionIdle, EditConditionRolling, EditDataSet, EditPattern, EditProfile, EditRgbGradient, EditRgbKeyframe, EditRgbTrack, EditRule, };
import { PropertyData, NameProperty, name, getPropsWithName, RangeProperty, range, getPropsWithRange, type UnitsType, UnitsProperty, units, getPropsWithUnits, type WidgetType, WidgetProperty, widget, getPropsWithWidget, DisplayOrderProperty, displayOrder, getPropsWithDisplayOrder, skipEnum, getPropsWithSkipEnum } from "./edit/decorators";
export { PropertyData, NameProperty, name, getPropsWithName, RangeProperty, range, getPropsWithRange, type UnitsType, UnitsProperty, units, getPropsWithUnits, type WidgetType, WidgetProperty, widget, getPropsWithWidget, DisplayOrderProperty, displayOrder, getPropsWithDisplayOrder, skipEnum, getPropsWithSkipEnum, };
import AppDataSet from "./AppDataSet";
export { AppDataSet };
import loadAppDataSet, { JsonRgbColor, JsonKeyframe, JsonGradient, JsonPattern, JsonAudioClip, JsonPreviewSettings, JsonColor, JsonAnimationData, JsonAnimation, JsonConditionData, JsonCondition, JsonActionData, JsonAction, JsonRule, JsonProfile, JsonDataSet } from "./loadAppDataSet";
export { loadAppDataSet, JsonRgbColor, JsonKeyframe, JsonGradient, JsonPattern, JsonAudioClip, JsonPreviewSettings, JsonColor, JsonAnimationData, JsonAnimation, JsonConditionData, JsonCondition, JsonActionData, JsonAction, JsonRule, JsonProfile, JsonDataSet, };
//# sourceMappingURL=index.d.ts.map

@@ -0,0 +0,0 @@ import AppDataSet from "./AppDataSet";

{
"name": "@systemic-games/pixels-edit-animation",
"version": "0.1.1",
"version": "1.0.0",
"description": "",

@@ -9,7 +9,7 @@ "main": "dist/cjs/index.js",

"types": "dist/types/index.d.js",
"files": [
"dist"
],
"scripts": {
"_postinstall": "husky install",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable",
"build": "npm run build:cjs && npm run build:esm && npm run build:umd && npm run build:types",
"build": "yarn build:cjs && yarn build:esm && yarn build:umd && yarn build:types",
"build:cjs": "node tools/cleanup cjs && tsc -p config/tsconfig.cjs.json",

@@ -20,3 +20,3 @@ "build:esm": "node tools/cleanup esm && tsc -p config/tsconfig.esm.json",

"clean": "node tools/cleanup",
"package": "npm run build && npm pack",
"package": "yarn build && yarn pack",
"typescript": "tsc --noEmit",

@@ -28,7 +28,5 @@ "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --cache",

"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"files": [
"dist"
],
"keywords": [

@@ -45,35 +43,27 @@ "pixel",

],
"author": "Systemic Games (https://gamewithpixels.com)",
"license": "MIT",
"homepage": "https://github.com/GameWithPixels/TsPixelsEditAnimation",
"repository": {
"type": "git",
"url": "git@github.com:GameWithPixels/TsPixelsEditAnimation.git"
"url": "git@github.com:GameWithPixels/pixels-js.git"
},
"author": "Systemic Games (https://gamewithpixels.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/GameWithPixels/TsPixelsEditAnimation/issues"
"url": "https://github.com/GameWithPixels/pixels-js/issues"
},
"homepage": "https://github.com/GameWithPixels/pixels-js#readme",
"dependencies": {
"@systemic-games/pixels-core-animation": "^0.4.1",
"@systemic-games/pixels-core-utils": "^0.5.0"
"@systemic-games/pixels-core-animation": "1.0.0",
"@systemic-games/pixels-core-utils": "1.0.1"
},
"devDependencies": {
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@types/jest": "^29.0.3",
"@typescript-eslint/eslint-plugin": "^ 5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"eslint": "^8.17.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"jest": "^29.0.3",
"pinst": "^3.0.0",
"prettier": "^2.7.1",
"ts-jest": "^29.0.0",
"@types/jest": "^29.1.2",
"jest": "^29.1.2",
"ts-jest": "^29.0.3",
"ts-loader": "^9.4.1",
"typescript": "^4.8.3",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
},
"typedoc": {
"entryPoint": "./src/index.ts"
}
}

@@ -6,2 +6,10 @@ # Pixels Edit Animation (Typescript)

## Module documentation
See the module's export documentation [here](
https://gamewithpixels.github.io/pixels-js/modules/_systemic_games_pixels_edit_animation.html
).
Documentation is generated with [TypeDoc](https://typedoc.org/).
## License

@@ -8,0 +16,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc