Open CodeAndWeb opened 9 years ago
Using Lua will break the compatiblety if some changes happened to the syntax, While JSON library can be replaced with an updated one, Also if using Lua, I'll have to re-export all the objects
all the objects to use in another language
Also if the lua code creates the objects, That will prevent me for looking in the object parts and modify them.
Think of the game exporting a modified version of the models
JSON also allows viewing the object model in the browser
Do you know that it's based on lime exporter ?
The userdata will be hard to use, But I'll add it anyway
I didn't use isSensor at all in love, But should be useful
What is the group index ?
Can we debug view the object in phyicseditor ?
And also something like generated ids for every object
I can do anything today, I have school, Maybe at the week end :P
I've forked the loader - and added some more stuff:
1) isSensor - to create sensor fixtures 2) userdata - to set an "id" value which can be used to identify fixtures or bodies 3) group index (which does not seem to work with love2d)
Feel free to pull the changes back in.
One question: Why do you create a .json file? This requires an additional loader for the JSON data. What about simply creating a .lua file as shapes. It would even be possible to remove the loader code completely. Or is there some advantage I don't see?