当前位置: 首页 > 文档资料 > ThingJS 文档中心 >

Namespace: THING

优质
小牛编辑
123浏览
2023-12-01

THING

Classes

ActionComposer
App
AxisTransformControl
BaseObject
BaseStyle
BooleanController
Box
Building
CameraController
Campus
Circle
Controller
Cylinder
DefaultStyle
EventTrigger
FilteredArray
Flags
Floor
Frustum
Grid
GroupState
Heatmap
IDWMap
IframeController
ImageController
ImageProxy
InheritNode
LightBase
Line
LineBase
LookAtControl
Marker
Mathics
NumberController
NumberControllerBox
NumberControllerSlider
PanoManager
PanoPoint
PanoRelation
ParticleSystem
Picker
PivotNode
Plane
PointsBase
PolygonLine
PolygonRegion
PolygonRegionStyle
ProgressController
RadioController
RectangleSelectControl
Room
RouteLine
SceneLevel
SceneRoot
Selection
Selector
SelectorStyle
Sphere
SpotLight
StringController
TabController
TableController
Tetrahedron
TextRegion
TextRegionStyle
Thing
ThingGeometry
UIAnchor
Utils
Version
Water
WaterStyle
WebView

Members


<static, constant> CameraProjectionType :String

摄像机投影类型

Type:
  • String
Properties:
NameTypeDefaultDescription
PerspectiveStringperspective

投影方式

OrthographicStringorthographic

正交方式


<static, constant> CameraView :String

摄像机视角方式

Type:
  • String
Properties:
NameTypeDefaultDescription
NormalStringnormal

正常视角

TopViewStringtopview

顶部视角


<static, constant> DragState :String

拖拽状态

Type:
  • String
Properties:
NameTypeDefaultDescription
NoStringno

非拖拽模式

DraggingStringdragging

拖拽中

DragEndStringdragend

拖拽结束


<static, constant> EventTag :String

内核事件 Tag 名称

Type:
  • String
Properties:
NameTypeDefaultDescription
LevelSetBackgroundString__level_set_background__

场景层级切换更换默认背景

LevelSceneOperationsString__level_scene_operations__

场景层级切换的默认操作

LevelPickedResultFuncString__level_picked_result_func__

场景层级切换后设置默认拾取结果

LevelFlyString__level_fly__

场景层级切换时的默认飞行行为

LevelCustomFlyString__level_custom_fly__

场景层级切换时的用户自定义飞行行为

LevelEnterOperationString__level_enter_operation__

进入下一层级的默认操作

LevelBackOperationString__level_back_operation__

退出当前层级的默认操作


<static, constant> EventType :String

内核事件

Type:
  • String
Properties:
NameTypeDefaultDescription
CompleteStringcomplete

通知系统初始化完成 或 物体完成加载

ResizeStringresize

通知窗口大小变化(width, height)

UpdateStringupdate

通知每帧更新

ProgressStringprogress

通知场景资源加载进度

LoadStringload

通知 App 初始化完成 或 场景、物体加载完成

UnloadStringunload

通知物体卸载

ClickStringclick

通知鼠标点击,鼠标单击、双击均会触发 Click 事件(双击时候会触发两次)

DBLClickStringdblclick

通知鼠标双击

SingleClickStringsingleclick

通知鼠标单击(会有些许的延时,鼠标双击不会触发 SingleClick 单击事件)

MouseUpStringmouseup

通知鼠标键抬起

MouseDownStringmousedown

通知鼠标键按下

MouseMoveStringmousemove

通知鼠标移动

MouseWheelStringmousewheel

通知鼠标滚轮滚动

MouseEnterStringmouseenter

通知鼠标首次移入物体

MouseOverStringmouseover

通知鼠标首次移入物体, 会一直传递到父物体

MouseLeaveStringmouseleave

通知鼠标首次移出物体

DragStartStringdragstart

通知物体拖拽开始

DragStringdrag

通知物体拖拽进行中

DragEndStringdragend

通知物体拖拽结束

KeyDownStringkeydown

通知键盘按键按下

KeyPressStringkeypress

通知键盘按键一直被按下

KeyUpStringkeyup

通知键盘按键抬起

CameraChangeStartStringcamerachangestart

通知摄像机位置变动开始

CameraChangeEndStringcamerachangeend

通知摄像机位置变动结束

CameraChangeStringcamerachange

通知摄像机位置变动中

CameraZoomStringcamerazoom

摄像机向前/后滚动

CameraViewChangeStringcameraviewchange

通知摄像机观察模式改动

CreateStringcreate

通知物体创建完成

DestroyStringdestroy

通知物体删除完成

ExpandStringexpand

通知建筑楼层被展开

UnexpandStringunexpand

通知建筑楼层被合并

SelectStringselect

通知物体被选择

DeselectStringdeselect

通知物体被取消选择

SelectionChangeStringselectionchange

通知物体选择集合更新

LevelChangeStringlevelchange

通知场景层级发生改变

EnterLevelStringenterLevel

通知进入下一层级

LeaveLevelStringleaveLevel

通知退出当前层级

LevelFlyEndStringlevelflyend

通知摄像机飞入下一层级结束


<static, constant> KeyType :Number

按键键值

Type:
  • Number
Properties:
NameTypeDefaultDescription
BackspaceNumber8

Backspace

TabNumber9

Tab

EnterNumber13

Enter

ShiftNumber16

Shift

CtrlNumber17

Ctrl

AltNumber18

Alt

PauseNumber19

Pause

CapslockNumber20

Capslock

EscapeNumber27

Escape

SpaceNumber32

Space

PageUpNumber33

PageUp

PageDownNumber34

PageDown

EndNumber35

End

HomeNumber36

Home

LeftNumber37

Left

UpNumber38

Up

