xrfragment/src/3rd/js/three/xrf/rot.js

11 lines
288 B
JavaScript
Raw Normal View History

xrf.frag.rot = function(v, opts){
2023-05-09 17:42:29 +02:00
let { mesh, model, camera, scene, renderer, THREE} = opts
2023-05-22 14:10:44 +02:00
console.log(" └ setting camera rotation to "+v.string)
camera.rotation.set(
v.x * Math.PI / 180,
v.y * Math.PI / 180,
v.z * Math.PI / 180
)
camera.updateMatrixWorld()
2023-05-09 17:42:29 +02:00
}