I want togenerate a per-vertex ambient when i run the project

i want to generate a per-vertex ambient occlusion array for arbitrary meshes.
and i find a example(https://wwwtyro.github.io/geo-ambient-occlusion/).but it used regl WebGL library, i want to know whether it can be used in playcanvas…