fix(g6 builder): центрирую сетку 6×6 плиток на платформе

Было: x:-4+c*2 → плитки на x=[-4,-2,0,2,4,6], правые края до x=6.9.
Платформа grass [-6,5] (центры [-5.5, 5.5]). Плитка x=6 свешивалась.

Стало: x:-5+c*2 → плитки на x=[-5,-3,-1,1,3,5], края [-5.9, 5.9].
Чётко на платформе.

То же по Z.

Плюс лог 'ЯЗЫК СКРИПТОВ: LUA/JS' в GameRuntime — чтобы было видно
сразу что именно запущено.
This commit is contained in:
min 2026-06-09 17:31:17 +03:00
parent 8eec59af53
commit 0603d922d4
2 changed files with 9 additions and 1 deletions

View File

@ -748,7 +748,9 @@ function game6ColorTiles() {
id, id,
type: 'cube', type: 'cube',
name: 'Плитка_' + id, name: 'Плитка_' + id,
x: -4 + c * 2, y: 1.15, z: -4 + r * 2, // Платформа grass: x от -6 до 5 (blocks=1unit, центры [-5.5..5.5]).
// Сетка 6×6 плиток (центры через 2) центрируем на [-5..5].
x: -5 + c * 2, y: 1.15, z: -5 + r * 2,
sx: 1.8, sy: 0.3, sz: 1.8, sx: 1.8, sy: 0.3, sz: 1.8,
color: '#9aa0aa', // серый — не раскрашена color: '#9aa0aa', // серый — не раскрашена
material: 'matte', material: 'matte',

View File

@ -348,6 +348,12 @@ export class GameRuntime {
const rbxlImported = luaUserBatch.filter(s => s._rbxlImported).length; const rbxlImported = luaUserBatch.filter(s => s._rbxlImported).length;
const luaWritten = luaUserCount - rbxlImported; const luaWritten = luaUserCount - rbxlImported;
const jsOnly = this.sandboxes.length - (this._luaUserSandbox ? 1 : 0); const jsOnly = this.sandboxes.length - (this._luaUserSandbox ? 1 : 0);
// Чёткий маркер языка в логах — чтобы было видно что запущено
const lang = (luaWritten > 0 || rbxlImported > 0)
? (jsOnly > 0 ? 'СМЕШАННЫЙ (JS+Lua)' : 'LUA')
: 'JS';
// eslint-disable-next-line no-console
console.warn(`[GameRuntime] === ЯЗЫК СКРИПТОВ: ${lang} === (JS=${jsOnly}, Lua=${luaWritten}, rbxl=${rbxlImported})`);
this._log('info', `Запущено JS-скриптов: ${jsOnly}`); this._log('info', `Запущено JS-скриптов: ${jsOnly}`);
if (rbxlImported > 0) { if (rbxlImported > 0) {
this._log('info', `Запущено Roblox-Lua скриптов (импортированных): ${rbxlImported}`); this._log('info', `Запущено Roblox-Lua скриптов (импортированных): ${rbxlImported}`);