donmccurdy / aframe-inspector-plugin-recast

A-Frame Inspector plugin for creating navigation meshes.
MIT License
65 stars 15 forks source link

Expose configuration settings in attribute #19

Open gmarty opened 4 years ago

gmarty commented 4 years ago

This plugin is wonderful. It makes navmesh creation so easy!

I wonder if it would be possible to expose the configuration settings as values to the inspector-plugin-recast attribute:

<a-scene inspector-plugin-recast="cellSize: 0.1; cellHeight: 0.1; agentRadius: 0.3; agentMaxSlope: 0"></a-scene>

This way, we can override the default values when reloading the page. It would speed up the development of a scene to allow testing it while the models are being actively worked on.

donmccurdy commented 4 years ago

Sorry for the late reply – this sounds like a great idea to me. Would you (or someone else) like to try a PR? The main code is here: https://github.com/donmccurdy/aframe-inspector-plugin-recast/blob/1dbeb4b268b8d59375619f616bb703a0c2215fdc/src/plugin.js#L296-L314