Class: CameraPickerComponent

THING.CameraPickerComponent()

CameraPickerComponent The camera picker compnent.

Constructor

new CameraPickerComponent()

The picker by camera, user can pick object(s) from it.
Source:

Extends

Members

active :Boolean

Active or deactive component.
Type:
  • Boolean
Overrides:
Source:

app :THING.App

Get application.
Type:
Overrides:
Source:

object :THING.BaseObject

Get object.
Type:
Overrides:
Source:

onActiveChange :OnActiveChangeComponentCallback

When active change callback function.
Type:
Overrides:
Source:

onAfterAdd :OnAfterAddComponentCallback

After add.
Type:
Overrides:
Source:

onAfterAddChild :OnAddChildComponentCallback

When after add child callback function.
Type:
Overrides:
Source:

onAfterRemove :OnAfterRemoveComponentCallback

After remove.
Type:
Overrides:
Source:

onAfterRemoveChild :OnRemoveChildComponentCallback

When after remove child callback function.
Type:
Overrides:
Source:

onBeforeAdd :OnBeforeAddComponentCallback

Before add.
Type:
Overrides:
Source:

onBeforeAddChild :OnAddChildComponentCallback

When before add child callback function.
Type:
Overrides:
Source:

onBeforeRemove :OnBeforeRemoveComponentCallback

Before remove.
Type:
Overrides:
Source:

onBeforeRemoveChild :OnRemoveChildComponentCallback

When before remove child callback function.
Type:
Overrides:
Source:

onCopy :OnCopyComponentCallback

When copy callback function.
Type:
Overrides:
Source:

onExport :OnExportComponentCallback

When export data.
Type:
Overrides:
Source:

onImport :OnImportComponentCallback

When import data.
Type:
Overrides:
Source:

onInit :OnInitComponentCallback

When initialize callback function.
Type:
Overrides:
Source:

onLoadResource :OnLoadResourceComponentCallback

When load resource callback function.
Type:
Overrides:
Source:

onParentChange :OnParentChangeComponentCallback

When change parent callback function.
Type:
Overrides:
Source:

onRefresh :OnRefreshComponentCallback

When refresh callback function.
Type:
Overrides:
Source:

onResize :OnResizeComponentCallback

When resize callback function.
Type:
Overrides:
Source:

onUnloadResource :OnUnloadResourceComponentCallback

When unload resource callback function.
Type:
Overrides:
Source:

onUpdate :OnUpdateComponentCallback

When update callback function.
Type:
Overrides:
Source:

onVisibleChange :OnVisibleChangeComponentCallback

When visible change callback function.
Type:
Overrides:
Source:

pickType :PickType

Get/Set pick type.
Type:
Source:
Example
THING.App.current.camera.pickType = THING.PickType.GPU;

Methods

intersectObjectInRegion(region, object) → {Boolean}

Check intersection between object and region.
Parameters:
Name Type Description
region Array.<Number> The [left, top, width, height] region in screen.
object THING.Object3D The object.
Source:
Returns:
Type
Boolean

intersectPlane(x, y, normal, constant) → {Array.<Number>}

Calculate the points where the plane intersects.
Parameters:
Name Type Default Description
x Number The x coordinate in screen.
y Number The y coordinate in screen.
normal Array.<Number> The plane normal. (default [0,1,0])
constant Number 0 Distance of plane. (default 0)
Source:
Returns:
Type
Array.<Number>

onAdd(object)

When add component.
Parameters:
Name Type Description
object THING.BaseObject The object.
Overrides:
Source:

onRemove()

When remove component.
Overrides:
Source:

pick(x, y, root?) → {PickResult}

Pick node.
Parameters:
Name Type Description
x Number The x coordinate in screen.
y Number The y coordinate in screen.
root? THING.BaseObject The root object to pick.
Source:
Returns:
Type
PickResult

pickFromCrossPlanes(x, y, isVertical) → {PickResult}

Pick from cross planes.
Parameters:
Name Type Default Description
x Number The x coordinate in screen.
y Number The y coordinate in screen.
isVertical Boolean true Whether vertical and horizontal planes will always be vertical.
Source:
Returns:
Type
PickResult