Files
EVEngine/examples/housegen
西风逍遥游 293be41d66 Merge remote-tracking branch 'origin/dev' into codex/architecture-consolidation
# Conflicts:
#	cmake/module_manifest.cmake
#	docs/usr/modules/procgen.md
#	src/engine/CMakeLists.txt
#	src/engine/cmdline/Run.cpp
#	src/engine/common/ScriptModule.h
#	src/modules/animation/Animation.cpp
#	src/modules/physics/World.cpp
#	src/modules/physics/World3D.cpp
#	src/modules/procgen/Procgen.cpp
#	src/modules/procgen/Procgen.h
#	src/modules/scene/SceneCapabilities.cpp
#	src/modules/schema/Schema.cpp
#	src/modules/schema/Schema.h
2026-08-27 14:52:28 +08:00
..

House generator runtime example

Run with make run/win32-debug GAME=examples/housegen. The example exercises the Squirrel generation API and prints a serializable layout. To display it, place the converted CC0 GLB kit under assets/. Native integrations call HouseLayout::instantiate; it returns a checked Result<vector<ecs::EntityHandle>>, so the graphics ECS world remains the sole owner of created entities and callers resolve handles only for the current operation.

Asset provenance and the required conversion record are in test/assets/housegen/ASSET_SOURCES.md.

Player kits should use housegen.loadComponentsFromFile("assets/my-kit/components.json") and check its structured Result; relative model paths are resolved beside that manifest. A component may override selected GLB PBR fields without replacing unspecified material data:

{
  "id": "wall.brick",
  "model": "wall-brick.glb",
  "category": "wall",
  "material": {
    "baseColor": [0.72, 0.48, 0.32, 1.0],
    "baseColorTexture": "textures/brick-albedo.png",
    "normalTexture": "textures/brick-normal-gl.png",
    "heightTexture": "textures/brick-height.png",
    "metallic": 0.0,
    "roughness": 0.88,
    "parallaxScale": 0.025,
    "parallaxMinLayers": 8,
    "parallaxMaxLayers": 24,
    "cellBombScale": 4.0,
    "cellBombStrength": 0.08,
    "cellBombRotation": 0.0
  }
}

Texture paths are resolved beside the GLB. Values must be in [0, 1]; parallaxScale is limited to [0, 0.2]. Omit a property to inherit it from the GLB. Embedded and external glTF base-color, normal and height textures are supported. The renderer currently uses scalar metallic/roughness; packed metallic-roughness maps are deliberately not advertised by this manifest.