@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.
- package/Math/arc-cdf-points.js +252 -0
- package/Math/{arc-generate-points.js → arc-generate-points copy.js } +4 -0
- package/Math/arc-generate-points-exponantial.js +254 -0
- package/Math/arc.js +5 -5
- package/Math/circle-cdf-points.js +247 -0
- package/Math/circle.js +39 -0
- package/Math/methods.js +13 -3
- package/Math/vec3.js +3 -3
- package/package.json +1 -1
- package/programs/line-on-globe/circle-accurate.js +176 -175
- package/programs/line-on-globe/circle.js +166 -164
- package/programs/line-on-globe/linestrip/data.js +4 -0
- package/programs/line-on-globe/{linestrip.js → linestrip/linestrip.js} +38 -39
- package/programs/line-on-globe/to-the-surface.js +111 -109
- package/programs/rings/distancering/circleflatprogram.js +116 -120
- package/programs/rings/distancering/circlepaddingfreeangleprogram.js +1 -1
- package/programs/rings/distancering/circlepaddysharedbuffer.js +368 -354
- package/programs/rings/distancering/index.js +6 -5
- package/programs/rings/distancering/paddyflatprogram.js +127 -136
- package/programs/rings/distancering/paddyflatprogram2d.js +129 -138
- package/programs/rings/distancering/paddyflatprogram3d.js +128 -136
- package/programs/totems/camerauniformblock.js +35 -8
- package/programs/totems/canvas-webglobe-info.js +55 -20
- package/programs/totems/{camerauniformblock copy.js → canvas-webglobe-info1.js} +11 -76
- package/programs/vectorfields/logics/pixelbased.js +4 -20
- package/shape-on-terrain/arc/naive/plugin.js +249 -288
- package/shape-on-terrain/circle/plugin.js +284 -0
- package/shape-on-terrain/type.js +1 -0
- package/util/account/index.js +2 -2
- package/util/account/single-attribute-buffer-management/buffer-manager.js +2 -3
- package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +2 -2
- package/util/build-strategy/general-strategy.js +62 -0
- package/util/build-strategy/static-dynamic.js +31 -0
- package/util/gl-util/draw-options/types.js +1 -1
- package/globe-types.js +0 -1
- package/programs/interface.js +0 -1
- package/programs/rings/distancering/shader.js +0 -1
- package/programs/totems/camerauniformblock1.js +0 -171
|
@@ -1,164 +1,166 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
${
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
in
|
|
71
|
-
in
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
// TODO: Delete this file if it is not needed anymore.
|
|
3
|
+
// import { createProgram } from "../../util/webglobjectbuilders";
|
|
4
|
+
// import { CameraUniformBlockString, CameraUniformBlockTotemCache } from "../totems/camerauniformblock";
|
|
5
|
+
// import { noRegisterGlobeProgramCache } from "../programcache";
|
|
6
|
+
// import { vaoAttributeLoader } from "../../util/account/util";
|
|
7
|
+
// import {
|
|
8
|
+
// longLatRadToMercator, longLatRadToCartesian3D, cartesian3DToGLPosition, mercatorXYToGLPosition, realDistanceOnSphereR1,
|
|
9
|
+
// circleLimpFromLongLatRadCenterCartesian3D,
|
|
10
|
+
// circleLimpFromLongLatRadCenterMercatorCompass,
|
|
11
|
+
// circleLimpFromLongLatRadCenterMercatorRealDistance,
|
|
12
|
+
// POLE
|
|
13
|
+
// } from "../../util/shaderfunctions/geometrytransformations";
|
|
14
|
+
// /**
|
|
15
|
+
// * TODO:
|
|
16
|
+
// * 1. integrate geometry functions for radius angle and center
|
|
17
|
+
// * 2. integrate attributes
|
|
18
|
+
// *
|
|
19
|
+
// * TODO:
|
|
20
|
+
// * center_position is too small or doenst loaded as expected.
|
|
21
|
+
// */
|
|
22
|
+
// const EDGE_COUNT_ON_SPHERE = 360;
|
|
23
|
+
// const vertexShaderSource = `#version 300 es
|
|
24
|
+
// precision highp float;
|
|
25
|
+
// ${CameraUniformBlockString}
|
|
26
|
+
// ${longLatRadToMercator}
|
|
27
|
+
// ${longLatRadToCartesian3D}
|
|
28
|
+
// ${cartesian3DToGLPosition}
|
|
29
|
+
// ${mercatorXYToGLPosition}
|
|
30
|
+
// ${realDistanceOnSphereR1}
|
|
31
|
+
// ${circleLimpFromLongLatRadCenterCartesian3D}
|
|
32
|
+
// ${circleLimpFromLongLatRadCenterMercatorCompass}
|
|
33
|
+
// ${circleLimpFromLongLatRadCenterMercatorRealDistance}
|
|
34
|
+
// uniform float edge_count;
|
|
35
|
+
// in vec2 center_position;
|
|
36
|
+
// in float radius;
|
|
37
|
+
// in vec4 color;
|
|
38
|
+
// in float dash_ratio;
|
|
39
|
+
// in float dash_opacity;
|
|
40
|
+
// out float interpolation;
|
|
41
|
+
// out vec4 v_color;
|
|
42
|
+
// out float v_dash_ratio;
|
|
43
|
+
// out float v_dash_opacity;
|
|
44
|
+
// out vec2 v_limp;
|
|
45
|
+
// void main() {
|
|
46
|
+
// interpolation = float( gl_VertexID ) / ${EDGE_COUNT_ON_SPHERE}.0;
|
|
47
|
+
// float angle = PI * 2.0 * interpolation;
|
|
48
|
+
// if ( is3D ) {
|
|
49
|
+
// vec3 position = circleLimpFromLongLatRadCenterCartesian3D( center_position, radius, angle);
|
|
50
|
+
// gl_Position = cartesian3DToGLPosition(position);
|
|
51
|
+
// v_limp = vec2(0.0, 0.0);
|
|
52
|
+
// } else {
|
|
53
|
+
// vec2 position;
|
|
54
|
+
// if (radius < 1400.0) {
|
|
55
|
+
// position = circleLimpFromLongLatRadCenterMercatorCompass( center_position, radius/ cos(center_position.y), angle);
|
|
56
|
+
// } else {
|
|
57
|
+
// position = circleLimpFromLongLatRadCenterMercatorRealDistance( center_position, radius, angle);
|
|
58
|
+
// }
|
|
59
|
+
// v_limp = position;
|
|
60
|
+
// gl_Position = mercatorXYToGLPosition( position);
|
|
61
|
+
// }
|
|
62
|
+
// v_dash_ratio = dash_ratio;
|
|
63
|
+
// v_dash_opacity = dash_opacity;
|
|
64
|
+
// v_color = color;
|
|
65
|
+
// }`
|
|
66
|
+
// const fragmentShaderSource = `#version 300 es
|
|
67
|
+
// ${POLE}
|
|
68
|
+
// precision highp float;
|
|
69
|
+
// uniform float opacity;
|
|
70
|
+
// in vec4 v_color;
|
|
71
|
+
// in float v_dash_ratio;
|
|
72
|
+
// in float v_dash_opacity;
|
|
73
|
+
// in float interpolation;
|
|
74
|
+
// in vec2 v_limp;
|
|
75
|
+
// out vec4 color;
|
|
76
|
+
// void main() {
|
|
77
|
+
// if ( v_limp.x < -POLE || v_limp.x > POLE || v_limp.y < -POLE || v_limp.y > POLE ){ color = vec4(0.0,0.0,0.0,0.0); return; }
|
|
78
|
+
// color = v_color;
|
|
79
|
+
// color.a *= opacity;
|
|
80
|
+
// if ( v_dash_ratio == 1.0 || v_dash_ratio == 0.0 ) return;
|
|
81
|
+
// if (fract(interpolation / (2.0 * v_dash_ratio)) < 0.5 ) {
|
|
82
|
+
// color.a *= v_dash_opacity;
|
|
83
|
+
// }
|
|
84
|
+
// }
|
|
85
|
+
// `;
|
|
86
|
+
// class Logic {
|
|
87
|
+
// constructor(globe) {
|
|
88
|
+
// this.globe = globe;
|
|
89
|
+
// this.gl = globe.gl;
|
|
90
|
+
// this._lastOpacity = 1.0;
|
|
91
|
+
// this.program = createProgram(this.gl, vertexShaderSource, fragmentShaderSource);
|
|
92
|
+
// const { gl, program } = this;
|
|
93
|
+
// this.program.uniforms = {
|
|
94
|
+
// opacity: gl.getUniformLocation(program, "opacity")
|
|
95
|
+
// };
|
|
96
|
+
// { // initial uniform values
|
|
97
|
+
// const currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
|
|
98
|
+
// gl.useProgram(program);
|
|
99
|
+
// gl.uniform1f(program.uniforms.opacity, 1.0);
|
|
100
|
+
// gl.useProgram(currentProgram);
|
|
101
|
+
// }
|
|
102
|
+
// { // assign attribute locations
|
|
103
|
+
// gl.bindAttribLocation(program, 0, "center_position");
|
|
104
|
+
// gl.bindAttribLocation(program, 1, "radius");
|
|
105
|
+
// gl.bindAttribLocation(program, 2, "color");
|
|
106
|
+
// gl.bindAttribLocation(program, 3, "dash_ratio");
|
|
107
|
+
// gl.bindAttribLocation(program, 4, "dash_opacity");
|
|
108
|
+
// }
|
|
109
|
+
// this.cameraBindingPoint = 0;
|
|
110
|
+
// this.cameraBlockTotem = CameraUniformBlockTotemCache.get(globe);
|
|
111
|
+
// const cameraBlockLocation = gl.getUniformBlockIndex(program, "CameraUniformBlock");
|
|
112
|
+
// gl.uniformBlockBinding(program, cameraBlockLocation, this.cameraBindingPoint);
|
|
113
|
+
// }
|
|
114
|
+
// createVAO(centerObj, radiusObj, colorObj, dashRatioObj, dashOpacityObj) {
|
|
115
|
+
// const { gl } = this;
|
|
116
|
+
// const vao = gl.createVertexArray();
|
|
117
|
+
// const divisor = 1;
|
|
118
|
+
// gl.bindVertexArray(vao);
|
|
119
|
+
// { // make this a function end import from account module.
|
|
120
|
+
// const { buffer, stride = 0, offset = 0 } = centerObj;
|
|
121
|
+
// vaoAttributeLoader(gl, buffer, 0, 2, stride, offset, divisor);
|
|
122
|
+
// }
|
|
123
|
+
// {
|
|
124
|
+
// const { buffer, stride = 0, offset = 0 } = radiusObj;
|
|
125
|
+
// vaoAttributeLoader(gl, buffer, 1, 1, stride, offset, divisor);
|
|
126
|
+
// }
|
|
127
|
+
// {
|
|
128
|
+
// const { buffer, stride = 0, offset = 0 } = colorObj;
|
|
129
|
+
// vaoAttributeLoader(gl, buffer, 2, 4, stride, offset, divisor);
|
|
130
|
+
// }
|
|
131
|
+
// {
|
|
132
|
+
// const { buffer, stride = 0, offset = 0 } = dashRatioObj;
|
|
133
|
+
// vaoAttributeLoader(gl, buffer, 3, 1, stride, offset, divisor);
|
|
134
|
+
// }
|
|
135
|
+
// {
|
|
136
|
+
// const { buffer, stride = 0, offset = 0 } = dashOpacityObj;
|
|
137
|
+
// vaoAttributeLoader(gl, buffer, 4, 1, stride, offset, divisor);
|
|
138
|
+
// }
|
|
139
|
+
// gl.bindVertexArray(null);
|
|
140
|
+
// gl.bindVertexArray(null);
|
|
141
|
+
// return vao;
|
|
142
|
+
// }
|
|
143
|
+
// draw(vao, length, opacity) {
|
|
144
|
+
// const { gl, program, cameraBlockTotem, cameraBindingPoint } = this;
|
|
145
|
+
// gl.useProgram(program);
|
|
146
|
+
// if (this._lastOpacity !== opacity) {
|
|
147
|
+
// gl.uniform1f(program.uniforms.opacity, opacity);
|
|
148
|
+
// this._lastOpacity = opacity;
|
|
149
|
+
// }
|
|
150
|
+
// gl.bindVertexArray(vao);
|
|
151
|
+
// cameraBlockTotem.bind(cameraBindingPoint);
|
|
152
|
+
// gl.drawArraysInstanced(gl.LINE_STRIP, 0, EDGE_COUNT_ON_SPHERE + 1, length);
|
|
153
|
+
// cameraBlockTotem.unbind(cameraBindingPoint);
|
|
154
|
+
// gl.bindVertexArray(null);
|
|
155
|
+
// }
|
|
156
|
+
// free() {
|
|
157
|
+
// if (this.isFreed) return;
|
|
158
|
+
// CameraUniformBlockTotemCache.release(this.globe);
|
|
159
|
+
// this.gl.deleteProgram(this.program);
|
|
160
|
+
// this.isFreed = true;
|
|
161
|
+
// }
|
|
162
|
+
// }
|
|
163
|
+
// export const CircleCache = Object.freeze({
|
|
164
|
+
// get: (globe) => noRegisterGlobeProgramCache.getProgram(globe, Logic),
|
|
165
|
+
// release: (globe) => noRegisterGlobeProgramCache.releaseProgram(globe, Logic)
|
|
166
|
+
// });
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { createProgram } from "
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import "
|
|
8
|
-
import
|
|
9
|
-
import "
|
|
10
|
-
import
|
|
11
|
-
import "../../util/gl-util/draw-options/types";
|
|
1
|
+
import { createProgram } from "../../../util/webglobjectbuilders";
|
|
2
|
+
import { CameraUniformBlockString, CameraUniformBlockTotemCache } from "../../totems/index";
|
|
3
|
+
import { cartesian3DToGLPosition, mercatorXYToGLPosition, } from "../../../util/shaderfunctions/geometrytransformations";
|
|
4
|
+
import { noRegisterGlobeProgramCache } from "../../programcache";
|
|
5
|
+
import { attributeLoader } from "../../../util/gl-util/buffer/attribute-loader";
|
|
6
|
+
import "../../../util/gl-util/buffer/attribute-loader";
|
|
7
|
+
import { UniformBlockManager } from "../../../util/gl-util/uniform-block/manager";
|
|
8
|
+
import "../../../util/gl-util/uniform-block/types";
|
|
9
|
+
import { drawArrays } from "../../../util/gl-util/draw-options/methods";
|
|
10
|
+
import "../../../util/gl-util/draw-options/types";
|
|
12
11
|
const ESCAPE_VALUE = -1;
|
|
13
12
|
const uniformBindingPoints = {
|
|
14
13
|
camera: 0,
|
|
15
14
|
flexible: 1,
|
|
16
15
|
};
|
|
17
|
-
const one = new Float32Array([1]);
|
|
16
|
+
// const one = new Float32Array([1]);
|
|
18
17
|
const flexibleBlockManager = new UniformBlockManager('FlexibleAttributes', [
|
|
19
18
|
{ name: "u_color", type: "vec4", value: new Float32Array([0.12, 1, 0.1, 1]) },
|
|
20
|
-
{ name: "u_dash_opacity", type: "float", value: one },
|
|
21
|
-
{ name: "u_dash_length", type: "float", value: one },
|
|
19
|
+
// { name: "u_dash_opacity", type: "float", value: one },
|
|
20
|
+
// { name: "u_dash_length", type: "float", value: one },
|
|
22
21
|
], uniformBindingPoints.flexible);
|
|
23
22
|
const vertexShaderSource = `#version 300 es
|
|
24
23
|
precision highp float;
|
|
@@ -32,11 +31,11 @@ ${flexibleBlockManager.glslCode()}
|
|
|
32
31
|
in vec3 position3d;
|
|
33
32
|
in vec2 position2d;
|
|
34
33
|
in vec4 color;
|
|
35
|
-
in float dash_length;
|
|
36
|
-
in float dash_opacity;
|
|
34
|
+
// in float dash_length;
|
|
35
|
+
// in float dash_opacity;
|
|
37
36
|
|
|
38
|
-
out float v_dash_length;
|
|
39
|
-
out float v_dash_opacity;
|
|
37
|
+
// out float v_dash_length;
|
|
38
|
+
// out float v_dash_opacity;
|
|
40
39
|
out vec4 v_color;
|
|
41
40
|
|
|
42
41
|
flat out vec3 v_flat_position;
|
|
@@ -45,8 +44,8 @@ out vec3 v_position;
|
|
|
45
44
|
void main() {
|
|
46
45
|
|
|
47
46
|
v_color = ( color.r == -1.0 ) ? u_color : color;
|
|
48
|
-
v_dash_length = ( dash_length == -1.0 ) ? u_dash_length : dash_length;
|
|
49
|
-
v_dash_opacity = ( dash_opacity == -1.0 ) ? u_dash_opacity : dash_opacity;
|
|
47
|
+
// v_dash_length = ( dash_length == -1.0 ) ? u_dash_length : dash_length;
|
|
48
|
+
// v_dash_opacity = ( dash_opacity == -1.0 ) ? u_dash_opacity : dash_opacity;
|
|
50
49
|
|
|
51
50
|
if ( is3D ) {
|
|
52
51
|
gl_Position = cartesian3DToGLPosition( position3d );
|
|
@@ -57,7 +56,7 @@ void main() {
|
|
|
57
56
|
v_position = vec3( position2d, 0.0 );
|
|
58
57
|
v_flat_position = vec3( position2d, 0.0 );
|
|
59
58
|
}
|
|
60
|
-
gl_PointSize =
|
|
59
|
+
gl_PointSize = 6.0;
|
|
61
60
|
}`;
|
|
62
61
|
const fragmentShaderSource = `#version 300 es
|
|
63
62
|
precision highp float;
|
|
@@ -71,24 +70,23 @@ in float v_dash_opacity;
|
|
|
71
70
|
flat in vec3 v_flat_position;
|
|
72
71
|
in vec3 v_position;
|
|
73
72
|
|
|
74
|
-
|
|
75
73
|
out vec4 outColor;
|
|
76
74
|
|
|
77
75
|
void main() {
|
|
78
76
|
outColor = v_color;
|
|
79
77
|
return;
|
|
80
|
-
float dash_length = v_dash_length;
|
|
81
|
-
float dash_opacity = v_dash_opacity;
|
|
78
|
+
// float dash_length = v_dash_length;
|
|
79
|
+
// float dash_opacity = v_dash_opacity;
|
|
82
80
|
|
|
83
|
-
if ( dash_length == 0.0 ) {
|
|
84
|
-
outColor = vec4( v_color.rgb, v_color.a
|
|
85
|
-
} else {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
81
|
+
// if ( dash_length == 0.0 ) {
|
|
82
|
+
outColor = vec4( v_color.rgb, v_color.a );
|
|
83
|
+
// } else {
|
|
84
|
+
// float dist = distance( v_flat_position, v_position );
|
|
85
|
+
// // float alpha = mod( dist , v_dash_length * 2.0 ) / v_dash_length < 1.0 ? 1.0 : v_dash_opacity;
|
|
86
|
+
// outColor = vec4( 1.0, 1.0, 1.0, v_color.a * opacity *alpha);
|
|
87
|
+
// }
|
|
90
88
|
}`;
|
|
91
|
-
class
|
|
89
|
+
export class LineProgram {
|
|
92
90
|
_vaosPublished = [];
|
|
93
91
|
_ubosPublished = [];
|
|
94
92
|
program;
|
|
@@ -112,8 +110,8 @@ class Logic {
|
|
|
112
110
|
this.gl.bindAttribLocation(this.program, 0, "position3d");
|
|
113
111
|
this.gl.bindAttribLocation(this.program, 1, "position2d");
|
|
114
112
|
this.gl.bindAttribLocation(this.program, 2, "color");
|
|
115
|
-
this.gl.bindAttribLocation(this.program, 3, "dash_length");
|
|
116
|
-
this.gl.bindAttribLocation(this.program, 4, "dash_opacity");
|
|
113
|
+
// this.gl.bindAttribLocation(this.program, 3, "dash_length");
|
|
114
|
+
// this.gl.bindAttribLocation(this.program, 4, "dash_opacity");
|
|
117
115
|
this.cameraBlockTotem = CameraUniformBlockTotemCache.get(globe);
|
|
118
116
|
this.cameraBlockTotem.assignBindingPoint(this.program, uniformBindingPoints.camera);
|
|
119
117
|
flexibleBlockManager.assignBindingPoint(this.gl, this.program);
|
|
@@ -125,15 +123,16 @@ class Logic {
|
|
|
125
123
|
this._ubosPublished.push(ubo);
|
|
126
124
|
return ubo;
|
|
127
125
|
}
|
|
128
|
-
createVAO(position3D, position2D, color
|
|
126
|
+
createVAO(position3D, position2D, color //, dashLength: BufferAndReadInfo, dashOpacity: BufferAndReadInfo,
|
|
127
|
+
) {
|
|
129
128
|
const { gl } = this;
|
|
130
129
|
const vao = gl.createVertexArray();
|
|
131
130
|
gl.bindVertexArray(vao);
|
|
132
131
|
attributeLoader(gl, position3D, 0, 3);
|
|
133
132
|
attributeLoader(gl, position2D, 1, 2);
|
|
134
133
|
attributeLoader(gl, color, 2, 4, { escapeValues: [ESCAPE_VALUE, ESCAPE_VALUE, ESCAPE_VALUE, ESCAPE_VALUE] });
|
|
135
|
-
attributeLoader(gl, dashLength, 3, 1, { escapeValues: [ESCAPE_VALUE] });
|
|
136
|
-
attributeLoader(gl, dashOpacity, 4, 1, { escapeValues: [ESCAPE_VALUE] });
|
|
134
|
+
// attributeLoader(gl, dashLength, 3, 1, { escapeValues: [ESCAPE_VALUE] });
|
|
135
|
+
// attributeLoader(gl, dashOpacity, 4, 1, { escapeValues: [ESCAPE_VALUE] });
|
|
137
136
|
gl.bindVertexArray(null);
|
|
138
137
|
return vao;
|
|
139
138
|
}
|
|
@@ -164,6 +163,6 @@ class Logic {
|
|
|
164
163
|
}
|
|
165
164
|
}
|
|
166
165
|
export const LineStripProgramCache = Object.freeze({
|
|
167
|
-
get: (globe) => noRegisterGlobeProgramCache.getProgram(globe,
|
|
168
|
-
release: (globe) => noRegisterGlobeProgramCache.releaseProgram(globe,
|
|
166
|
+
get: (globe) => noRegisterGlobeProgramCache.getProgram(globe, LineProgram),
|
|
167
|
+
release: (globe) => noRegisterGlobeProgramCache.releaseProgram(globe, LineProgram),
|
|
169
168
|
});
|