Image

Summary

A reference image widget

Instance Properties

NameReturn TypeDescription

index

number Read-only

The index of the active widget

layer

Layer Read/Write

The layer the image is on

group

Group Read/Write

The group this image is part of

transform

Transform Read/Write

The transform of the image widget

position

Vector3 Read/Write

The 3D position of the Image Widget

rotation

Rotation Read/Write

The 3D orientation of the Image Widget

scale

number Read/Write

The scale of the image widget

Class Methods

Image:Import(location)

Imports an image widget based on the specified location

Returns: Image (The imported image widget)

Parameters:

NameTypeDefaultDescription

location

string

The location of the image

Example

Image:Import("test.png")

Instance Methods

image:Select()

Selects the image widget

Returns: nil

Example

myImage:Select()

image:Deselect()

Removes the image from the current selection

Returns: nil

Example

myImage:Deselect()

image:Delete()

Deletes the image widget

Returns: nil

Example

myImage:Delete()

image:Extrude(depth, color)

Extrudes the image widget with the specified depth and color

Returns: nil

Parameters:

NameTypeDefaultDescription

depth

number

The depth of the extrusion

color

The color of the extrusion

Example

Image:Extrude(5, Color.green)

image:FormEncode()

Encodes the image as a form

Returns: string (The encoded image so it can be submitted as a response to a HTML form)

Example

formdata = myImage:FormEncode()

image:SaveBase64(base64, filename)

Saves an image as a png based on base64 data

Returns: string

Parameters:

NameTypeDefaultDescription

base64

string

The base64 data for the image

filename

string

The filename to save as

Example

Image:SaveBase64(someData, "image.png")

Last updated