Jump to content

Cloning an imported Mesh Serialize then open scene


ChrisR
 Share

Recommended Posts

I am trying to open a file that i have saved using SceneSerializer.Serialize. This file had originally one mesh imported. After its imported i clone it using: 

var cloneMesh = newMeshes[0].clone('clone', null, false);cloneMesh.position.x += 50;

Then i save it using: 

var serializedJSON = BABYLON.SceneSerializer.Serialize(scene);var serializedString = JSON.stringify(serializedJSON);

This appears to be working well. Then i try to load it. When i load it i can see both meshes got imported into the scene. However only one is displayed. Take a look at the playground here:

http://www.babylonjs-playground.com/#UH1RI#1

 

in the debug layer i can see all the clone.x meshes and the original meshes, however i can only see one of the models. What can I do to get the clone to be loaded properly?

 

Any help would be greatly appriciated.

 

Thanks!

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