hi with the help of drmcda, i managed to import my blender model to threejs, here is the link to the project
i am trying to add eventlisener to orbitcontrols, so on first interaction autorotate will be disabled and after 2 seconds of last interaction autorotate will start again. to better understand what i mean here is p3d.in on starting page you will see tesla model, and how autorotate function changes from true to false and vice versa on interaction. since i am new to it i can’t figure it out.
also i want add limitations on how far can camera move, i know that on zoom threre is properties like minZoom and maxZoom, but i couldn’t figure it out for panning(moving camera position with mouse right button)
can anyone help me figure it out?
orbitcontrols are quite limited. i know about limiting polar and azimuth and perhaps zoom, not sure if limiting pan even exists in it. events are also the same. generally, you’re dealing with plain three/examples/jsm orbitcontrols. the only difference is that we have forked jsm outright and practically everything in the react eco system uses three-stdlib. so if you extend controls and it makes sense to have a feature we will accept and merge your pr whereas i don’t think it would come through at three/jsm.
well i could give it a try to add limiter to pan, but more importantly i wonder if i can recreate autorotate enable/disable depending on last interaction, i know its simple in threejs you just add eventlistener, but i since im quite new to all this, it’s kinda hard to come up with the solution by myself since i haven’t found any reference…