There appears to be an issue with Three.js as it is indicating that the node.apply

I am currently attempting to import a .fbx file using the FBXLoader from three.js with the following code block:

var fbxLoader = new THREE.FBXLoader();
fbxLoader.load('assets/item2.fbx', function (object){
object.position.y = -100;
scene.add(object);
console.log("Object inserted.");     
fitCameraToObject(camera, object, 2, controls);
controls.update();
animate();
},
function (xhr) {
    console.log((xhr.loaded / xhr.total * 100) + '% loaded');
    },
function (err) 
{
    console.error(err);
} 
);

(Lines 122-138)

Upon loading my webpage, I encountered an error in webGLLoader.js as follows:

8.514530412006819% loaded
webGLLoader.js:132 100% loaded
FBXLoader.js:3252 THREE.FBXLoader: FBX binary version: 7400
webGLLoader.js:136 TypeError: node.applyMatrix4 is not a function
    at FBXLoader.js:827
    at Mesh.traverse (three.js:5686)
    at Group.traverse (three.js:5692)
    at FBXTreeParser.parseScene (FBXLoader.js:819)
    at FBXTreeParser.parse (FBXLoader.js:130)
    at FBXLoader.parse (FBXLoader.js:102)
    at Object.onLoad (FBXLoader.js:54)
    at XMLHttpRequest.<anonymous> (three.js:35758)
(anonymous) @ webGLLoader.js:136
(anonymous) @ FBXLoader.js:60
setTimeout (async)
(anonymous) @ FBXLoader.js:58
(anonymous) @ three.js:35758
load (async)
load @ three.js:35736
load @ FBXLoader.js:50
(anonymous) @ webGLLoader.js:123 

Answer №1

On a separate note, this issue has been previously addressed on github: https://github.com/mrdoob/three.js/issues/18523

The main problem arises from the use of an outdated version of FBXLoader that is not compatible with the core three.js library. It is imperative that files like FBXLoader and three.js are aligned in terms of their release versions. I recommend updating both files to the most recent version, as this should resolve the runtime error.

three.js R113

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

"Enhance your website with dynamic uploader forms and AJAX scripts - Railscast #383 shows you

I've successfully implemented the uploader functionality from Railscast #383, but I'm wondering if it's possible to dynamically add and remove the uploader link using ajax? Additionally, I'd need to include the "service" instance id wh ...

How can I put a row at full-width in a Material-UI table in React

I need assistance with displaying data in a table using JSX code: const StudentsTable = (props) => { const classes = useStyles(); return ( <TableContainer component={Paper}> <Table className={classes.table} aria-label="simple ...

Creating a JSON object from two arrays is a simple process

Consider the following two arrays: let values = ["52", "71", "3", "45", "20", "12", "634", "21"]; let names = ["apple", "orange", "strawberry", &q ...

I have a question about CSS selectors: How can I change the font color of a parent <li> element when the child

After struggling for hours, I'm finally throwing in the towel on this issue. I have an unordered list with no background at the top level and text color of #fff. When rolled over, the background turns #fff and the text color turns #000. The child ul ...

How to redirect to a different view or controller using ASP.NET and AngularJS

How can I open the View located at /Home/CreateItem after clicking on the Add button? What do I need to include in my code? $scope.Add = function() { console.log('working'); } This is how Index.cshtml looks like: <script src="~/ ...

Strategies to manage or prevent a timezone offset while deploying a Next.js application on Vercel

Is there a way to ensure that a React/Next.js App always displays the local time in CEST, regardless of the user's location? For example, if I receive GMT time from the backend and want to offset it to display the CEST timezone, how can I achieve this ...

The art of designing Mongoose and Router files

Let me share my directory structure with you: bin/ www models/ myMongooseModel.js public/ ... routes/ index.js anotherroute.js views/ ... app.js package.json In my app.js file, I have configured some settings using app.set and app.use comman ...

Encountering an error when attempting to generate a production build after running the npm install command with the

After adding the brotli-webpack-plugin as a devDependency, I encountered an issue when attempting to generate a production build using npm run build (which internally runs next build). The error message displayed was: Error: Cannot find module 'bro ...

Is there a way to avoid waiting for both observables to arrive and utilize the data from just one observable within the switchmap function?

The code snippet provided below aims to immediately render the student list without waiting for the second observable. However, once the second observable is received, it should verify that the student is not enrolled in all courses before enabling the but ...

What is the method for obtaining an element with a class name that does not match a specific value?

I'm trying to figure out how to select an element with a class name that is different from the value passed in. For example: $(document).ready(function () { $(document).on('change', '#allRolesDD', function () { var toS ...

I am experiencing an issue with my service provider when it comes to displaying multiple navigator stacks

Currently, I am developing a provider to manage the user's state across different views. The primary function of this provider is to display either one stack navigator or another based on whether a certain variable is filled or empty. This setup allow ...

Unusual naming problem encountered in DataTables when employing diverse functions

I'm encountering an unusual issue with DataTables. In the documentation, there is inconsistency in using either a capital D or lowercase d when referring to the class name: var table = $('#example').DataTable(); Sometimes it's like th ...

Creating a keyboard and mouse accessible drop-down menu

I have a project for a client that necessitates a unique drop-down menu, which can be accessed by clicking or using the keyboard to navigate to it. Currently, my solution is almost flawless, except for one issue: when you click the drop-down menu for the ...

Spacing and filtering strings in a React array

i am attempting to include space to the names filtered by the filter, but all the names are coming back without any space. How can I modify the filtered array to have space between each name? here is how it currently looks like - https://i.sstatic.net/AznK ...

Leverage the power of require() beyond the confines of Node

I'm currently exploring how to integrate an Angular.js application with Node.js. At the moment, I have the following code in the file MY-PROJECT/public/js/controllers.js function LoginController( $scope ) { // fetch waiters var Waiter = require( ...

Exiting node.js gracefully using PM2

I have a node application running with pm2, and I need to save data before the application closes. The following code works perfectly in the shell: process.on('exit', function(){ log.debug('exit'); }); process.on('SIGINT&apos ...

Best method for connecting user input with a class

I'm currently working with a WYSIWYG editor (Tinymce) that allows users to post YouTube videos. In order to make the video content responsive, I need to add the class "video-container" around any "iframe" tags inserted when users paste a YouTube link ...

Issue encountered while serializing data in next.js when utilizing getServerSideProps function

Encountering An Error Error: The error message "Error serializing .myBlogs returned from getServerSideProps in "/blog"" keeps popping up. I'm facing a problem while attempting to log the data! Initially, when I was fetching data using use ...

Screening new elements to be included in the array

When adding new items to an array in my App, I encountered a problem with filtering the newly added items. If I use .filter by state, it modifies the original array and I am unable to filter from the beginning (original array). I attempted to filter using ...

ES6: Utilizing tagged templates for embedding nested HTML elements

Currently in the process of familiarizing myself with JavaScript and testing out its tagged template literals feature. <p> Handlebars? Tagged template literals? <span> That is a question. </span> </p> The above snippet showcases ...