Encountering difficulties when trying to adjust the position attribute of the Buffer Geometry

When setting the position attributes of the buffer geometry using Math.sin() and Math.cos(), I encountered an error.

THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.

https://i.sstatic.net/Gj9Rj.png

I am hoping to resolve this issue without any errors and simply fill in the value as expected.

Answer №1

The issue lies in your utilization of Math.PI.branches, a non-existent property, causing the value of branchAngle to become NaN (Not a Number). As a result, any calculations involving branchAngle will also become NaN, rendering your BufferGeometry invalid.

Furthermore, it is advised to refrain from sharing code snippets through screenshots and instead opt for directly pasting the code in text format.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Automate Spreadsheet Updates with Google Apps Script

I'm currently facing an issue while trying to paste csv data into a Google Sheet using the code provided below. Strangely, when I execute myFunction(), the data quickly appears in the Google Sheet but then vanishes instantly, almost as if sheet.clear( ...

Issue with AdonisJS Lucid idempotent methods and the updateOrCreateMany() function

Seeking clarification on a 500 error related to a specific attribute in the database while using updateOrCreateMany(), as opposed to no error when using updateOrCreate(). Here is the code snippet for updateOrCreateMany(): const payload = [ { githubI ...

There seems to be a problem with the JavaScript function as the indexOf property is undefined

function filteredArray(arr, elem) { let newArr = []; Iterating through each element of the multidimensional array. for (let i=0;i<arr.length;i++){ for (let j=0;j<arr[i].length;j++){ If the value matches the argument passed, assi ...

Update ngx-datatable when the user clicks on a different directive

My issue involves a Side Navigation with a docking feature and a data table in the Main View. When I undock the side navigation, the data table does not recalculate automatically, leaving empty space where the Side Navigation was. This requires me to manua ...

Ways to display the values of angular variables within ng-bind-html

Converting HTML content from a database saved as varchar to front end JavaScript code can be tricky. The content is stored in a variable called vm.htmlContent and must be displayed as HTML on a web page. To achieve this, the ng-bind-html angular directive ...

How can I implement a toggle button to display additional details for a specific row within a table created using React.js?

I'm currently working on a project using Next.js and have come across an unexpected issue. Upon reading a JSON file, I populate a table with the data retrieved from it. Each piece of information in the table has hidden details that should only be reve ...

What is the best method for recording caught exceptions?

While winston does a great job of handling uncaught exceptions and logging information about them, I'm wondering how I can achieve the same for "caught exceptions"? if (err) { // need to figure out how to log the caught exception here } Upon inspec ...

The column headers are not being shown in Jquery datatables

This particular question is related to the thread found here. Nevertheless, my situation differs slightly. I am looking to implement the same datatables example from the aforementioned question, which can be accessed here. In that example, you must provide ...

Retrieve the JQuery element using its ID or class identifier

I need some assistance with retrieving the innerHTML of element number 5 in a JQUERY Object. Can someone provide guidance on how to achieve this? Your help is greatly appreciated. ...

Shrinking Texture Size in ThreeJS without Repeating with UV Coordinates

Greetings, I am a newcomer to the world of ThreeJS and texture mapping. Imagine having a 3D-Plane with dimensions of (1000x1000x1). When a texture is applied to it, it either repeats or scales to fill the entire plane. My goal is to dynamically alter the ...

Adjust the size of the event bar on the FullCalendar resourceTimeline view

In my implementation of FullCalendar v6, I am displaying 6 months worth of data in the calendar, with each slot representing a one-month period. The issue I am facing is that when creating an event spanning 10 days, it currently takes up the entire width o ...

Every time I use my NodeJS MySQL Query function, the results I get are never

Working on a new gaming project involving MySQL for multiplayer functionality. Issue arises when requesting specific queries, where the system retrieves incorrect data or results from previous queries. dat("SELECT * FROM server1;"); Misdirected queries r ...

Exploring Next.js: Leveraging fetch to retrieve data in getServerSideProps and passing it to the client via query parameters

I'm utilizing a getServerSideProps function on the directory page. pages/catalog/index.js export async function getServerSideProps(ctx) { const response = await fetch( `http://someDomen.com/api/ipro/catalog?${ctx?.query?.page ? `page=${ctx.quer ...

Attempting to utilize the LLL algorithm as described on Wikipedia has led to encountering significant challenges

I'm struggling with determining whether my issue stems from programming or understanding the LLL algorithm mentioned on Wikipedia. To gain a better understanding of the LLL algorithm, I attempted to implement it following the instructions outlined on ...

Dynamic Filtering with Reactjs Autocomplete Component (Material UI) using API calls on each input modification

Just starting out with Reactjs and looking to build an Autocomplete component that fetches API data on every input change to update the options. I've been using the Autocomplete component from Material UI but struggling to get it working as expected. ...

"Implement a feature to recognize and handle various file extensions within an npm

I need help with my npm script where I am trying to include both ts and tsx file extensions. My current code snippet is as follows: "test": "mocha ..... app/test/**/*.spec.{ts,tsx}" Unfortunately, the above syntax is not working correctly. Can someone pl ...

Calculate the total duration between two times and, if the difference is more than 10 minutes,

I need to calculate the duration between two dates, start_time and end_time. If the minutes component is greater than 10, I want to round up the hours component. For example: 12 minutes different - rounded up to 1 hour 1 hour 31 minutes difference - roun ...

What could be causing the delay in Angular events on devices?

Whenever I tap on an element on my mobile device, it triggers a specific action within the scope and updates smoothly. However, if I try to repeat the action immediately, it doesn't work as expected when using the standard .on('click') metho ...

Identifying HTTP Live Streaming on mobile devices

I am seeking a reliable method to determine if a mobile device can play HTTP Live Streaming (m3u8). Currently, I am using the following script for testing purposes: function isHLSEnabled() { var videoElement = document.createElement('video' ...

When attempting to call a function from a separate JavaScript file in Vue, the returned value is showing

My goal is to trigger my notification function from another JS file, but I keep getting an undefined error. The code snippet for the notification function in notification.js is as follows: function notification(message, level = 'success') { ...