testing building some core systems
- serialization - chunks - parralelfor test
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using MoonTools.ECS;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Nerfed.Runtime.Scene.Streaming;
|
||||
|
||||
/// <summary>
|
||||
/// Marks an entity as a streaming observer (e.g. the player camera) that causes chunks
|
||||
/// to be loaded around it.
|
||||
/// </summary>
|
||||
public struct ChunkObserverComponent
|
||||
{
|
||||
public float ViewRadius;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tags an entity as belonging to a specific chunk, allowing it to be unloaded when the chunk is out of range.
|
||||
/// </summary>
|
||||
public struct ChunkMemberComponent
|
||||
{
|
||||
// A 64-bit spatial hash combining the X, Y, and Z coordinates.
|
||||
public long ChunkId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Added to entities that belong to a chunk that has been unloaded.
|
||||
/// A dedicated system will process and destroy these slowly over multiple frames.
|
||||
/// </summary>
|
||||
public struct ChunkUnloadPendingTag { }
|
||||
Reference in New Issue
Block a user