Class Marker2D

2d的html的标记

Hierarchy

  • CSS2DObject
    • Marker2D

Constructors

Properties

_allowOverlap: boolean
_anchor: Anchor
_clickTolerance: number
_color?: string
_defaultMarker: boolean
_draggable: boolean
_element: HTMLElement
_isDragging: boolean
_occlusion: boolean
_offset: [number, number]
_opacity: string
_options: Marker2dOptions
_originalTabIndex?: string
_pointerdownPos?: Vector2
_popup?: Popup2D
_rotation: number
_scale: number
_state: "active" | "inactive" | "pending"
_unProjectOpts: UnProjectOpts
app: App
isMarker2D: boolean = true
signal: {
    click: Signal;
    drag: Signal;
    dragend: Signal;
    dragstart: Signal;
    elementSizeReady: Signal;
    occlusion: Signal;
    onAdd: Signal;
    onRemove: Signal;
} = ...

Type declaration

Methods

  • Parameters

    • e: KeyboardEvent

    Returns void

  • Returns void

  • 增加至应用或实体中

    Parameters

    • app: App | Object3D<Object3DEventMap> | Entity
    • Optional curApp: App

    Returns Marker2D

  • Returns {
        cx: number;
        cy: number;
        groupName: string;
        id: string;
        position: Vector3;
        rotation: number;
        setVisible: ((visible) => void);
        x1: number;
        x2: number;
        y1: number;
        y2: number;
        zIndex: number;
    }

    • cx: number
    • cy: number
    • groupName: string
    • id: string
    • position: Vector3
    • rotation: number
    • setVisible: ((visible) => void)
        • (visible): void
        • Parameters

          • visible: any

          Returns void

    • x1: number
    • x2: number
    • y1: number
    • y2: number
    • zIndex: number
  • 获取元素对象

    Returns Element

  • 得到透明度

    Returns number

  • 获取位置

    Returns Vector3

  • Returns void

  • 是否允许重叠

    Returns boolean

  • 是否可拖动

    Returns boolean

  • Returns boolean

  • 移除

    Parameters

    • Rest ...object: Object3D<Object3DEventMap>[]

    Returns this

  • 设置是否允许重叠

    Parameters

    • allowOverlap: boolean

    Returns void

  • 设置动画

    Parameters

    • animationType: "" | "MAP_ANIMATION_NONE" | "MAP_ANIMATION_BOUNCE" | "MAP_ANIMATION_DROP"

      MAP_ANIMATION_NONE 无动画 MAP_ANIMATION_BOUNCE 弹跳 MAP_ANIMATION_DROP 坠落

    Returns void

  • 设置光标

    Parameters

    • cur: string

      光标名称

    Returns void

  • 设置是否可拖动

    Parameters

    • shouldBeDraggable: boolean

    Returns Marker2D

  • 设置透明度

    Parameters

    • opacity: string | number

    Returns void

  • 设置位置

    Parameters

    • pos: number | [number, number, number] | Vector3
    • Optional y: number
    • Optional z: number

    Returns void

  • Returns void