Jump to content

Babylonjs behavior / Javascript behavior


SolidCatuar
 Share

Recommended Posts

Hello again :)

 

After several hours of unsuccessful attempts, I noticed that the babylonjs behavior was not the same that the javascript behavior.
For exemple :
The value of a.x is now 1 and the value of c is 0.
Knowing that babylonjs is a javascript library it seems strange to change the language logic. So, is there an explanation for this choice ?
 
Moreover, but there is no link with my precedent question, where can I find an html version of babylonjs 11 ? It would be useful for jsFiddle.

 

Link to comment
Share on other sites

a and b are references to an object, a BABYLON.Vector3, not primitive ints like c and d.  When you assign b = a, changes to b are seen in a, because they both refer to the same object.  This is how javascript works.

 

Not sure what you are talking about regarding an html babylonjs.  Do not know what jsFiddle is.

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...