简体   繁体   中英

how to save dat.gui parameter to backend, i am using django and three.js and dat.gui

I am using django as backend and model.form for data saving. i am using dat.gui with three.js scene. my question is how do i save dat.gui parameter to django. (how to get dat.gui parameter to django form)

The dat.gui API has a .getSaveObject() call. Call that, do JSON.stringify() on the result value and send the string to your backend (eg using fetch() ).

You can then use gui = new GUI({load: saveObject}); when instantiating your dat.gui to load the state.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM