See it running live here
The ship model is the Sabo, a Casablanca-class escort carrier from Phil Crowther's aviation repository. A comprehensive Threejs WebGPU app. https://github.com/PhilCrowther/Aviation
Surface voxels are green. Volume voxels are yellow.
This voxelizer allows you to very precisely determine the volume of any shaped closed body. This is important for precise buoyancy calculations. It is also suitable for more accurate collision detection. Since voxelization is performed on the GPU, very complex meshes can be voxelized extremely quickly.