fenomas / noa

Experimental voxel game engine.
MIT License
608 stars 86 forks source link

refresh the registry on the go #201

Closed JonJon565 closed 7 months ago

JonJon565 commented 7 months ago

is there a way to update the textures (like in minecraft) for example i want to update dirt to have another texture e.g noa.registry.Dirt.Texture = whatever.png; how do i make noa refresh all the textures to do this?

fenomas commented 7 months ago

Hi, currently the intent of the registry is that entries are static, so you'd need to register a new voxelID and then change the voxelID of the world voxels you want to change. In practice, you could also just re-register the dirt block with new graphics, and noa would just overwrite the relevant data, but the assets in the scene (like babylon Material objects) wouldn't change until they got recreated. Flushing such objects could probably be done, but there's nothing like that in the engine currently.

JonJon565 commented 7 months ago

OK good to know