@pirireis/webglobeplugins 1.4.4 → 1.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pirireis/webglobeplugins",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT",
@@ -55,7 +55,9 @@ ${relativeBBoxPositionRadian}
55
55
 
56
56
 
57
57
  void main() {
58
-
58
+ float elevation = ${WORLD_RADIUS_3D};
59
+ float altitude = 20000.0;
60
+ bool hasDemSample = false;
59
61
 
60
62
  // Always define v_index to avoid undefined varyings when picking is disabled.
61
63
 
@@ -72,9 +74,6 @@ void main() {
72
74
  // Always define v_index to avoid undefined varyings when picking is disabled.
73
75
  v_index = a_index;
74
76
 
75
-
76
- float elevation = ${WORLD_RADIUS_3D};
77
- float altitude = 20000.0;
78
77
  if (is3D == true) {
79
78
  for (int i = 0; i < 6; i++) {
80
79
  if( i == u_breakLoopIndex - 1 ) {
@@ -1,6 +1,11 @@
1
1
  export class ObjectStore {
2
2
  _container;
3
- buffer = undefined; // For compatibility with BufferManager interface
3
+ // BufferManager interface properties
4
+ gl = null;
5
+ buffer = null;
6
+ itemSize = 1;
7
+ bufferType = "NONE";
8
+ isFreed = false;
4
9
  constructor({ initialCapacity = 10 } = {}) {
5
10
  this._container = this._createEmptyList(initialCapacity);
6
11
  }
@@ -24,11 +29,11 @@ export class ObjectStore {
24
29
  }
25
30
  }
26
31
  }
27
- insertBlock(objects, startOffset) {
28
- for (let i = 0; i < objects.length; i++) {
29
- const object = objects[i];
30
- const offset = startOffset + i;
31
- this._container[offset] = object;
32
+ insertBlock(items, offset, adaptor, dataConstructor) {
33
+ for (let i = 0; i < items.length; i++) {
34
+ const item = items[i];
35
+ const targetOffset = offset + i;
36
+ this._container[targetOffset] = adaptor(item);
32
37
  }
33
38
  }
34
39
  defrag(offsetValues, occupiedCapacity, newCapacity) {
@@ -52,5 +57,9 @@ export class ObjectStore {
52
57
  return this._container[index];
53
58
  }
54
59
  free() {
60
+ if (this.isFreed)
61
+ return;
62
+ this._container = [];
63
+ this.isFreed = true;
55
64
  }
56
65
  }