Forum

Save scene status is possible?

19 November 2016 13:54
Hi guys!

Is it possible to save the scene status to a file for later reload?.

Example in three.js:
http://furnishup.github.io/blueprint3d/example/

Thanks.
19 November 2016 19:56
Hi!
Of course, this can be done. But this functionality is not really related to Blend4Web itself. The example above also just uses a custom format to remember transformations of particular objects.

Say, you've placed a chair to a position with coordinates: X: 12.5, Y: 10, Z: 0.
When you press the "Save" button you need to get its position with corresponding API and write it to a text file which can be later used to restore the state.
It might look like this:
"Chair: Position: [12.5, 10, 0]"
You can use this information and assign this transformation to the Chair object with this method.
21 November 2016 16:17
Reply to post of user Evgeny Rodygin
Hi!
Of course, this can be done. But this functionality is not really related to Blend4Web itself. The example above also just uses a custom format to remember transformations of particular objects.

Say, you've placed a chair to a position with coordinates: X: 12.5, Y: 10, Z: 0.
When you press the "Save" button you need to get its position with corresponding API and write it to a text file which can be later used to restore the state.
It might look like this:
"Chair: Position: [12.5, 10, 0]"
You can use this information and assign this transformation to the Chair object with this method.
Thanks.
 
Please register or log in to leave a reply.