<h5 dir="auto">Description of the problem</h5>
<h3 dir="auto">Hi there,</h3>
<p dir="auto">I am currently using WebWorkers to generate large <code class="notranslate">Float32Array</code>'s (size about 128000) and pass them back to the DOM-thread where they are sliced into smaller pieces and set in several different position-attribute-buffers.</p>
<p dir="auto">I only need Two-Dimensional coordiinates <strong>X and Y</strong> for this and <strong>Z is always 0</strong>.</p>
<p dir="auto">So I created the attribute liike this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// position attribute (2 vertices per point)
geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(mySize * 2), 2));"><pre class="notranslate"><code class="notranslate">// position attribute (2 vertices per point)
geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(mySize * 2), 2));
</code></pre></div>
<p dir="auto">instead of this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// position attribute (3 vertices per point)
geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(mySize * 3), 3));"><pre class="notranslate"><code class="notranslate">// position attribute (3 vertices per point)
geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(mySize * 3), 3));
</code></pre></div>
<p dir="auto">I did this in order to save some overhead (Z) when passing the data from the worker.<br>
Otherwise I would have to process the array manually, which is not really efficient.</p>
<p dir="auto">Using 2 vertices per point seems to work as intended, <strong>BUT</strong> in my case the console it's printing more than 200 of these INFO messages:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[0625/160435.634:INFO:CONSOLE(541)] &quot;THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The &quot;position&quot; attribute is likely to have NaN values.&quot;, source: file:///D:/#####/js/three.min.js (541)"><pre class="notranslate"><code class="notranslate">[0625/160435.634:INFO:CONSOLE(541)] "THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.", source: file:///D:/#####/js/three.min.js (541)
</code></pre></div>
<p dir="auto">Since this is blowing up the log files, I didn't find a way to disable it and it seems to work as intended otherwise, I was wondering if this message could be removed.</p>
<p dir="auto">Here is a short fiddle of this:    <a href="https://jsfiddle.net/th2zvr9p/" rel="nofollow">https://jsfiddle.net/th2zvr9p/</a></p>
<p dir="auto">Notice how it works the same for either "dimensions" 2 or 3, but it prints the error when using dimension 2.</p>
<p dir="auto">This might be related?    <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="309291002" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/13713" data-hovercard-type="pull_request" data-hovercard-url="/mrdoob/three.js/pull/13713/hovercard" href="https://github.com/mrdoob/three.js/pull/13713">#13713</a></p>
<p dir="auto">I'd be glad to provide more help and infos :)</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Latest</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Chrome (&amp; Engine Framework), but probably all of them are affected?</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>
<p dir="auto">Got a 1080ti, but dont think that matters.</p>
<p dir="auto">For geometries with vec2 positions, the computeBoundingSphere will not work correctly since it always assumes vec3s.</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/mrdoob/three.js/blob/f73593b00e3b2c927bb1a3236240cea5597166ec/src/core/BufferGeometry.js#L327-L332">three.js/src/core/BufferGeometry.js</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 327 to 332
      in
      <a data-pjax="true" class="commit-tease-sha" href="/mrdoob/three.js/commit/f73593b00e3b2c927bb1a3236240cea5597166ec">f73593b</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L327" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="327"></td>
          <td id="LC327" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">for</span> <span class="pl-kos">(</span> <span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s1">il</span> <span class="pl-c1">=</span> <span class="pl-s1">positions</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-s1">il</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">+=</span> <span class="pl-c1">3</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L328" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="328"></td>
          <td id="LC328" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">  </td>
        </tr>

        <tr class="border-0">
          <td id="L329" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="329"></td>
          <td id="LC329" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> 	<span class="pl-s1">vector</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span> <span class="pl-s1">positions</span><span class="pl-kos">[</span> <span class="pl-s1">i</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">positions</span><span class="pl-kos">[</span> <span class="pl-s1">i</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">positions</span><span class="pl-kos">[</span> <span class="pl-s1">i</span> <span class="pl-c1">+</span> <span class="pl-c1">2</span> <span class="pl-kos">]</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L330" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="330"></td>
          <td id="LC330" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> 	<span class="pl-s1">box</span><span class="pl-kos">.</span><span class="pl-en">expandByPoint</span><span class="pl-kos">(</span> <span class="pl-s1">vector</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L331" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="331"></td>
          <td id="LC331" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">  </td>
        </tr>

        <tr class="border-0">
          <td id="L332" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="332"></td>
          <td id="LC332" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>