
				const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);

				// Create the HeightField
				const shapeSettings = new Jolt.HeightFieldShapeSettings();
				shapeSettings.mOffset.Set(0, 0, 0);
				shapeSettings.mScale.Set(mapScale, 0.1, mapScale);
				shapeSettings.mSampleCount = canvas.width;
				shapeSettings.mBlockSize = BLOCK_SIZE;
				const totalSize = canvas.width * canvas.height;
				shapeSettings.mHeightSamples.resize(totalSize);
				let heightSamples = new Float32Array(Jolt.HEAPF32.b