| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- class element {
- #pictures;
- #mesh;
- #name;
- #description;
- #params;
- #thumbnail;
- #shop;
- constructor(name) {
- if (typeof(name) !== "string") {
- throw "Name must be an string.";
- }
-
- this.#name = name;
-
- this.#description = "";
- this.#mesh = "";
- this.#thumbnail = "";
- this.#shop = "";
-
- this.#pictures = new Set();
- this.#params = new Map();
- }
- get name() {
- return this.#name;
- }
- get description() {
- return this.#description;
- }
- set description(content) {
- if (typeof(content) !== "string") {
- throw "Description must be an string.";
- }
- this.#description = content;
- }
- get mesh() {
- return this.#mesh;
- }
- set mesh(content) {
- if (typeof(content) !== "string") {
- throw "Mesh URL must be string.";
- }
- this.#mesh = content;
- }
- get thumbnail() {
- return this.#thumbnail;
- }
-
- set thumbnail(content) {
- if (typeof(content) !== "string") {
- throw "Thumbnail URL must be string.";
- }
- this.#thumbnail = content;
- }
- set shop(content) {
- if (typeof(content) !== "string") {
- throw "Shop link mest be string.";
- }
- this.#shop = content;
- }
- get shop() {
- return this.#shop;
- }
- get params() {
- return this.#params;
- }
- get pictures() {
- return this.#pictures;
- }
- }
- export { element };
|