This commit is contained in:
heyshawtyy committed 2026-11-09 22:37:44 +05:00
1 parent fd5e92d0f5
commit 9f898c04dd
415 files changed
+6241617 -633464

No files matched your search

+3 -1
View File
@@ -8,7 +8,7 @@ const PX = 16;
const r3 = v => Math.round(v * 1000) / 1000;
class Model {
constructor(name) { this.name = name; this.colors = []; this.colorIdx = {}; this.groups = []; this.cubes = []; this.cur = null; }
constructor(name) { Model.all.push(this); this.name = name; this.colors = []; this.colorIdx = {}; this.groups = []; this.cubes = []; this.cur = null; }
color(key, rgb) { if (!(key in this.colorIdx)) { this.colorIdx[key] = this.colors.length; this.colors.push(rgb); } return key; }
group(name, parent = null) { if (!this.groups.find(g => g.name === name)) this.groups.push({ name, parent, uuid: crypto.randomUUID() }); this.cur = name; return name; }
// box(имя, цвет, [x0,y0,z0], [x1,y1,z1], {rot:[x,y,z], pivot:[x,y,z]}) в студах
@@ -108,6 +108,8 @@ class Model {
}
}
Model.all = []; // все модели, созданные в этом процессе (для рендера)
// ---------- общие детали ----------
const AX = { x: 0, y: 1, z: 2 };
// Рыба-силуэт: ось длины a (голова в сторону dir), ширина w, толщина t. L — длина в студах.