diff options
author | Norbert Preining <norbert@preining.info> | 2022-09-18 03:08:21 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-09-18 03:08:21 +0000 |
commit | baa3e10650110291de10e0e8e6a1e48ac4579afe (patch) | |
tree | 8eff974515ba91e538c94002db56558182e59a4e /graphics/asymptote/webgl | |
parent | 9ae94dce28ea17b97ef24019e324353cd6af4dba (diff) |
CTAN sync 202209180308
Diffstat (limited to 'graphics/asymptote/webgl')
-rw-r--r-- | graphics/asymptote/webgl/gl.js | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/graphics/asymptote/webgl/gl.js b/graphics/asymptote/webgl/gl.js index 4f7ee9530e..00375ee57f 100644 --- a/graphics/asymptote/webgl/gl.js +++ b/graphics/asymptote/webgl/gl.js @@ -2165,10 +2165,6 @@ class Triangles extends Geometry { this.Normals=Normals; this.Colors=Colors; this.Indices=Indices; - Positions=[]; - Normals=[]; - Colors=[]; - Indices=[]; this.transparent=Materials[this.MaterialIndex].diffuse[3] < 1; } @@ -3334,6 +3330,10 @@ function pixel(controlpoint,width,MaterialIndex) function triangles(CenterIndex,MaterialIndex) { P.push(new Triangles(CenterIndex,MaterialIndex)); + window.Positions=Positions=[]; + window.Normals=Normals=[]; + window.Colors=Colors=[]; + window.Indices=Indices=[]; } // draw a sphere of radius r about center @@ -3802,16 +3802,20 @@ function webGLStart() initIBL().then(SetIBL).then(redrawScene); } - window['webGLStart']=webGLStart; - window['light']=light; - window['material']=material; - window['patch']=patch; - window['curve']=curve; - window['pixel']=pixel; - window['triangles']=triangles; - window['sphere']=sphere; - window['disk']=disk; - window['cylinder']=cylinder; - window['tube']=tube; + window.webGLStart=webGLStart; + window.light=light; + window.material=material; + window.patch=patch; + window.curve=curve; + window.pixel=pixel; + window.triangles=triangles; + window.sphere=sphere; + window.disk=disk; + window.cylinder=cylinder; + window.tube=tube; + window.Positions=Positions; + window.Normals=Normals; + window.Colors=Colors; + window.Indices=Indices; })(); |