RightNumber39

Right

DownNumber40

Down

InsertNumber45

Insert

DeleteNumber46

Delete

Key0Number48

Key0

Key1Number49

Key1

Key2Number50

Key2

Key3Number51

Key3

Key4Number52

Key4

Key5Number53

Key5

Key6Number54

Key6

Key7Number55

Key7

Key8Number56

Key8

Key9Number57

Key9

ANumber65

A

BNumber66

B

CNumber67

C

DNumber68

D

ENumber69

E

FNumber70

F

GNumber71

G

HNumber72

H

INumber73

I

JNumber74

J

KNumber75

K

LNumber76

L

MNumber77

M

NNumber78

N

ONumber79

O

PNumber80

P

QNumber81

Q

RNumber82

R

SNumber83

S

TNumber84

T

UNumber85

U

VNumber86

V

WNumber87

W

XNumber88

X

YNumber89

Y

ZNumber90

Z

SelectNumber93

Select

Numpad0Number96

Numpad0

Numpad1Number97

Numpad1

Numpad2Number98

Numpad2

Numpad3Number99

Numpad3

Numpad4Number100

Numpad4

Numpad5Number101

Numpad5

Numpad6Number102

Numpad6

Numpad7Number103

Numpad7

Numpad8Number104

Numpad8

Numpad9Number105

Numpad9

MultiplyNumber106

Multiply

AddNumber107

Add

SubtractNumber109

Subtract

DecimalNumber110

Decimal

DivideNumber111

Divide

F1Number112

F1

F2Number113

F2

F3Number114

F3

F4Number115

F4

F5Number116

F5

F6Number117

F6

F7Number118

F7

F8Number119

F8

F9Number120

F9

F10Number121

F10

F11Number122

F11

F12Number123

F12

NumlockNumber144

Numlock

ScrolllockNumber145

Scrolllock

SemicolonNumber186

Semicolon

EqualSignNumber187

EqualSign

CommaNumber188

Comma

DashNumber189

Dash

PeriodNumber190

Period

ForwardSlashNumber191

ForwardSlash

GraveAccentNumber192

GraveAccent

OpenBracketNumber219

OpenBracket

BackSlashNumber220

BackSlash

CloseBraketNumber221

CloseBraket

SingleQuoteNumber222

SingleQuote


<static, constant> LoopType :String

循环类型

Type:
  • String
Properties:
NameTypeDefaultDescription
NoStringno

不循环,只执行一次

RepeatStringrepeat

不断循环

PingPongStringpingpong

来回不断循环


<static> Math :THING.Mathics

数学库

Type:

<static, constant> MouseButtonType :Number

鼠标按键键值

Type:
  • Number
Properties:
NameTypeDefaultDescription
LEFTNumberleft
MIDDLENumbermiddle
RIGHTNumberright

<static, readonly> PanoEvent :string

全景图事件

Type:
  • string
Properties:
NameTypeDefaultDescription
PanoPlayerReadystringpanoplayerready

全景图播放器准备就绪事件

PanoChangestringpanochange

全景图播放器中全景图切换事件 param:panoID, x, y, pano

PanoPlayerClosestringpanoplayerclose

全景图播放器关闭事件

PanoHotspotClickstringpanohotspotclick

全景图热点点击事件


<static, constant> SelectionMark :Number

选择器标记

Type:
  • Number
Properties:
NameTypeDefaultDescription
NoneNumber0

不做操作

StopNumber1

停止

JumpNumber2

跳过


<static, constant> SkyBox :String

天空盒资源

Type:
  • String
Properties:
NameTypeDefaultDescription
BlueSkyStringBlueSky

BlueSky

MilkyWayStringMilkyWay

MilkyWay

NightStringNight

Night

SunCloudStringSunCloud

SunCloud

Type Definitions


LerpType

插值类型

Type:
  • Object
Properties:
NameTypeDescription
LinearObject

线性插值

Properties
NameTypeDescription
Nonefunction

线性插值

QuadraticObject

二次插值

Properties
NameTypeDescription
Infunction

二次插值(In)

Outfunction

二次插值(In)

InOutfunction

二次插值(InOut)

CubicObject

三次曲线插值

Properties
NameTypeDescription
Infunction

三次插值(In)

Outfunction

三次插值(In)

InOutfunction

三次插值(InOut)

QuarticObject

四次插值

Properties
NameTypeDescription
Infunction

四次插值(In)

Outfunction

四次插值(In)

InOutfunction

四次插值(InOut)

QuinticObject

五次插值

Properties
NameTypeDescription
Infunction

五次插值(In)

Outfunction

五次插值(In)

InOutfunction

五次插值(InOut)

SinusoidalObject

正弦曲线插值

Properties
NameTypeDescription
Infunction

正弦曲线插值(In)

Outfunction

正弦曲线插值(In)

InOutfunction

正弦曲线插值(InOut)

ExponentialObject

指数插值

Properties
NameTypeDescription
Infunction

指数插值(In)

Outfunction

指数插值(In)

InOutfunction

指数插值(InOut)

CircularObject

迂回插值

Properties
NameTypeDescription
Infunction

迂回插值(In)

Outfunction

迂回插值(In)

InOutfunction

迂回插值(InOut)

ElasticObject

弹性插值

Properties
NameTypeDescription
Infunction

弹性插值(In)

Outfunction

弹性插值(In)

InOutfunction

弹性插值(InOut)

BackObject

Back 插值

Properties
NameTypeDescription
Infunction

Back 插值(In)

Outfunction

Back 插值(In)

InOutfunction

Back 插值(InOut)

BounceObject

弹跳插值

Properties
NameTypeDescription
Infunction

弹跳插值(In)

Outfunction

弹跳插值(In)

InOutfunction

弹跳插值(InOut)

See: