UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

43 lines (42 loc) 1.14 kB
import { Behaviour } from "../Component.js"; import { type IPointerClickHandler, PointerEventData } from "../ui/index.js"; /** * OpenURLMode defines how a URL should be opened. */ export declare enum OpenURLMode { NewTab = 0, SameTab = 1, NewWindow = 2 } /** * OpenURL behaviour opens a URL in a new tab or window. * @category Interactivity * @group Components */ export declare class OpenURL extends Behaviour implements IPointerClickHandler { /** * The URL to open. */ url?: string; /** * The mode in which the URL should be opened: NewTab, SameTab, NewWindow. */ mode: OpenURLMode; /** * If true, the URL will be opened when the object with this component is clicked. */ clickable: boolean; /** * Opens the URL in a new tab or window. */ open(): Promise<void>; /** @internal */ start(): void; /** @internal */ onPointerEnter(args: any): void; /** @internal */ onPointerExit(): void; /** @internal */ onPointerClick(args: PointerEventData): void; private _validateUrl; }