import { ContextManager, Observable } from '@zcomponent/core'; import * as Zappar from '@zappar/zappar'; import { AnchorOnNewEvent, AnchorOnVisibleEvent, AnchorOnNotVisibleEvent } from '../../events/events'; import { Event } from '@zcomponent/core'; import { StaticGroup } from '../StaticObject3D'; export declare enum ImageTargetOrientation { Upright = "Upright", Flat = "Flat" } /** * @zfilegenerator Train image target * @url https://imagetrainer-staging.zap.works/?platform=mattercraft * @icon add_photo_alternate */ interface ImageTrackerConstructorProps { /** * The ".zpt" file to use as the target image. You can create ZPT files from PNG/JPEG images using the 'Train image target' option from the Mattercraft Project tab '+' menu. * * @zprop * @zvalues files *.+(zpt) * @zpriority 21 */ source: string; /** * To preview the target image in the editor, set this to true. * @zprop * @zdefault true */ showPreviewDesignTime: boolean; /** * Should objects beneath the surface of the target image be masked. * * @zprop * @zdefault true */ maskObjectsBeneathSurface: boolean; } /** * The Image Tracker node can detect and track a flat or curved image in 3D space. * This is great for building content that's augmented onto business cards, posters, magazine pages, bottles, etc. * @zcomponent * @zgroup AR * @zlabel three/Object3D/Group/Zappar/ImageTracker * @ztag three/Object3D/Group/Zappar/ImageTracker * @ztag three/Object3D/Group/Zappar/Anchor * @zparents three/Object3D/Group/Group * @zicon image_search */ export declare class ImageTracker extends StaticGroup { protected constructorProps: ImageTrackerConstructorProps; /** * This event is fired when a new anchor is seen for the first time. * @zprop */ onAnchorNew: Event<[AnchorOnNewEvent]>; /** * This event is fired when an anchor is visible. * @zprop */ onAnchorVisible: Event<[AnchorOnVisibleEvent]>; /** * This event is fired when an anchor is not visible. * @zprop */ onAnchorNotVisible: Event<[AnchorOnNotVisibleEvent]>; /** * Whether to consider the image target to be upright or flat for the purposes of building and editing the content. * * 'Upright' is great for things that are likely to be vertical in the real world, such as posters or billboards. * * 'Flat' is great for things that are likely to be horizontal in the real world, such as graphics on the floor. * * @zprop * @zgroup ImageTracker * @zgrouppriority 100 * @zdefault Upright */ orientation: Observable; private _underlyingAnchor?; anchor?: Zappar.ImageAnchor; private seenAnchorIds; private _context; private _imageTrackerContext; private _imageAnchorContext; private _innerGroup; private _maskMesh; private _previewMesh; readonly designTimeAnchorOriginPosition: number[]; constructor(ctx: ContextManager, constructorProps: ImageTrackerConstructorProps); private _load; private _updateEnabled; private _frame; dispose(): never; } export {};