Entity now can be linked to a mesh.

Only support cube generated from code no light no nothing
This commit is contained in:
2026-08-09 17:20:38 -04:00
parent 30ea435b87
commit 73aa4a846b
11 changed files with 177 additions and 89 deletions
+2 -2
View File
@@ -152,13 +152,13 @@ void JulietApplication::Init(NonNullPtr<Arena>)
{
for (int col = 0; col < kGridSize; ++col)
{
MeshID cube = AddCube();
MeshAssetID cubeAsset = GetCubePrimitiveMeshAssetID();
float x = static_cast<float>(col) * kSpacing - kOffset;
float y = static_cast<float>(row) * kSpacing - kOffset;
float seed = static_cast<float>(row * kGridSize + col);
Matrix rotation = MatrixRotation(seed * 0.73f, seed * 1.17f, seed * 0.53f);
SetMeshTransform(cube, MatrixTranslation(x, y, 0.0f) * rotation);
CreateMeshInstance(cubeAsset, 0, MatrixTranslation(x, y, 0.0f) * rotation);
}
}