Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / ImageTarget

Class: ImageTarget

Defined in: components/ImageTarget.ts:29

Image-tracking target metadata used by AR projects. Holds the source images users uploaded plus the URL of the compiled .mind target file produced by the image-target compiler. Pair with ImageTargetAnchor on child entities that should appear when the target is detected.

Extends

Constructors

Constructor

ts
new ImageTarget(
   options?, 
   texture?, 
   object?): ImageTarget;

Defined in: components/ImageTarget.ts:41

Parameters

ParameterType
options?{ targets?: ImageTargetReference[]; compiledTargetUrl?: string; compiledTargetDir?: string; }
options.targets?ImageTargetReference[]
options.compiledTargetUrl?string
options.compiledTargetDir?string
texture?Texture
object?Object3D<Object3DEventMap>

Returns

ImageTarget

Overrides

Component.constructor

Properties

PropertyTypeDescriptionDefined in
targetsImageTargetReference[]Source images that were combined into the compiled .mind target.components/ImageTarget.ts:31
compiledTargetUrl?stringURL of the compiled .mind target file. Set after the image-target compiler finishes.components/ImageTarget.ts:33
compiledTargetDir?stringDirectory containing the compiled .mind file (desktop projects).components/ImageTarget.ts:35
textureTexture | nullOptional preview texture used in the editor viewport. null when not assigned.components/ImageTarget.ts:37
objectObject3D<Object3DEventMap> | nullOptional preview object placed in the editor viewport. null when not assigned.components/ImageTarget.ts:39