EarthCompassComponent()

new EarthCompassComponent()

地球指北针组件类,用于在场景中显示地球指北针。
Author:
Example
const component = new THING.EarthCompassComponent({
		position: THING.CornerType.RightTop, // 选填 默认值 RightBottom 可填写 RightTop LeftTop LeftBottom
		opacity: 0.5, // 不透明度
		"offset": [-25, -25], // 选填 偏移值 x y
		image: " `https://cdn.uino.cn/thingjs-web/uearth/images/compass.png` ",
		// backgroundImage: "./assets/img/compass_bg.png",
		size: 50, // 大小
	});
	app.root.addComponent(component, "earthCompass");

Extends

Members

active :boolean

激活或停用组件。
Inherited From:

app :THING.App

获取应用程序。
Inherited From:

object :THING.BaseObject

获取对象。
Inherited From:

onActiveChange :OnActiveChangeComponentCallback

活动状态改变时的回调函数。
Inherited From:

onAfterAdd :OnAfterAddComponentCallback

添加之后。
Inherited From:

onAfterAddChild :OnAddChildComponentCallback

添加子对象之后的回调函数。
Inherited From:

onAfterRemove :OnAfterRemoveComponentCallback

移除之后。
Inherited From:

onAfterRemoveChild :OnRemoveChildComponentCallback

移除子对象之后的回调函数。
Inherited From:

onBeforeAdd :OnBeforeAddComponentCallback

添加之前。
Inherited From:

onBeforeAddChild :OnAddChildComponentCallback

添加子对象之前的回调函数。
Inherited From:

onBeforeRemove :OnBeforeRemoveComponentCallback

移除之前。
Inherited From:

onBeforeRemoveChild :OnRemoveChildComponentCallback

移除子对象之前的回调函数。
Inherited From:

onCopy :OnCopyComponentCallback

复制时的回调函数。
Inherited From:

onExport :OnExportComponentCallback

导出数据时。
Inherited From:

onImport :OnImportComponentCallback

导入数据时。
Inherited From:

onInit :OnInitComponentCallback

初始化时的回调函数。
Inherited From:

onLoadResource :OnLoadResourceComponentCallback

加载资源时的回调函数。
Inherited From:

onParentChange :OnParentChangeComponentCallback

改变父对象时的回调函数。
Inherited From:

onRefresh :OnRefreshComponentCallback

刷新时的回调函数。
Inherited From:

onResize :OnResizeComponentCallback

调整大小时的回调函数。
Inherited From:

onUnloadResource :OnUnloadResourceComponentCallback

卸载资源时的回调函数。
Inherited From:

onUpdate :OnUpdateComponentCallback

更新时的回调函数。
Inherited From:

onVisibleChange :OnVisibleChangeComponentCallback

可见性改变时的回调函数。
Inherited From:

Methods

onAdd(object)

当添加组件时。
Parameters:
Name Type Description
object THING.BaseObject 对象。
Inherited From:

onRemove()

当移除组件时。
Inherited From: