I am loading the object from my json file.

var loader = new THREE.ObjectLoader();
function ( car ) {
  car.position.set(2, 0, 0);

Chrome Console Error

How can I add the object to my world? In regular three.js it works when I load the json file, but how do I do it in whitestorm?

Update: I tried using the importScene whitestorm method. No errors but it still doesn't show up. Here is an image of logging out a regular plane in whitestorm and the car that is loaded from the json file.enter image description here

Thank You!

  • \$\begingroup\$ Are you certain the problem is loading the JSON object? The error you posted statesthat .addTo isn't a function of car - but it didn't throw an error for car.position.set which suggests that it did load & that it was able to access its position function or attribute... \$\endgroup\$ – Pikalek Jan 26 '17 at 3:17
  • \$\begingroup\$ So it did load the object because I can log it and set a position property on it. However it does not load into the scene when I try using the addTo method. I tried the importScene method and I don't get any errors but it still does not load into the scene. \$\endgroup\$ – Aryeh Harris Jan 26 '17 at 15:22
  • \$\begingroup\$ which version of whitestormjs are you using? Can you contact me in discord chat of whitestormjs? I'll try to help \$\endgroup\$ – Alexander Buzin Jan 29 '17 at 21:24

Don't use the THREE.ObjectLoader, use JSONLoader, instead.

  • \$\begingroup\$ Could you provide a bit more information? Why should asker use JSONLoader, instead? \$\endgroup\$ – Gnemlock Feb 19 '17 at 3:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.