@pirireis/webglobeplugins 0.15.18-alpha → 0.15.19-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pirireis/webglobeplugins",
3
- "version": "0.15.18-alpha",
3
+ "version": "0.15.19-alpha",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@ const _0vec3 = /* @__PURE__ */ [0, 0, 0];
14
14
  * @typedef {Array<Point>, rgba, trackID} Track
15
15
  */
16
16
  class PointTracksPlugin {
17
- constructor(id, { pointSize = 2, hoveredPointSize = 4, selectionPointFilling = 4, opacity = 1.0, objectStoreExtraParameters = ["long", "lat", "height"] } = {}) {
17
+ constructor(id, { pointSize = 2, hoveredPointSize = 4, selectionPointFilling = 4, opacity = 1.0, objectStoreExtraParameters = ["long", "lat", "height"], initialCapacity = 10000000 } = {}) {
18
18
  this.id = id;
19
19
  this._isFreed = false;
20
20
  this._pointProgram = null;
@@ -38,6 +38,7 @@ class PointTracksPlugin {
38
38
  this._objectStoreExtraParametersFiltered = objectStoreExtraParameters.filter(param => {
39
39
  return !["long", "lat", "height", "ID", "trackID"].includes(param);
40
40
  });
41
+ this._bufferOrchestrator = new BufferOrchestrator({ capacity: initialCapacity });
41
42
  }
42
43
  init(globe, gl) {
43
44
  this.globe = globe;
@@ -49,9 +50,8 @@ class PointTracksPlugin {
49
50
  }
50
51
  _initBufferManagers() {
51
52
  const { gl } = this;
52
- const initialCapacity = 10;
53
+ const initialCapacity = this._bufferOrchestrator.capacity;
53
54
  const bufferType = "DYNAMIC_DRAW";
54
- this._bufferOrchestrator = new BufferOrchestrator({ initialCapacity });
55
55
  this._bufferManagersMap = new Map([
56
56
  ["pos3D", {
57
57
  bufferManager: new BufferManager(gl, 3, { bufferType, initialCapacity }),
@@ -63,8 +63,6 @@ export class BufferManager {
63
63
  insertConsecutiveBulk(items, offset, adapter, Constructor = Float32Array) {
64
64
  const { gl, buffer, itemSize } = this;
65
65
  const cpuBuffer = new Constructor(itemSize * items.length);
66
- console.log('cpuBuffer', cpuBuffer);
67
- console.log(typeof cpuBuffer);
68
66
  for (let i = 0; i < items.length; i++) {
69
67
  cpuBuffer.set(adapter(items[i]), i * itemSize);
70
68
  }