Request for Exposing Internal Functions of Camera Inputs as Protected Fields for Extendability

Dear Babylon.js team,

I’m currently trying to build out functionality that requires more control and manipulation of camera inputs. In particular, I’ve found that being able to extend and customize the way inputs like _pointerInput in FreeCameraMouseInput and _keys in FreeCameraKeyboardMoveInput work would be useful. However, these are currently marked as private fields, preventing us from accessing them in extended classes.

For example I would like to:

  • Expose _pointerInput in FreeCameraMouseInput as a protected field
  • Expose _keys in FreeCameraKeyboardMoveInput as a protected field
  • similar stuff for all camera input classes

The use case for these changes is particularly relevant for scenarios like offscreen worker, where we need to reuse the entire logic but provide a custom source of events. By exposing these methods as protected, we would avoid bunch of ts-ignores we use right now.

Hello, and welcome to the Babylon forum!

@PolygonalSun may be able to help with this.

1 Like