Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImageAsset

Image file stored in Space. Can be displayed in 2D or 3D context.

Supported file formats

  • .jpg
  • .png
  • .bmp
  • .gif
  • .svg

See ImageItem

See GUI.Image

Hierarchy

Index

Constructors

Properties

aspectRatio: number

Returns aspect ratio of this image, calculated width divided by height.

Example:

  • Image resolution of 100 px width and 50 px height returns 2
  • Image resolution of 50 px width and 100 px height returns 0.5
returns

aspect ratio of image file.

See GUI.Image

name: string
returns

original name of this asset derived from uploaded file.

type: "image" | "image_360" | "image_gif" | "sound" | "video" | "model"
returns

asset type.

Methods

  • Parameters

    • options: {}

      Returns ImageSource

    • Creates an ImageItem from this ImageAsset.

      Parameters

      • position: Vector3

        initial world space position of ImageItem.

      Returns ImageItem

      created ImageItem.