Архитектурный шаблон "Мрак в моделях" на нескольких языках и платформах
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- function memoryGap() {
- return memorySide() + memorySpace();
- }
- function memoryGroups(c) {
- var items = {};
- // @ts-ignore
- var ids = utsIndexArray(c.itemsCount);
- ids.forEach(function (i) {
- // @ts-ignore
- items[i] = utsFloor(Number(i) / 2);
- });
- return items;
- }
- function memorySide() {
- return 50;
- }
- function memorySpace() {
- return 20;
- }
- function memoryItemPositions(c) {
- var pos = [];
- // @ts-ignore
- var ids = utsIndexArray(c.itemsCount);
- ids.forEach(function (i) {
- // @ts-ignore
- var row = utsFloor(Number(i) / 4);
- var x = memoryGap() + (Number(i) - row * 4) * memoryGap();
- var y = memoryGap() + row * memoryGap();
- // @ts-ignore
- pos.push(memoryCreatePosition(x, y));
- });
- return pos;
- }
|