testing building some core systems
- serialization - chunks - parralelfor test
This commit is contained in:
+25
-25
@@ -29,40 +29,40 @@ internal class Program
|
||||
//systems.Add(new ParentSystem(world));
|
||||
systems.Add(new LocalToWorldSystem(world));
|
||||
editorSystems.Add(new EditorProfilerWindow(world));
|
||||
editorSystems.Add(new EditorHierarchyWindow(world));
|
||||
// editorSystems.Add(new EditorHierarchyWindow(world));
|
||||
#if DEBUG
|
||||
editorSystems.Add(new EditorInspectorWindow(world));
|
||||
#endif
|
||||
|
||||
Entity ent1 = world.CreateEntity("parent");
|
||||
world.Set(ent1, new Root());
|
||||
world.Set(ent1, new LocalTransform(new Vector3(1, 0, 0), Quaternion.Identity, Vector3.One));
|
||||
// Entity ent1 = world.CreateEntity("parent");
|
||||
// world.Set(ent1, new Root());
|
||||
// world.Set(ent1, new LocalTransform(new Vector3(1, 0, 0), Quaternion.Identity, Vector3.One));
|
||||
//
|
||||
// Entity ent2 = world.CreateEntity("child");
|
||||
// world.Set(ent2, new LocalTransform(new Vector3(0, 1, 0), Quaternion.Identity, Vector3.One));
|
||||
// Transform.SetParent(world, ent2, ent1);
|
||||
//
|
||||
// Entity ent3 = world.CreateEntity("entity3");
|
||||
// world.Set(ent3, new Root());
|
||||
// Transform.SetParent(world, ent3, ent2);
|
||||
//
|
||||
// Entity ent4 = world.CreateEntity("entity4");
|
||||
// world.Set(ent4, new Root());
|
||||
//
|
||||
// Entity ent5 = world.CreateBaseEntity("entity5");
|
||||
|
||||
Entity ent2 = world.CreateEntity("child");
|
||||
world.Set(ent2, new LocalTransform(new Vector3(0, 1, 0), Quaternion.Identity, Vector3.One));
|
||||
Transform.SetParent(world, ent2, ent1);
|
||||
|
||||
Entity ent3 = world.CreateEntity("entity3");
|
||||
world.Set(ent3, new Root());
|
||||
Transform.SetParent(world, ent3, ent2);
|
||||
|
||||
Entity ent4 = world.CreateEntity("entity4");
|
||||
world.Set(ent4, new Root());
|
||||
|
||||
Entity ent5 = world.CreateBaseEntity("entity5");
|
||||
|
||||
for (int i = 0; i < 256; i++)
|
||||
for (int i = 0; i < 1000000; i++)
|
||||
{
|
||||
Entity newEnt = world.CreateBaseEntity();
|
||||
world.Set(newEnt, new LocalTransform(new Vector3(i, i, i), Quaternion.Identity, Vector3.One));
|
||||
|
||||
Entity parent = newEnt;
|
||||
for (int j = 0; j < 2; j++) {
|
||||
Entity newChildEnt = world.CreateEntity();
|
||||
world.Set(newChildEnt, new LocalTransform(new Vector3(i + j * i, i - j * i, j - i * i), Quaternion.Identity, Vector3.One));
|
||||
Transform.SetParent(world, newChildEnt, parent);
|
||||
parent = newChildEnt;
|
||||
}
|
||||
// Entity parent = newEnt;
|
||||
// for (int j = 0; j < 2; j++) {
|
||||
// Entity newChildEnt = world.CreateEntity();
|
||||
// world.Set(newChildEnt, new LocalTransform(new Vector3(i + j * i, i - j * i, j - i * i), Quaternion.Identity, Vector3.One));
|
||||
// Transform.SetParent(world, newChildEnt, parent);
|
||||
// parent = newChildEnt;
|
||||
// }
|
||||
}
|
||||
|
||||
// Open project.
|
||||
|
||||
Reference in New Issue
Block a user