Bitbybit Docs
    Preparing search index...

    Class BabylonGuiImage

    Images shown as GUI controls, loaded from a URL, for logos, icons and pictures beside other controls.

    Index

    Constructors

    create

    • Creates an image control that loads its picture from url; sizes are pixel strings or fractions of the parent, and a size left out is chosen by the engine.

      Parameters

      • inputs: CreateImageDto

        The name, the URL, the color and the optional size

      Returns Image

      The image control

      const logo = bitbybit.babylon.gui.image.createImage({ name: "logo", url: "https://example.com/logo.png", color: "black", width: "120px", height: "60px" });
      panel.addControl(logo);

    get

    • Reads the URL an image control loads its picture from.

      Parameters

      Returns string

      The URL

    set

    • Changes the picture an image control shows by giving it a new URL to load.

      Parameters

      Returns Image

      The same image control