@pirireis/webglobeplugins 0.11.1-alpha → 0.13.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/Math/arc-cdf-points.js +252 -0
  2. package/Math/{arc-generate-points.js → arc-generate-points copy.js } +4 -0
  3. package/Math/arc-generate-points-exponantial.js +254 -0
  4. package/Math/arc.js +5 -5
  5. package/Math/circle-cdf-points.js +247 -0
  6. package/Math/circle.js +39 -0
  7. package/Math/methods.js +13 -3
  8. package/Math/vec3.js +3 -3
  9. package/package.json +1 -1
  10. package/programs/line-on-globe/circle-accurate.js +176 -175
  11. package/programs/line-on-globe/circle.js +166 -164
  12. package/programs/line-on-globe/linestrip/data.js +4 -0
  13. package/programs/line-on-globe/{linestrip.js → linestrip/linestrip.js} +38 -39
  14. package/programs/line-on-globe/to-the-surface.js +111 -109
  15. package/programs/rings/distancering/circleflatprogram.js +116 -120
  16. package/programs/rings/distancering/circlepaddingfreeangleprogram.js +1 -1
  17. package/programs/rings/distancering/circlepaddysharedbuffer.js +368 -354
  18. package/programs/rings/distancering/index.js +6 -5
  19. package/programs/rings/distancering/paddyflatprogram.js +127 -136
  20. package/programs/rings/distancering/paddyflatprogram2d.js +129 -138
  21. package/programs/rings/distancering/paddyflatprogram3d.js +128 -136
  22. package/programs/totems/camerauniformblock.js +35 -8
  23. package/programs/totems/canvas-webglobe-info.js +55 -20
  24. package/programs/totems/{camerauniformblock copy.js → canvas-webglobe-info1.js} +11 -76
  25. package/programs/vectorfields/logics/pixelbased.js +4 -20
  26. package/shape-on-terrain/arc/naive/plugin.js +249 -288
  27. package/shape-on-terrain/circle/plugin.js +284 -0
  28. package/shape-on-terrain/type.js +1 -0
  29. package/util/account/index.js +2 -2
  30. package/util/account/single-attribute-buffer-management/buffer-manager.js +2 -3
  31. package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +2 -2
  32. package/util/build-strategy/general-strategy.js +62 -0
  33. package/util/build-strategy/static-dynamic.js +31 -0
  34. package/util/gl-util/draw-options/types.js +1 -1
  35. package/globe-types.js +0 -1
  36. package/programs/interface.js +0 -1
  37. package/programs/rings/distancering/shader.js +0 -1
  38. package/programs/totems/camerauniformblock1.js +0 -171
