fenomas / noa

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

Outdated comment + note on blockMesh registration #176

Closed MCArth closed 2 years ago

MCArth commented 2 years ago

Hi andy, noticed https://github.com/fenomas/noa/blob/d9fe5d1549bc4596c5756fdcac852c9b07e535f0/src/lib/registry.js#L102 has an outdated comment about the restrictions that used to be in place on number of block ids

Also, note on blockMesh registration: I noticed you were setting offsetting the x and z positions by 0.5 but not the y position - https://github.com/fenomas/noa/blob/15d8231902bfaa1c59f29bc3633596dc15701010/src/lib/objectMesher.js#L95 and https://github.com/fenomas/noa/blob/15d8231902bfaa1c59f29bc3633596dc15701010/src/lib/objectMesher.js#L249

Was there a reason for this? Otherwise, I found it pretty unintuitive - so could be good to change for accessibility purposes

fenomas commented 2 years ago

Hi, thanks! I'll fix the comment.

For the location, mesh/entity positions are always assumed to be at the bottom center of the mesh/entity. I'm not sure that was the best option in retrospect, but it should work that way consistently throughout the engine.

MCArth commented 2 years ago

mb, I'll leave it open till you've changed the comment