Working with Widgets > 3D > Image Target
  
Image Target
What Does This Widget Do?
The Image Target widget allows you to use an image as your tracking method.
When Should I Use This Widget?
Image targets can be used for a variety of reasons. For example, you can use an Image Target when you want to use images for marketing campaigns or visualizing products in the environment where the product is intended to be used.
* 
Image targets should be used under moderately bright and diffused lighting. The surface of the image should be evenly lit.
Are There Any Special Properties, Services, Events, or Actions?
To view a list of common widget properties, services, and events, see Common Widget Properties, Services, and Events.
The following table is a list of properties that are specific to this widget.
Property
JavaScript
Type
Description
Image
url
string
Path to the image resource used for the target.
* 
This property is not editable during runtime.
The image used must meet the following criteria:
8-bit or 24-bit PNG or JPG file
Less than 2 MB in size
JPGs must be RGB or greyscale (no CMYK)
Does not exceed 2024 pixels on any side
Proportions do not exceed 3:1 (none of the sides should be more than three times longer than any others, even if the image is not rectangular)
Marker Width
width
number
The width of the image.
The value of this field is set in meters.
X Coordinate
x
number
Location of the Image Target on the x-axis.
Y Coordinate
y
number
Location of the Image Target on the y-axis.
Z Coordinate
z
number
Location of the Image Target on the z-axis.
X Rotation
rx
number
Rotation of the Image Target about the x-axis.
Y Rotation
ry
number
Rotation of the Image Target about the y-axis.
Z Rotation
rz
number
Rotation of the Image Target about the z-axis.
Tracked
src
boolean
Is enabled when the camera recognizes the target.
Display Tracking Indicator
src
boolean
If this checkbox is selected, a green tracking outline of the target is displayed indicating that tracking is in progress.
Stationary (Eyewear projects only)
src
boolean
Select this checkbox if the target will be in a stable environment and won't be moved by the user. Selecting this checkbox may improve tracking performance.
Event
JavaScript
Description
Tracking Acquired
trackingacquired
Triggered when tracking is established. The parameter passed is the widget ID.
Tracking Lost
trackinglost
Triggered when tracking is lost. The parameter passed is the widget ID.
The Widget in Action
Here’s an example of what your widget might look like!
Minimum Steps Required for Use
What It Looks Like
1. Drag and drop an Image Target widget onto the canvas.
2. Click the + icon next to the Image field to upload a new image, or select one from the drop-down menu.
3. In the PROJECT pane, under Configuration > Experiences, select None from the ThingMark Association drop-down.