First emergency attempt is given as follows. I want the hidden lines get automatically rendered with dashed lines whenever I change the camera in animation. How to do so?
\documentclass[border=\dimexpr355pt/113\relax]{standalone}
\usepackage{filecontents}
\usepackage{asymptote}
\begin{filecontents*}{testfile.asy}
import three;
settings.render=0;
currentprojection=perspective(3,-4,4,center=true);
draw((0,0,0)--(0,2,0));
draw((0,0,0)--(2,0,0));
draw((2,2,0)--(0,2,0));
draw((2,2,0)--(2,0,0));
draw((0,0,0)--(0,0,2));
draw((0,2,0)--(0,2,2));
draw((2,0,0)--(2,0,2));
draw((2,2,0)--(2,2,2));
draw((0,0,2)--(0,2,2));
draw((0,0,2)--(2,0,2));
draw((2,2,2)--(0,2,2));
draw((2,2,2)--(2,0,2));
\end{filecontents*}
\begin{document}
\asyinclude[height=25mm,inline=true,attach=false,viewportwidth=4cm,viewportheight=25mm]{testfile.asy}
\end{document}
pst-solides3d
.