Jump to content

Mesh.setVerticesData 1.12 signature


JCPalmer
 Share

Recommended Posts

Hey,

Saw in 'what's new.md':

Mesh.setVerticesData signature is now: (kind, values, updatable) instead of (values, kind, updatable) in order to be consistent with Mesh.updateVerticesData

 

 

In my Towel of Babel, I was still doing it the old way.  No problem, I move a few lines of python code.  Was wondering though: might be even better if values was last.  When looking at the in-line .js with wrap turned off,  it would be a little nicer to be able to have the kind, and updateable on the left & values trail off to the right.

 

Not a big deal if causes issues.

 

Jeff

Link to comment
Share on other sites

As a corollary,  is the version of Babylon callable in JS?  I might want to put in min version checking into the generated .js.  Might get old telling people over & over again "Your version of Babylon is too old", after they cannot get it to run & wasted lots of time debugging.

Link to comment
Share on other sites

looking around, I do not see any version. (1.13 please).  Have I check that should work.  Have not tried yet, but have put it in a python var since it needs to be put at every entry point:

 

    versionCheckCode = "\tif (typeof(scene.beforeCameraRender) != \"function\") {\n\t\tconsole.log('Babylon version too old');\n\t\treturn;\n\t}"
 

 

Any other suggestions?

Link to comment
Share on other sites

dad72,

Are saying the parameter order is mandatory in 1.13 ?  If so, having a reported version is definitely required for 1.13. The syntax for the test would have to be something like this, since 1.12 had no version reporting:

 

if (typeof(scene.getVersion) === function  && scene.getVersion() >= 1.13)

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