summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/plain_prethree.asy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-01 23:10:25 +0000
committerKarl Berry <karl@freefriends.org>2020-03-01 23:10:25 +0000
commit81abf43d2b32106102462c3fd1b6c52c0b74f6b7 (patch)
tree8ff3cf992c81a46d17219ac528c3cb6fe7467402 /Master/texmf-dist/asymptote/plain_prethree.asy
parent668f13d96ea148cade89c8813883c8b5a90cb55e (diff)
asymptote 2.62 support files
git-svn-id: svn://tug.org/texlive/trunk@53988 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/plain_prethree.asy')
-rw-r--r--Master/texmf-dist/asymptote/plain_prethree.asy17
1 files changed, 6 insertions, 11 deletions
diff --git a/Master/texmf-dist/asymptote/plain_prethree.asy b/Master/texmf-dist/asymptote/plain_prethree.asy
index 0d3921e3f0d..968ae2943a6 100644
--- a/Master/texmf-dist/asymptote/plain_prethree.asy
+++ b/Master/texmf-dist/asymptote/plain_prethree.asy
@@ -1,6 +1,6 @@
// Critical definitions for transform3 needed by projection and picture.
-pair viewportmargin=(0.1,0.1); // Horizontal and vertical 3D viewport margins.
+pair viewportmargin=settings.viewportmargin;
typedef real[][] transform3;
restricted transform3 identity4=identity(4);
@@ -161,7 +161,6 @@ projection currentprojection;
struct light {
real[][] diffuse;
- real[][] ambient;
real[][] specular;
pen background=nullpen; // Background color of the 3D canvas.
real specularfactor;
@@ -172,42 +171,38 @@ struct light {
bool on() {return position.length > 0;}
void operator init(pen[] diffuse,
- pen[] ambient=array(diffuse.length,black),
pen[] specular=diffuse, pen background=nullpen,
real specularfactor=1,
triple[] position) {
int n=diffuse.length;
- assert(ambient.length == n && specular.length == n && position.length == n);
+ assert(specular.length == n && position.length == n);
this.diffuse=new real[n][];
- this.ambient=new real[n][];
this.specular=new real[n][];
this.background=background;
this.position=new triple[n];
for(int i=0; i < position.length; ++i) {
this.diffuse[i]=rgba(diffuse[i]);
- this.ambient[i]=rgba(ambient[i]);
this.specular[i]=rgba(specular[i]);
this.position[i]=unit(position[i]);
}
this.specularfactor=specularfactor;
}
- void operator init(pen diffuse=white, pen ambient=black, pen specular=diffuse,
+ void operator init(pen diffuse=white, pen specular=diffuse,
pen background=nullpen, real specularfactor=1 ...triple[] position) {
int n=position.length;
- operator init(array(n,diffuse),array(n,ambient),array(n,specular),
+ operator init(array(n,diffuse),array(n,specular),
background,specularfactor,position);
}
- void operator init(pen diffuse=white, pen ambient=black, pen specular=diffuse,
+ void operator init(pen diffuse=white, pen specular=diffuse,
pen background=nullpen, real x, real y, real z) {
- operator init(diffuse,ambient,specular,background,(x,y,z));
+ operator init(diffuse,specular,background,(x,y,z));
}
void operator init(explicit light light) {
diffuse=copy(light.diffuse);
- ambient=copy(light.ambient);
specular=copy(light.specular);
background=light.background;
specularfactor=light.specularfactor;