sm.render

Render settings

Functions:

  • getDrawDistance
  • getOutdoorLighting
  • getScreenCoordinatesFromWorldPosition
  • isOutdoor
  • setOutdoorLighting

  • sm.render.getDrawDistance()

    Client only

    Gets the draw distance.

    Returns:

    TypeDescription
    numberThe draw distance.

    sm.render.getOutdoorLighting()

    Client only

    Gets the lighting cycle fraction.

    Returns:

    TypeDescription
    numberThe fraction of the day cycle lighting.

    sm.render.getScreenCoordinatesFromWorldPosition(pos, width, height)

    Return the screen coordinates that align with the given world position.

    Parameters:

    TypeNameDescription
    Vec3posWorld position to align
    integerwidthScreen width
    integerheightScreen height

    Returns:

    TypeDescription
    number, numberThe x and y screen coordinates.

    sm.render.isOutdoor()

    Client only

    Checks if client is outdoor

    Returns:

    TypeDescription
    booleanTrue if local client is outdoor.

    sm.render.setOutdoorLighting(value)

    Client only

    Sets the lighting cycle fraction.

    Parameters:

    TypeNameDescription
    numbervalueThe fraction of the day cycle lighting.