Add set starting view button
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -426,4 +426,15 @@ toggleFullScreen = function(glCont) {
|
||||
} else {
|
||||
glCont.requestFullscreen()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send new default camera orbit values to the preview editor
|
||||
*/
|
||||
writeCameraOrbit = function() {
|
||||
const mView = $('model-viewer')[0]
|
||||
let newOrbit = mView.getCameraOrbit().toString()
|
||||
newOrbit = newOrbit.replaceAll(/(\d{2})(\d*?rad)/g,"$1rad")
|
||||
const textUpdate = $('#wpTextbox1').val().replace(/([\S\s]*?default[\S\s]*?"camera-orbit": ")(.*?)(",$[\S\s]*)/gm,'$1' + newOrbit + '$3')
|
||||
$('#wpTextbox1').val(textUpdate)
|
||||
}
|
||||
Reference in New Issue
Block a user