Перейти к содержанию

Module Map

Карта модулей фиксирует архитектурные границы. Это не замена локальным документам в <module>/docs/, а индекс ownership: что где должно находиться и куда переносить код при расползании ответственности.

Связанные документы:

Core Foundations

termin-nanobind-sdk

Source of truth: termin-nanobind-sdk docs

Отвечает за общую nanobind-инфраструктуру Python bindings: runtime preload, build helpers, упаковку native extension modules.

Если build/runtime helper начинает знать про конкретный domain-модуль, это повод держать его рядом с этим модулем, а не в nanobind SDK.

termin-build-tools

Source of truth: termin-build-tools docs

Build-time helpers для Python packages с CMake/nanobind extensions.

termin-base / tcbase

Source of truth: termin-base docs

Базовые типы и инфраструктура, на которую могут опираться остальные модули.

Кандидаты на перенос сюда: малые общие value-типы и utilities без знания graphics/render/scene.

termin-mesh / tmesh

Source of truth: termin-mesh docs

Canonical mesh/data layer. tc_mesh относится к ядру данных движка, а не к legacy-слою.

Код, который адаптирует mesh к конкретному renderer/device, должен жить выше: например в termin-graphics как adapter к tgfx2 или в termin-render, если он зависит от render framework.

Graphics And Rendering

termin-graphics / tgfx

Source of truth: termin-graphics docs

Отвечает за backend-neutral GPU API, tgfx2 context/device/runtime, render targets, texture pools, canvas renderer facade и низкоуровневые GPU utilities.

Ключевая граница сейчас важна из-за миграции renderer facades: generic GPU utilities без знания frame graph относятся сюда, а frame graph/debugger logic остается в termin-render.

termin-render

Source of truth: termin-render docs

Отвечает за render framework поверх canonical resources: render engine, frame graph, presenter/debugger, интеграцию с application-level rendering.

Здесь должны оставаться части, которые знают про frame graph, render passes, engine views и отладочную визуализацию pipeline.

Кандидаты на вынос в termin-graphics:

  • generic fullscreen texture presentation;
  • generic tc_texture / tc_mesh to tgfx2 adapters;
  • общие allocation/cache helpers, не знающие о frame graph.

termin-display

Source of truth: termin-display docs

Отвечает за platform/native windows и display integration. Concrete window implementations, например SDLBackendWindow, живут здесь.

Concrete window implementations, например SDLBackendWindow, живут здесь.

UI And Tools

termin-gui / tcgui

Source of truth: termin-gui docs

Отвечает за retained widget tree, layout, input routing, dialogs, canvas/viewport widgets и Python UI API.

Рендеринг виджетов должен использовать facade из termin-graphics, а не дублировать низкоуровневые GPU primitives.

tcplot

Source of truth: tcplot docs

Plotting library поверх tgfx/tcgui. Должен переиспользовать renderer/runtime abstractions из termin-graphics и host/window infrastructure из termin-display, не заводя собственный низкоуровневый GPU слой.

termin-nodegraph

Source of truth: termin-nodegraph docs

Python node graph UI/tools. Должен зависеть от public UI/graphics APIs, а не от внутренних деталей render backend.

Engine Domains

termin-scene

Source of truth: termin-scene docs

Отвечает за scene/ECS ownership, handles, lifecycle и component storage.

Renderer/UI integration описывается на уровне render/component/application modules.

termin-inspect

Source of truth: termin-inspect docs

Отвечает за kind/type metadata, inspection dispatch, field metadata, Python bridge.

Связанные scene/render/application сценарии используют inspect metadata, но policy остается в соответствующих domain modules.

termin-modules

Source of truth: termin-modules docs

Отвечает за descriptors, lifecycle, callbacks и plugin/module loading contracts.

termin-collision

Source of truth: termin-collision docs

Отвечает за collision world, colliders, algorithms и C/Python API коллизий.

termin-physics

Source of truth: termin-physics docs

Physics layer. Collision primitives должны оставаться в termin-collision, если они не требуют physics simulation state.

termin-input

Source of truth: termin-input docs

Input abstraction. UI event routing остается в termin-gui, platform windowing остается в termin-display.

termin-engine

Source of truth: termin-engine docs

Engine-level orchestration поверх scene/render/input/domain modules.

termin-entity был удалён — его биндинги мигрированы в termin._native (termin-app). ECS-типы (Entity, Component, ComponentRegistry, TcScene) импортируются из termin.scene.

termin-lighting

Source of truth: termin-lighting docs

Lighting primitives and lighting-domain Python bindings.

termin-skeleton

Source of truth: termin-skeleton docs

Skeleton-domain API and bindings.

termin-animation

Source of truth: termin-animation docs

Animation-domain API and bindings.

termin-navmesh

Source of truth: termin-navmesh docs

NavMesh bindings and navigation utilities.

Component Libraries

Source of truth: termin-components docs

Component packages attach domain behavior/data to scene/entity objects:

Language Bindings

termin-csharp

Source of truth: termin-csharp docs

C# bindings/runtime packaging for Termin native libraries.

Application Layer

termin-app

Source of truth: editor architecture, flat viewport target model. Historical context: tcgui migration. The current termin-app docs index is stale and should not be treated as an API reference.

Основное приложение/редактор. tcgui является primary UI. Qt поддерживается по возможности, но не должен быть основным направлением новых архитектурных решений.

Application-level code не должен протекать вниз в graphics/render/scene.

diffusion-editor

Source of truth: Architecture

Внешний consumer внутри монорепозитория. Хороший smoke-test публичности API: если diffusion-editor вынужден лезть во внутренности, вероятно граница модуля описана или реализована плохо.