@@ -1,109 +1,111 @@
1
- import { createProgram } from './util';
2
- import { CameraUniformBlockTotemCache, CameraUniformBlockString } from '../totems';
3
- import { cartesian3DToGLPosition, R_3D } from '../../util/shaderfunctions/geometrytransformations';
4
- import { noRegisterGlobeProgramCache } from '../programcache';
5
- import { attributeLoader } from '../../util/gl-util/buffer/attribute-loader';
6
- import '../draw-options/types';
7
- import { drawInstanced } from '../draw-options/methods';
8
- const vs = `#version 300 es
9
- ${R_3D}
10
- ${CameraUniformBlockString}
11
- ${cartesian3DToGLPosition}
12
- in vec3 pos3D
13
- in vec4 color;
14
- out float ratio;
15
- out flat vec4 vColor;
16
- void main(){
17
- if ( gl_VertexID == 0) {
18
- gl_Position = cartesian3DToGLPosition(pos3D);
19
- ratio =0.0;
20
- } else {
21
- vec3 sea_level_pos3D = norm(pos3D) * R_3D;
22
- gl_Position = cartesian3DToGLPosition(pos3D);
23
- ratio = 1.0;
24
- }
25
- vColor = color;
26
- }`;
27
- const fs = `#version 300 es
28
- uniform float opacity;
29
- uniform float phase;
30
- uniform float fadeOpacity;
31
- in flat vec4 vColor;
32
- in float ratio;
33
- out vec4 fragColor;
34
- void main(){
35
- fragColor = vec4( vColor.rgb, vColor.a * opacity);
36
- if (fadeOpacity < 1.0) {
37
- float alpha= mix( fadeOpacity, vColor.a, fract( ratio + phase ));
38
- fragColor.a *= alpha;
39
- }
40
- }`;
41
- class Logic {
42
- constructor(globe) {
43
- this.globe = globe;
44
- this.gl = globe.gl;
45
- this.program = createProgram(this.gl, vs, fs);
46
- const { gl, program } = this;
47
- this._opacity = {
48
- lastValue: 1.0,
49
- location: gl.getUniformLocation(program, 'opacity')
50
- };
51
- this._phase = {
52
- lastValue: 1.0,
53
- location: gl.getUniformLocation(program, 'phase')
54
- };
55
- this._fadeOpacity = {
56
- lastValue: 1.0,
57
- location: gl.getUniformBlockLocation(program, 'fadeOpacity')
58
- };
59
- const currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
60
- gl.useProgram(program);
61
- [this._opacity, this._phase, this._fadeOpacity].forEach((wrapper) => gl.uniform1f(wrapper.location, wrapper.lastValue));
62
- gl.useProgram(currentProgram);
63
- gl.useProgram(program);
64
- gl.bindAttribLocation(program, 0, 'pos3D');
65
- gl.bindAttribLocation(program, 1, 'color');
66
- this.cameraUniformBlockTotem = new CameraUniformBlockTotemCache.get(globe);
67
- this.cameraBlockBindingPoint = 0;
68
- const cameraBlockIndex = gl.getUniformBlockLocation(program, 'CameraUniformBlock');
69
- gl.uniformBlockBinding(program, cameraBlockIndex, this.cameraBlockBindingPoint);
70
- }
71
- createVao(pos3DObj, colorObj) {
72
- const { gl } = this;
73
- const vao = gl.createVertexArray();
74
- const divisor = 1;
75
- gl.bindVertexArray(vao);
76
- attributeLoader(gl, pos3DObj, 0, 3, { divisor });
77
- attributeLoader(gl, colorObj, 1, 4, { divisor, escapeValue: [-1, -1, -1, -1] });
78
- gl.bindVertexArray(null);
79
- this._vaoCache.push(vao);
80
- return vao;
81
- }
82
- /**
83
- *
84
- * @param {WebGL2RenderingContext.vertexArrayObject} vao
85
- * @param {Render} drawOptions
86
- */
87
- draw(vao, drawOptions, { opacity = 1.0, fadeOpacity = 1.0, }) {
88
- const { globe, gl, program, _opacity, _fadeOpacity } = this;
89
- gl.useProgram(program);
90
- gl.bindVertexArray(vao);
91
- if (fadeOpacity < 1.0) {
92
- this._updatePhase();
93
- globe.drawRender();
94
- }
95
- if (fadeOpacity !== _fadeOpacity.lastValue) {
96
- _fadeOpacity.lastValue = fadeOpacity;
97
- gl.uniform1f(_fadeOpacity.location, fadeOpacity);
98
- }
99
- if (opacity !== _opacity.lastValue) {
100
- _opacity.lastValue = opacity;
101
- gl.uniform1f(_opacity.location, opacity);
102
- }
103
- drawInstanced(gl, gl.TRIANGLE_FAN, drawOptions);
104
- }
105
- _updatePhase() {
106
- this._phase.lastValue = (Date.now() / 3.0) % 1000;
107
- gl.uniform1f(_phase.location, _phase.lastValue);
108
- }
109
- }
1
+ "use strict";
2
+ // TODO: Delete this file if it is not needed anymore.
3
+ // import { createProgram } from './util'
4
+ // import { CameraUniformBlockTotemCache, CameraUniformBlockString } from '../totems';
5
+ // import { cartesian3DToGLPosition, R_3D } from '../../util/shaderfunctions/geometrytransformations';
6
+ // import { noRegisterGlobeProgramCache } from '../programcache';
7
+ // import { attributeLoader } from '../../util/gl-util/buffer/attribute-loader';
8
+ // import '../draw-options/types';
9
+ // import { drawInstanced } from '../draw-options/methods';
10
+ // const vs = `#version 300 es
11
+ // ${R_3D}
12
+ // ${CameraUniformBlockString}
13
+ // ${cartesian3DToGLPosition}
14
+ // in vec3 pos3D
15
+ // in vec4 color;
16
+ // out float ratio;
17
+ // out flat vec4 vColor;
18
+ // void main(){
19
+ // if ( gl_VertexID == 0) {
20
+ // gl_Position = cartesian3DToGLPosition(pos3D);
21
+ // ratio =0.0;
22
+ // } else {
23
+ // vec3 sea_level_pos3D = norm(pos3D) * R_3D;
24
+ // gl_Position = cartesian3DToGLPosition(pos3D);
25
+ // ratio = 1.0;
26
+ // }
27
+ // vColor = color;
28
+ // }`;
29
+ // const fs = `#version 300 es
30
+ // uniform float opacity;
31
+ // uniform float phase;
32
+ // uniform float fadeOpacity;
33
+ // in flat vec4 vColor;
34
+ // in float ratio;
35
+ // out vec4 fragColor;
36
+ // void main(){
37
+ // fragColor = vec4( vColor.rgb, vColor.a * opacity);
38
+ // if (fadeOpacity < 1.0) {
39
+ // float alpha= mix( fadeOpacity, vColor.a, fract( ratio + phase ));
40
+ // fragColor.a *= alpha;
41
+ // }
42
+ // }`;
43
+ // class Logic {
44
+ // constructor(globe) {
45
+ // this.globe = globe;
46
+ // this.gl = globe.gl;
47
+ // this.program = createProgram(this.gl, vs, fs);
48
+ // const { gl, program } = this;
49
+ // this._opacity = {
50
+ // lastValue: 1.0,
51
+ // location: gl.getUniformLocation(program, 'opacity')
52
+ // }
53
+ // this._phase = {
54
+ // lastValue: 1.0,
55
+ // location: gl.getUniformLocation(program, 'phase')
56
+ // }
57
+ // this._fadeOpacity = {
58
+ // lastValue: 1.0,
59
+ // location: gl.getUniformBlockLocation(program, 'fadeOpacity')
60
+ // }
61
+ // const currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
62
+ // gl.useProgram(program);
63
+ // [this._opacity, this._phase, this._fadeOpacity].forEach((wrapper) => gl.uniform1f(wrapper.location, wrapper.lastValue))
64
+ // gl.useProgram(currentProgram)
65
+ // gl.useProgram(program);
66
+ // gl.bindAttribLocation(program, 0, 'pos3D');
67
+ // gl.bindAttribLocation(program, 1, 'color');
68
+ // this.cameraUniformBlockTotem = new CameraUniformBlockTotemCache.get(globe);
69
+ // this.cameraBlockBindingPoint = 0;
70
+ // const cameraBlockIndex = gl.getUniformBlockLocation(program, 'CameraUniformBlock');
71
+ // gl.uniformBlockBinding(program, cameraBlockIndex, this.cameraBlockBindingPoint)
72
+ // }
73
+ // createVao(pos3DObj, colorObj) {
74
+ // const { gl } = this;
75
+ // const vao = gl.createVertexArray();
76
+ // const divisor = 1;
77
+ // gl.bindVertexArray(vao);
78
+ // attributeLoader(gl, pos3DObj, 0, 3, { divisor });
79
+ // attributeLoader(gl, colorObj, 1, 4, { divisor, escapeValue: [-1, -1, -1, -1] });
80
+ // gl.bindVertexArray(null);
81
+ // this._vaoCache.push(vao);
82
+ // return vao;
83
+ // }
84
+ // /**
85
+ // *
86
+ // * @param {WebGL2RenderingContext.vertexArrayObject} vao
87
+ // * @param {Render} drawOptions
88
+ // */
89
+ // draw(vao, drawOptions, { opacity = 1.0, fadeOpacity = 1.0, }) {
90
+ // const { globe, gl, program, _opacity, _fadeOpacity } = this;
91
+ // gl.useProgram(program);
92
+ // gl.bindVertexArray(vao);
93
+ // if (fadeOpacity < 1.0) {
94
+ // this._updatePhase();
95
+ // globe.drawRender();
96
+ // }
97
+ // if (fadeOpacity !== _fadeOpacity.lastValue) {
98
+ // _fadeOpacity.lastValue = fadeOpacity;
99
+ // gl.uniform1f(_fadeOpacity.location, fadeOpacity);
100
+ // }
101
+ // if (opacity !== _opacity.lastValue) {
102
+ // _opacity.lastValue = opacity;
103
+ // gl.uniform1f(_opacity.location, opacity);
104
+ // }
105
+ // drawInstanced(gl, gl.TRIANGLE_FAN, drawOptions)
106
+ // }
107
+ // _updatePhase() {
108
+ // this._phase.lastValue = (Date.now() / 3.0) % 1000;
109
+ // gl.uniform1f(_phase.location, _phase.lastValue);
110
+ // }
111
+ // }
@@ -1,120 +1,116 @@
1
- import { createProgram, shaderfunctions } from "../../../util";
2
- import CameraUniformBlockTotem, { CameraUniformBlockString } from "../../totems/camerauniformblock";
3
- import { noRegisterGlobeProgramCache, globeProgramCache } from "../../programcache";
4
- const CIRCLE_EDGE_COUNT = 360;
5
- const vertexShader = `#version 300 es ` +
6
- shaderfunctions.PI +
7
- shaderfunctions.R +
8
- shaderfunctions.POLE +
9
- CameraUniformBlockString +
10
- shaderfunctions.mercatorXYToGLPosition +
11
- shaderfunctions.longLatRadToMercator +
12
- shaderfunctions.longLatRadToCartesian3D +
13
- shaderfunctions.circleLimpFromLongLatRadCenterCartesian3D +
14
- shaderfunctions.circleLimpFromLongLatRadCenterMercatorCompass +
15
- shaderfunctions.circleLimpFromLongLatRadCenterMercatorRealDistance + `
16
-
17
- uniform int compass;
18
- uniform float circle_edge_count;
19
-
20
- uniform float opacity;
21
-
22
- in vec2 center;
23
- in float radius;
24
- in vec4 color;
25
- in float flag;
26
- out vec4 v_color;
27
- out vec2 v_limp;
28
-
29
- void main() {
30
- if( flag == 1.0 || radius == 0.0) return; // flag 1.0 is hide
31
- v_color = vec4(color.rgb, color.a * opacity);
32
- if ( gl_VertexID == 270 ) v_color.rgb += 0.2;
33
- float angle = 3.1415926535897932384626433832795 * 2.0 * (float(gl_VertexID) / circle_edge_count);
34
- if ( is3D ){
35
- gl_Position = projection * view * vec4(
36
- circleLimpFromLongLatRadCenterCartesian3D( center, radius, angle) - translate, 1.0);
37
- v_limp = vec2(0.0, 0.0);
38
- return;
39
- }
40
- vec2 limp;
41
- if ( compass == 1 ){
42
- limp = circleLimpFromLongLatRadCenterMercatorCompass(center, radius, angle);
43
- } else {
44
- limp = circleLimpFromLongLatRadCenterMercatorRealDistance(center, radius, angle);
45
- }
46
- v_limp = limp;
47
- gl_Position = mercatorXYToGLPosition(limp);
48
-
49
- }`;
50
- const fragmentShader = `#version 300 es
51
- precision highp float;` +
52
- shaderfunctions.POLE + `
53
-
54
- in vec4 v_color;
55
- in vec2 v_limp;
56
- out vec4 outColor;
57
- void main() {
58
- if ( v_limp.x < -POLE || v_limp.x > POLE || v_limp.y < -POLE || v_limp.y > POLE ){ discard; }
59
- outColor = v_color;
60
- }`;
61
- class Logic {
62
- constructor(globe) {
63
- this.globe = globe;
64
- this.gl = globe.gl;
65
- this.program = createProgram(this.gl, vertexShader, fragmentShader);
66
- { // bind positions so bufferManager can use them
67
- this.gl.bindAttribLocation(this.program, 0, "center");
68
- this.gl.bindAttribLocation(this.program, 1, "radius");
69
- this.gl.bindAttribLocation(this.program, 2, "color");
70
- this.gl.bindAttribLocation(this.program, 3, "flag");
71
- }
72
- this.cameraBlockBindingPoint = 0;
73
- this.cameraBlockTotem = globeProgramCache.getProgram(globe, CameraUniformBlockTotem);
74
- const cameraBlockIndex = this.gl.getUniformBlockIndex(this.program, "CameraUniformBlock");
75
- this.gl.uniformBlockBinding(this.program, cameraBlockIndex, this.cameraBlockBindingPoint);
76
- this._opacityLocation = this.gl.getUniformLocation(this.program, "opacity");
77
- this._compassLocation = this.gl.getUniformLocation(this.program, "compass");
78
- this._circleEdgeCountLocation = this.gl.getUniformLocation(this.program, "circle_edge_count");
79
- this._circleEdgeCount = CIRCLE_EDGE_COUNT;
80
- this._compassmode = 1;
81
- this._opacity = 1.0;
82
- {
83
- const currentProgram = this.gl.getParameter(this.gl.CURRENT_PROGRAM);
84
- this.gl.useProgram(this.program);
85
- this.gl.uniform1i(this._compassLocation, 1);
86
- this.gl.uniform1f(this._circleEdgeCountLocation, CIRCLE_EDGE_COUNT);
87
- this.gl.uniform1f(this._opacityLocation, 1.0);
88
- this.gl.useProgram(currentProgram);
89
- }
90
- }
91
- draw(attrBufferManager, compass, circleEdgeCount, opacity) {
92
- const { gl, program, cameraBlockTotem, cameraBlockBindingPoint } = this;
93
- gl.useProgram(program);
94
- cameraBlockTotem.bind(cameraBlockBindingPoint);
95
- attrBufferManager.bindCircleVAO();
96
- if (compass !== this._compassmode) {
97
- gl.uniform1i(this._compassLocation, compass);
98
- this._compassmode = compass;
99
- }
100
- if (opacity !== this._opacity) {
101
- gl.uniform1f(this._opacityLocation, opacity);
102
- this._opacity = opacity;
103
- }
104
- if (circleEdgeCount !== this._circleEdgeCount) {
105
- gl.uniform1f(this._circleEdgeCountLocation, circleEdgeCount);
106
- this._circleEdgeCount = circleEdgeCount;
107
- }
108
- gl.drawArraysInstanced(gl.LINE_LOOP, 0, circleEdgeCount, attrBufferManager.length);
109
- gl.bindVertexArray(null);
110
- cameraBlockTotem.unbind(cameraBlockBindingPoint);
111
- }
112
- free() {
113
- this.gl.deleteProgram(this.program);
114
- globeProgramCache.releaseProgram(this.globe, CameraUniformBlockTotem);
115
- }
116
- }
117
- export const programCache = Object.freeze({
118
- getProgram: (globe) => { return noRegisterGlobeProgramCache.getProgram(globe, Logic); },
119
- releaseProgram: (globe) => { noRegisterGlobeProgramCache.releaseProgram(globe, Logic); }
120
- });
1
+ "use strict";
2
+ // TODO: Delete this file if it is not needed anymore.
3
+ // import { createProgram, shaderfunctions } from "../../../util";
4
+ // import CameraUniformBlockTotem, { CameraUniformBlockString } from "../../totems/camerauniformblock";
5
+ // import { noRegisterGlobeProgramCache, globeProgramCache } from "../../programcache";
6
+ // const CIRCLE_EDGE_COUNT = 360;
7
+ // const vertexShader = `#version 300 es ` +
8
+ // shaderfunctions.PI +
9
+ // shaderfunctions.R +
10
+ // shaderfunctions.POLE +
11
+ // CameraUniformBlockString +
12
+ // shaderfunctions.mercatorXYToGLPosition +
13
+ // shaderfunctions.longLatRadToMercator +
14
+ // shaderfunctions.longLatRadToCartesian3D +
15
+ // shaderfunctions.circleLimpFromLongLatRadCenterCartesian3D +
16
+ // shaderfunctions.circleLimpFromLongLatRadCenterMercatorCompass +
17
+ // shaderfunctions.circleLimpFromLongLatRadCenterMercatorRealDistance + `
18
+ // uniform int compass;
19
+ // uniform float circle_edge_count;
20
+ // uniform float opacity;
21
+ // in vec2 center;
22
+ // in float radius;
23
+ // in vec4 color;
24
+ // in float flag;
25
+ // out vec4 v_color;
26
+ // out vec2 v_limp;
27
+ // void main() {
28
+ // if( flag == 1.0 || radius == 0.0) return; // flag 1.0 is hide
29
+ // v_color = vec4(color.rgb, color.a * opacity);
30
+ // if ( gl_VertexID == 270 ) v_color.rgb += 0.2;
31
+ // float angle = 3.1415926535897932384626433832795 * 2.0 * (float(gl_VertexID) / circle_edge_count);
32
+ // if ( is3D ){
33
+ // gl_Position = projection * view * vec4(
34
+ // circleLimpFromLongLatRadCenterCartesian3D( center, radius, angle) - translate, 1.0);
35
+ // v_limp = vec2(0.0, 0.0);
36
+ // return;
37
+ // }
38
+ // vec2 limp;
39
+ // if ( compass == 1 ){
40
+ // limp = circleLimpFromLongLatRadCenterMercatorCompass(center, radius, angle);
41
+ // } else {
42
+ // limp = circleLimpFromLongLatRadCenterMercatorRealDistance(center, radius, angle);
43
+ // }
44
+ // v_limp = limp;
45
+ // gl_Position = mercatorXYToGLPosition(limp);
46
+ // }`;
47
+ // const fragmentShader = `#version 300 es
48
+ // precision highp float;` +
49
+ // shaderfunctions.POLE + `
50
+ // in vec4 v_color;
51
+ // in vec2 v_limp;
52
+ // out vec4 outColor;
53
+ // void main() {
54
+ // if ( v_limp.x < -POLE || v_limp.x > POLE || v_limp.y < -POLE || v_limp.y > POLE ){ discard; }
55
+ // outColor = v_color;
56
+ // }`;
57
+ // class Logic {
58
+ // constructor(globe) {
59
+ // this.globe = globe;
60
+ // this.gl = globe.gl;
61
+ // this.program = createProgram(this.gl, vertexShader, fragmentShader);
62
+ // { // bind positions so bufferManager can use them
63
+ // this.gl.bindAttribLocation(this.program, 0, "center");
64
+ // this.gl.bindAttribLocation(this.program, 1, "radius");
65
+ // this.gl.bindAttribLocation(this.program, 2, "color");
66
+ // this.gl.bindAttribLocation(this.program, 3, "flag");
67
+ // }
68
+ // this.cameraBlockBindingPoint = 0;
69
+ // this.cameraBlockTotem = globeProgramCache.getProgram(globe, CameraUniformBlockTotem);
70
+ // const cameraBlockIndex = this.gl.getUniformBlockIndex(this.program, "CameraUniformBlock");
71
+ // this.gl.uniformBlockBinding(this.program, cameraBlockIndex, this.cameraBlockBindingPoint);
72
+ // this._opacityLocation = this.gl.getUniformLocation(this.program, "opacity");
73
+ // this._compassLocation = this.gl.getUniformLocation(this.program, "compass");
74
+ // this._circleEdgeCountLocation = this.gl.getUniformLocation(this.program, "circle_edge_count");
75
+ // this._circleEdgeCount = CIRCLE_EDGE_COUNT;
76
+ // this._compassmode = 1;
77
+ // this._opacity = 1.0;
78
+ // {
79
+ // const currentProgram = this.gl.getParameter(this.gl.CURRENT_PROGRAM);
80
+ // this.gl.useProgram(this.program);
81
+ // this.gl.uniform1i(this._compassLocation, 1);
82
+ // this.gl.uniform1f(this._circleEdgeCountLocation, CIRCLE_EDGE_COUNT);
83
+ // this.gl.uniform1f(this._opacityLocation, 1.0);
84
+ // this.gl.useProgram(currentProgram);
85
+ // }
86
+ // }
87
+ // draw(attrBufferManager, compass, circleEdgeCount, opacity) {
88
+ // const { gl, program, cameraBlockTotem, cameraBlockBindingPoint } = this;
89
+ // gl.useProgram(program);
90
+ // cameraBlockTotem.bind(cameraBlockBindingPoint);
91
+ // attrBufferManager.bindCircleVAO();
92
+ // if (compass !== this._compassmode) {
93
+ // gl.uniform1i(this._compassLocation, compass);
94
+ // this._compassmode = compass;
95
+ // }
96
+ // if (opacity !== this._opacity) {
97
+ // gl.uniform1f(this._opacityLocation, opacity);
98
+ // this._opacity = opacity;
99
+ // }
100
+ // if (circleEdgeCount !== this._circleEdgeCount) {
101
+ // gl.uniform1f(this._circleEdgeCountLocation, circleEdgeCount);
102
+ // this._circleEdgeCount = circleEdgeCount;
103
+ // }
104
+ // gl.drawArraysInstanced(gl.LINE_LOOP, 0, circleEdgeCount, attrBufferManager.length);
105
+ // gl.bindVertexArray(null);
106
+ // cameraBlockTotem.unbind(cameraBlockBindingPoint);
107
+ // }
108
+ // free() {
109
+ // this.gl.deleteProgram(this.program);
110
+ // globeProgramCache.releaseProgram(this.globe, CameraUniformBlockTotem);
111
+ // }
112
+ // }
113
+ // export const programCache = Object.freeze({
114
+ // getProgram: (globe) => { return noRegisterGlobeProgramCache.getProgram(globe, Logic) },
115
+ // releaseProgram: (globe) => { noRegisterGlobeProgramCache.releaseProgram(globe, Logic) }
116
+ // });
@@ -120,7 +120,7 @@ class Logic {
120
120
  return new BufferManager(this.gl, bufferType, initialRingCapacity);
121
121
  }
122
122
  }
123
- export const PaddingFreeAngleCache = Object.freeze({
123
+ const PaddingFreeAngleCache = Object.freeze({
124
124
  getProgram: (globe) => noRegisterGlobeProgramCache.getProgram(globe, Logic),
125
125
  releaseProgram: (globe) => globeProgramCache.releaseProgram(globe, Logic)
126
126
  });