@pirireis/webglobeplugins 0.15.3-alpha → 0.15.5-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/bearing-line/plugin.js +3 -2
- package/package.json +1 -1
- package/range-tools-on-terrain/circle-line-chain/chain-list-map.js +3 -0
- package/range-tools-on-terrain/circle-line-chain/plugin.js +1 -1
- package/semiplugins/lightweight/line-plugin.js +1 -0
- package/semiplugins/shape-on-terrain/circle-plugin.js +6 -0
package/bearing-line/plugin.js
CHANGED
|
@@ -397,8 +397,9 @@ export default class BearingLinePlugin {
|
|
|
397
397
|
const drawRange = { first: 0, count: this.bufferOrchestrator.length };
|
|
398
398
|
this.lineProgram.draw(this.lineVao, { drawRange }, this._opacity);
|
|
399
399
|
if (this.drawAngleRing) {
|
|
400
|
-
this.pieceOfPieProgram.
|
|
401
|
-
this.pieceOfPieProgram.draw(this.bufferOrchestrator.length, this.ringVao, 360,
|
|
400
|
+
this.pieceOfPieProgram._defaultFlexibleUBO.updateSingle("u_opacity", this._opacity * 0.8);
|
|
401
|
+
this.pieceOfPieProgram.draw(this.bufferOrchestrator.length, this.ringVao, 360, RINGPARTIAL_DRAW_MODE.TRIANGLE_FAN);
|
|
402
|
+
this.pieceOfPieProgram.draw(this.bufferOrchestrator.length, this.ringVao, 360, RINGPARTIAL_DRAW_MODE.LINE_STRIP);
|
|
402
403
|
}
|
|
403
404
|
if (this.drawBearingLine) {
|
|
404
405
|
// this.lineProgram.draw(this.bearingLineVAO, this.bufferOrchestrator.length, this._opacity );
|
package/package.json
CHANGED
|
@@ -79,6 +79,9 @@ export class ChainListMap {
|
|
|
79
79
|
deleteKeys.push(chain[chain.length - 2].__identity__);
|
|
80
80
|
deleteKeys.push(chain[chain.length - 1].__identity__);
|
|
81
81
|
}
|
|
82
|
+
else if (chain.length === 1) {
|
|
83
|
+
deleteKeys.push(lastItem.__identity__);
|
|
84
|
+
}
|
|
82
85
|
}
|
|
83
86
|
else {
|
|
84
87
|
newChain.push(lastItem);
|
|
@@ -294,10 +294,10 @@ export class CircleLineChainPlugin {
|
|
|
294
294
|
for (const chainKey of chainKeys) {
|
|
295
295
|
// Clean chains from text writers
|
|
296
296
|
const nodeKeys = this._chainListMap.getNodeKeysOfChain(chainKey);
|
|
297
|
-
nodeKeys.pop(); // Remove the last key which is destination of the last circle
|
|
298
297
|
this._textWritersMap.forEach((writer) => {
|
|
299
298
|
writer.deleteTextBulk(nodeKeys);
|
|
300
299
|
});
|
|
300
|
+
nodeKeys.pop(); // Remove the last key which is destination of the last circle
|
|
301
301
|
// Clean chains from semi-plugins
|
|
302
302
|
this.circlePlugin?.deleteBulk(nodeKeys);
|
|
303
303
|
this.linePlugin?.deleteBulk(nodeKeys);
|
|
@@ -30,6 +30,7 @@ export class LinePlugin {
|
|
|
30
30
|
this.gl = gl;
|
|
31
31
|
this.program = LineOnGlobeCache.get(globe);
|
|
32
32
|
this._uboHandler = this.program.createUBO();
|
|
33
|
+
this.setDefaultColor(this._options.defaultColor);
|
|
33
34
|
this._bufferOrchestrator = new BufferMapOrchestrator(gl, this._createBufferDetailsMap(), 10 // initial capacity
|
|
34
35
|
);
|
|
35
36
|
this.vao = this.program.createVAO(...this._createSelectBufferNames().map((key) => {
|
|
@@ -125,6 +125,7 @@ export class CircleOnTerrainPlugin {
|
|
|
125
125
|
this._vao = this.lineProgram.createVAO(createBufferAndReadInfo(this.bufferManagerMap.get("position3d")?.bufferManager.buffer), createBufferAndReadInfo(this.bufferManagerMap.get("position2d")?.bufferManager.buffer), this._styleOptions.variativeColorsOn ?
|
|
126
126
|
createBufferAndReadInfo(this.bufferManagerMap.get("color")?.bufferManager.buffer) : null);
|
|
127
127
|
this._circleUBOHandler = this.lineProgram.createUBO();
|
|
128
|
+
this.setDefaultColor(this._styleOptions.defaultColor);
|
|
128
129
|
this._cameraUniformBlock = CameraUniformBlockTotemCache.get(globe);
|
|
129
130
|
}
|
|
130
131
|
insertBulk(circles) {
|
|
@@ -141,6 +142,11 @@ export class CircleOnTerrainPlugin {
|
|
|
141
142
|
console.warn(`CircleOnTerrainPlugin: Circle input is missing required properties: ${circleInput.radius} or ${circleInput.center} or ${circleInput.key}`);
|
|
142
143
|
continue;
|
|
143
144
|
}
|
|
145
|
+
if (circleInput.radius <= 0) {
|
|
146
|
+
console.warn(`CircleOnTerrainPlugin: Circle ${circleInput.key} has non-positive radius
|
|
147
|
+
${circleInput.radius}. Skipping.`);
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
144
150
|
fillStaticKeys.push(circleInput.key);
|
|
145
151
|
const circleForAzimuthCalc = CircleMethods.createCircleClosestAzimuthAngleProperties(circleInput);
|
|
146
152
|
this.circleMap.set(circleInput.key, [circleInput, circleForAzimuthCalc]);
|