Jump to content

Uncaught TypeError: 'push' of undefined (line 6)


wilwilwel
 Share

Recommended Posts

I've downloaded babylon master js and stripped it from the dirs: tools and exporters. Uploaded it to my webserver.

I'm currently using 1.13, but also other versions give the exact same error:
Uncaught TypeError: Cannot read property 'push' of undefined (line 6)
d.meshes.push(this)

Following tut below: (copied tutorial files as provided, but dont work)
https://github.com/BabylonJS/Babylon.js/wiki/02-Basic-elements

 

Am I doing something wrong? I've been reading that some errors might be there due to an upgrade of version.

Sorry for my poor language or newbie question, im just ager to start playing with Babylon :)

Link to comment
Share on other sites

No sorry I can't. The playground is missing Oimo.js.

Failed to load resource: the server responded with a status of 404 (Not Found)
http://www.babylonjs.com/Oimo.js
 

But i managed to get passed the Undefined. I re-uploaded all from scratch (didnt changed a thing) and it worked (partly since i still get notthing on screen but that will be solveable later on).

Hopfully i'll be able to play around tomorrow. Thanks for your time and effort. No clue what caused it, not what solved it :S

Link to comment
Share on other sites

Hi

 

A recent change in CreateCylinder caused some problems for a while.  An optional parameter (height subdivisions) was added to CreateCylinder, but for older versions of the framework, some of us were getting a few errors.  See http://www.html5gamedevs.com/topic/8024-update-typescript-port-done/#entry47981

 

I believe some framework things were recently adjusted... to make sure that the new parameter was indeed an optional parameter.  Don't quote me, though.  I could easily be wrong.  I am not one of the code maintainers, but I do some work on tutorials.  And, I have been slow at adjusting the Basic Elements tutorial to reflect the new height subdivs parameter.  My fault, there.  I will get that done today... if I can.

 

So, you may never see this error again, but I am guessing that it WAS CreateCylinder that was causing the problem.  This playground scene - http://www.babylonjs.com/playground/#GASVU is a test of the new height subdivisions parameter (currently set to 4).  You can remove the 4, and see that the cylinder still works fine.  But again, certain older versions of the framework... were not updated and caused a temporary backwards compat issue with cylinders.  I believe that was the cause of your problems.

 

Welcome to the forum, wilwilwel!  Good to have you with us.  Sorry about the rough start to using Babylon.js.  Thanks for reporting your findings.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...