Syntax

threejsImage(
  userData: $userData,
  data: $data,
  imageID: $imageID
)

Description

An image object that dynamically retrieves the actual image data.

Parameters

Image name Type Type Description Mandatory Default
userData Object The object from which the image data is read out yes
data function Function that receives the userData object and calculates the image data. yes
imageID String ID for the image. If several image objects have the same imageID, the image is only retrieved once. no is calculated from the userData object

Return value

Type: Image data object

Examples

Example 1: Output

// Part has an image attribute `image`

part = ....;
threejsImage(
  userData: $project
  data: x -> $x.get(`image`)
);

Output: Dynamic image that reads the actual image data from project from the attribute image.