diff --git a/rbxl-importer/src/__pycache__/converter.cpython-314.pyc b/rbxl-importer/src/__pycache__/converter.cpython-314.pyc index 447629e..6a97014 100644 Binary files a/rbxl-importer/src/__pycache__/converter.cpython-314.pyc and b/rbxl-importer/src/__pycache__/converter.cpython-314.pyc differ diff --git a/rbxl-importer/src/converter.py b/rbxl-importer/src/converter.py index dd054c7..7509a40 100644 --- a/rbxl-importer/src/converter.py +++ b/rbxl-importer/src/converter.py @@ -397,7 +397,9 @@ class Converter: 'canCollide': bool(props.get('CanCollide', True)), 'visible': props.get('Transparency', 0) < 1.0 if isinstance(props.get('Transparency'), (int, float)) else True, 'opacity': max(0.0, 1.0 - (props.get('Transparency', 0) or 0)), - 'anchored': bool(props.get('Anchored', False)), + # FORCE-ANCHORED — Welds импортируем как заглушки, без них + # физика 700+ unanchored Part'ов = карта рассыпается. + 'anchored': True, 'mass': 1.0, 'rotationX': rot['rx'], 'rotationY': rot['ry'], 'rotationZ': rot['rz'], } @@ -428,7 +430,9 @@ class Converter: 'material': material_to_string(props.get('Material')), 'canCollide': bool(props.get('CanCollide', True)), 'visible': True, - 'anchored': bool(props.get('Anchored', False)), + # FORCE-ANCHORED — Welds импортируем как заглушки, без них + # физика 700+ unanchored Part'ов = карта рассыпается. + 'anchored': True, 'mass': 1.0, 'rotationX': rot['rx'], 'rotationY': rot['ry'], 'rotationZ': rot['rz'], }) @@ -457,7 +461,9 @@ class Converter: 'material': material_to_string(props.get('Material')), 'canCollide': bool(props.get('CanCollide', True)), 'visible': True, - 'anchored': bool(props.get('Anchored', False)), + # FORCE-ANCHORED — Welds импортируем как заглушки, без них + # физика 700+ unanchored Part'ов = карта рассыпается. + 'anchored': True, 'mass': 1.0, 'rotationX': rot['rx'], 'rotationY': rot['ry'], 'rotationZ': rot['rz'], }) @@ -529,7 +535,9 @@ class Converter: 'material': material_to_string(props.get('Material')), 'canCollide': bool(props.get('CanCollide', True)), 'visible': True, - 'anchored': bool(props.get('Anchored', False)), + # FORCE-ANCHORED — Welds импортируем как заглушки, без них + # физика 700+ unanchored Part'ов = карта рассыпается. + 'anchored': True, 'mass': 1.0, 'rotationX': rot['rx'], 'rotationY': rot['ry'], 'rotationZ': rot['rz'], 'note': f'MeshPart (no GLB) rbxid={rbx_id}', @@ -550,7 +558,9 @@ class Converter: 'rotationX': rot['rx'], 'rotationY': rot['ry'], 'rotationZ': rot['rz'], 'color': get_part_color(props), 'canCollide': bool(props.get('CanCollide', True)), - 'anchored': bool(props.get('Anchored', False)), + # FORCE-ANCHORED — Welds импортируем как заглушки, без них + # физика 700+ unanchored Part'ов = карта рассыпается. + 'anchored': True, 'origin': 'roblox-meshpart', 'rbxAssetId': rbx_id, }) @@ -590,7 +600,9 @@ class Converter: 'material': material_to_string(props.get('Material')), 'canCollide': bool(props.get('CanCollide', True)), 'visible': True, - 'anchored': bool(props.get('Anchored', False)), + # FORCE-ANCHORED — Welds импортируем как заглушки, без них + # физика 700+ unanchored Part'ов = карта рассыпается. + 'anchored': True, 'mass': 1.0, 'rotationX': rot['rx'], 'rotationY': rot['ry'], 'rotationZ': rot['rz'], 'note': f'Union (no CSG GLB) rbxid={rbx_id}', @@ -609,7 +621,9 @@ class Converter: 'rotationX': rot['rx'], 'rotationY': rot['ry'], 'rotationZ': rot['rz'], 'color': get_part_color(props), 'canCollide': bool(props.get('CanCollide', True)), - 'anchored': bool(props.get('Anchored', False)), + # FORCE-ANCHORED — Welds импортируем как заглушки, без них + # физика 700+ unanchored Part'ов = карта рассыпается. + 'anchored': True, 'origin': 'roblox-union', 'rbxAssetId': rbx_id, }) diff --git a/src/editor/engine/PrimitiveManager.js b/src/editor/engine/PrimitiveManager.js index 8d7d899..e8b2a08 100644 --- a/src/editor/engine/PrimitiveManager.js +++ b/src/editor/engine/PrimitiveManager.js @@ -507,8 +507,11 @@ export class PrimitiveManager { const matName = `${mesh.name}_mat`; const mat = new StandardMaterial(matName, this.scene); mat.diffuseColor = Color3.FromHexString(color || '#888888'); - // ambient = default (0,0,0). Освещение настраивается через - // глобальную панель «Свет и атмосфера» (sun/hemi/saturation). + // ambient = (1,1,1) — пассивный, реагирует на scene.ambientColor. + // Юзер крутит «Заливку теней» (sceneAmbient) → тени светлеют. + // На прямом свете diffuse доминирует — пересвета нет если + // sceneAmbient в разумных пределах (0..0.5). + mat.ambientColor = new Color3(1, 1, 1); // Если задан textureUrl — подгружаем PNG как diffuseTexture. Это // используется для GD-скинов куба (например /gd/skins/cube_smile.png).