Open StefanThumann opened 1 year ago
Hello @StefanThumann
View3D doesn't provide pitchRange
yet, but I think we should provide it.
I have a working solution for this now. I place this piece of code after the plugin init code and it disables the negative rotation on the x axis.
// Wait for the model to load before calling updatePitch
view3D.on("load", () => {
const camera = view3D.camera;
const onRender = () => {
if (camera.pitch < 0) {
camera.pitch = 0;
}
};
view3D.on("beforeRender", onRender);
});
I need to use the following options for my plugin:
Background is that I want to disable negative rotation on the Y-Axis for the model.
Is it possible to place these options inside the plugin init code like this?