Search the Community

Showing results for tags 'sceneserializer'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 6 results

  1. Hello. I was trying to serialize my scene, but it threw an error in line 29 of babylon.2.4.js file. This is the error: babylon.2.4.js:29 Uncaught TypeError: Cannot read property 'length' of undefined at r (babylon.2.4.js:29) at Function.o.Serialize (babylon.2.4.js:29) I think is missing a validation at a for loop for(var a=0;a<t.subMeshes.length;a++){ //... } beacause in my case t.subMeshes is undefine and that seems to be causing the error. My workarround was to add a validation in order to skip that for loop if t.subMeshes is undefined, but my next problem was at the moment of loading my scene. Uncaught Error: No camera defined at i.render (babylon.2.4.m.js:11) I attached my scene in json format. Do you have any idea to solve it? Thanks in advance. sceneP.zip
  2. Hello I am trying to serialize the scene with BABYLON.SceneSerializer.Serialize(scene) and am getting a "mesh.rotation.asArray is not a function". Serialization works fine when meshes are not rotated. On further exploration, I realised that that mesh.rotation was not a Vector3 object but an object with getters, setters and __op__: Observer. Could this be the issue? Can you please help me fix this. Please let me know if you need more details. Thank you
  3. I have loaded a scene exported from 3ds max. The scene includes skeletons and an animation and plays on load. If I serialize the scene and load the saved scene I do not see an animation. I can see that the loaded - serialized scene's meshes do have arrays of animations. However, scene.Animatables is empty - whereas in the original this was populated. Is there anything I can probe to see whats going on? Perhaps I am just missing a function to start all the animations?
  4. Load a scene from a file, serialize it and count the number of materials in the serialized string. You will see that the material count in the string is double the count in the file. Serialization doubles the count. I checked the code and I think it has to do with the way the loader and serializer work together. Loader, while loading, loads each material in the file as StandardMaterial into the scene. The Serializer while serializing adds all the material in the scene to the JSON object and then adds the material again if it is StandardMaterial - effectively doubling the count. I am working on an app which allows the user to serialize and save the scene to a file and I noticed that over subsequent saves the file kept getting bigger and bigger even though no changes were made to the scene, which is when I started looking into this issue.
  5. Hello! http://www.babylonjs-playground.com/#227X5L#0 Faces with strange behavior: If i make empty node, attach child with him, it not present in serialized object. But if we load file (blender generated) with empty nodes (haven't geometry) with childs - we have normal stricture. How can influence it? Very usefull grouping objects in empty Nodes.
  6. Hey there folks, I am still playing around with my very simple mesh editor and I got to a point where I want to save the scene that I have created and later on load it again. I thought I can use the SceneSerializer (found here: http://www.html5gamedevs.com/topic/6039-exporting-a-babylon-scene-to-a-file/) and stringify my scene and then use the SceneLoader to load it again (because thats the only way I could think of to get my scene back) from that string. I ended up with an error that tells me I have no camera defined when reloading the saved scene. So I check and it seems to be true: after serializing the scene there is no camera. var serializedScene = BABYLON.SceneSerializer.Serialize(scene);var strScene = JSON.stringify(serializedScene);console.log(scene.cameras, serializedScene.cameras);The console shows a camera for scene.cameras but serializedScene.cameras is just an empty array. Am I doing something wrong here or is it just not how I am supposed to do it? Here is the current version of the editor: http://localhost/babylondev/mapEditor/ Edit: http://p215008.mittwaldserver.info/mapEditor/ (load and save buttons are in the file menu at the top) By the way: right mouse button to select a mesh. Hope you guys can help me out once again here