@robotical/scratch-to-python-transpiler
Version:
Transpile Scratch project files to python code
43 lines (42 loc) • 1.1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var id_1 = require("./util/id");
var Variable = /** @class */ (function () {
function Variable(options) {
this.cloud = false;
this.visible = true;
this.mode = "default";
this.x = 0;
this.y = 0;
this.sliderMin = 0;
this.sliderMax = 100;
this.isDiscrete = true;
Object.assign(this, options);
if (!this.id) {
this.id = id_1.generateId();
}
}
Variable.prototype.setName = function (name) {
this.name = name;
};
return Variable;
}());
exports.Variable = Variable;
var List = /** @class */ (function () {
function List(options) {
this.visible = true;
this.x = 0;
this.y = 0;
this.width = null;
this.height = null;
Object.assign(this, options);
if (!this.id) {
this.id = id_1.generateId();
}
}
List.prototype.setName = function (name) {
this.name = name;
};
return List;
}());
exports.List = List;