Ternary KDE contours?

Hi,

I’ve been looking to create ternary plots using plotly in R with kernel density contours mixed with point data. I’ve searched around extensively and found a few examples that are very complex to replicate and themselves create errors when used. One of the images shown on https://plot.ly/r/ is a ternary diagram with what appears to be contours, but the example itself is just a simple ternaryscatter plot. Another more specific example is here:
https://plot.ly/~empet/15092/contour-lines-of-a-ternary-density-estimated-from-ilr-transformed-skyelava-data-/#/

Is there a function or plot type in the R implementation that can do this? Also, on the following github page there is mention of ‘ternary_contour’, but I guess it’s not implemented yet?

Thank you!

skyelava-dens