summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/base/three.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/base/three.asy')
-rw-r--r--Build/source/utils/asymptote/base/three.asy8
1 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/utils/asymptote/base/three.asy b/Build/source/utils/asymptote/base/three.asy
index 8070526deac..2b32fd16125 100644
--- a/Build/source/utils/asymptote/base/three.asy
+++ b/Build/source/utils/asymptote/base/three.asy
@@ -2813,6 +2813,9 @@ object embed(string prefix=outprefix(), string label=prefix,
P=modelview*P;
Q=P.copy();
+ if(Q.t[2][3] == -1) // PRC can't handle oblique projections
+ Q=orthographic(P.camera,P.up,P.target,P.zoom,P.viewportshift,
+ P.showtarget,P.center);
if(P.infinity) {
triple m=min3(S.f);
triple M=max3(S.f);
@@ -2884,10 +2887,13 @@ object embed(string prefix=outprefix(), string label=prefix,
m -= margin;
} else if(M.z >= 0) abort("camera too close");
+ if(settings.outformat == "html")
+ format="html";
+
shipout3(prefix,f,preview ? nativeformat() : format,
S.width-defaultrender.margin,S.height-defaultrender.margin,
P.infinity ? 0 : 2aTan(Tan(0.5*P.angle)*P.zoom),
- P.zoom,m,M,P.viewportshift,
+ P.zoom,m,M,P.viewportshift,S.viewportmargin,
tinv*inv*shift(0,0,zcenter),Light.background(),Light.position,
Light.diffuse,Light.specular,
view && !preview);