viral-viewer-2 3.0.2 → 3.0.3

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.
@@ -4841,9 +4841,6 @@ function workerFunction() {
4841
4841
  constructor() {
4842
4842
  super();
4843
4843
  this.isObject3D = true;
4844
- this.isInstancedMesh = false;
4845
- this.instanceMatrix = new InstancedBufferAttribute(new Float32Array(count * 16), 16);
4846
- this.instanceColor = null;
4847
4844
  Object.defineProperty(this, "id", { value: _object3DId++ });
4848
4845
  this.uuid = generateUUID();
4849
4846
  this.name = "";
@@ -34169,6 +34166,11 @@ function workerFunction() {
34169
34166
  childMesh.instanceMatrix.needsUpdate = true;
34170
34167
  childMesh.updateMatrix();
34171
34168
  let jsonData = childMesh.toJSON();
34169
+ jsonData.object.type = "InstancedMesh";
34170
+ jsonData.object.count = childMesh.count;
34171
+ jsonData.object.instanceMatrix = childMesh.instanceMatrix.toJSON();
34172
+ if (this.instanceColor !== null)
34173
+ jsonData.object.instanceColor = childMesh.instanceColor.toJSON();
34172
34174
  console.log(jsonData);
34173
34175
  self.postMessage(jsonData);
34174
34176
  }