Type alias ViewerSettings

ViewerSettings: { adaptToDeviceRatio: boolean; antialiasing: boolean; engineOptions: EngineOptions; limitTextureSize: LimitTextureSizeConfig | false; useParallelShaderCompile: boolean; useRightHandedSystem: boolean }

Type declaration

  • adaptToDeviceRatio: boolean

    Important for visual quality on iOS devices, this setting will set the hardware scaling proportional to the devices pixel ratio

  • antialiasing: boolean
  • engineOptions: EngineOptions
  • limitTextureSize: LimitTextureSizeConfig | false

    Possibility to limit the size of textures when getting loaded by the engine.
    Activating this feature potentially saves a lot of memory and can be used to avoid crashes when loading expensive models on weaker devices.
    In praxis this has been an issue with iPhones a lot, therefore it's possible to activate this feature for iPhones only as well.

  • useParallelShaderCompile: boolean

    See this forum entry for description of parallel shader compilition effect: https://forum.babylonjs.com/t/scene-flickering-when-turning-off-light/48733.\ Parallel shading compilition generally improves the speed of material compilition and helps when switching materials while objects are moving (eg: animations).
    Deactivating parallel shading compilition is benefitial when switching lights and materials in static scenarios.
    It's activated by default due to compatibility reasons but can be overwritten with this flag.

  • useRightHandedSystem: boolean

    Run the viewers scene in right handed mode.
    The main advantage is that GLB based models can be used without a negative scaling in their root nodes.

Generated using TypeDoc