GeOnDT GeOnDT for JS

Class: U3dView

U3dView

~extends U3dOverlay
카메라 뷰 관련 API
카메라 뷰 : 메인 카메라 외 원하는 위치에 생성 가능한 서브 카메라

new U3dView(opt)

Name Type Default Description
opt Partial.<U3dView~U3dViewCO> {} optional

Members

getRotationLeft

카메라뷰 좌우 각을 반환하는 함수

staticU3dView.U3dViewany

Methods

dispose()

카메라뷰의 Element, Event 등 등록된 모든 내용을 삭제하는 함수

edit(state, mode)

카메라뷰에 Gizmo 모드를 설정하는 함수

Name Type Description
state boolean

Gizmo 작업 상태

mode string

Gizmo 모드 translate rotate

getCamera()UCamera|undefined

카메라를 반환하는 함수

Returns:
Type Description
UCamera | undefined THREE.PerspectiveCamera 카메라 객체

getCameraPosition()Vector3|undefined

카메라뷰의 위치를 반환하는 함수

Returns:
Type Description
Vector3 | undefined 카메라의 월드 좌표

getCameraRotation(type)U3dView~CameraRotation|undefined

카메라뷰의 회전 값을 반환하는 함수

Name Type Description
type string

각도 타입 (radian,degree 선택 입력)

Returns:
Type Description
U3dView~CameraRotation | undefined 카메라의 회전 값
Example
return {
    horizontality : 90   // 카메라 z축 각도 (수평 각)
    Perpendicular : 180  // 카메라 x축 각도 (수직 각)
    type : "degree"      // 각도 타입
}

getId()string

카메라뷰의 아이디(id)를 반환하는 함수

Returns:
Type Description
string 카메라뷰 아이디

getName()string

카메라뷰의 이름(name)을 반환하는 함수

Returns:
Type Description
string 카메라뷰 이름

getRenderer()URenderer|undefined

카메라뷰의 Renderer를 반환하는 함수

Returns:
Type Description
URenderer | undefined 카메라뷰의 Renderer

getRotationUp()number

카메라뷰 상하 각을 반환하는 함수

Returns:
Type Description
number 상하 각

getScene()UScene|undefined

카메라뷰의 scene을 반환하는 함수

Returns:
Type Description
UScene | undefined 광원뷰 scene

getWorldDirection(distance)Vector3|undefined

카메라뷰 방향 백터를 반환하는 함수

Name Type Default Description
distance number 1 optional
Returns:
Type Description
Vector3 | undefined target의 Vector3 좌표

hide()

카메라뷰 비가시화 함수

hideHelperObj()

카메라 뷰의 가이드 객체 (helperObject)를 비가시화(hide)하는 함수

hideLabel()

카메라뷰 라벨 비가시화(hide) 함수

highlight(isHighlight)

카메라뷰 Control Object에 하이라이트 효과를 주거나, 삭제하는 함수

Name Type Description
isHighlight boolean

하이라이트(Highlight)효과 사용 여부

initRenderTarget(width, height)

Name Type Description
width number
height number

moveMainCamera(app, offset)Promise.<WorldPositionVector3>

APP의 메인 카메라 시점을 카메라뷰의 시점으로 이동하는 함수

Name Type Description
app U3dApp | undefined
offset Vector3 optional

offset

Returns:
Type Description
Promise.<WorldPositionVector3> promise

moveViewPosition(position, isAutoUpdate)

지정 좌표로 카메라뷰의 위치를 이동시키는 함수입니다.

Name Type Description
position WorldPositionVector3

이동할 좌표 (월드 좌표, EPSG:3857)

isAutoUpdate boolean optional

자동 업데이트 여부

off(type, handler, options)

Name Type Description
type string
handler EventListenerOrEventListenerObject
options boolean | EventListenerOptions optional

on(type, handler, options)EventListenerOrEventListenerObject

Name Type Description
type string
handler EventListenerOrEventListenerObject
options boolean | AddEventListenerOptions optional
Returns:
Type Description
EventListenerOrEventListenerObject

remove()

removeGizmoUI()

Gizmo Controler UI를 제거하는 함수

removeMesh()

시각 분석을 종료하고 분석 Mesh를 제거하는 함수

resetRotation(left, up)

카메라뷰 상하 / 좌우 각을 초기화하는 함수

Name Type Description
left number optional

카메라 좌우 각도 (degree)

up number optional

카메라 상하 각도 (degree)

setAngle(fov)

카메라뷰 fov를 조정하는 함수
fov : 카메라가 한 번에 볼 수 있는 화면의 넓이 (수직 시야)

Name Type Default Description
fov number 50 optional

카메라 fov

setCameraPosition(position)

카메라뷰의 위치를 설정하는 함수

Name Type Description
position Vector3

월드 좌표

setCanvasHeightStyle(height)

Name Type Description
height string

setCanvasWidthStyle(width)

Name Type Description
width string

setDistance(distance)

카메라뷰 총 거리를 지정하는 함수

Name Type Description
distance number

카메라뷰 총 거리

setDrawInterval(intervalFps)

화면에 카메라 뷰를 랜더링할 주기를 설정하는 함수

Name Type Description
intervalFps number

해당 프레임 마다 draw

setLabel(opt)

카메라뷰에 이름 라벨을 설정하는 함수

Name Type Default Description
opt U3dPOICO {} optional

POI 생성 옵션

setRotationLeft(degLeft)

카메라뷰 좌우 각을 지정하는 함수

Name Type Description
degLeft number

좌우 각 (degree)

setRotationUp(degUp)

카메라뷰 상하 각을 지정하는 함수

Name Type Description
degUp number

상하 각 (degree)

setShift(shiftVal)

카메라뷰의 이동 값을 지정하는 함수

Name Type Description
shiftVal Vector3

이동값

setViewSize(width, height)

뷰의 크기를 설정하는 함수

Name Type Description
width number

뷰 너비

height number

뷰 높이

setZoom(zoom)

카메라뷰의 Zoom 강도를 조정하는 함수

Name Type Default Description
zoom number 1 optional

Zoom

show()

카메라뷰 가시화 함수

showHelper(visible)

카메라뷰의 Helper(가시선) 가시화 함수

Name Type Description
visible boolean

가시화여부

showHelperObj()

카메라 뷰의 가이드 객체 (helperObject)를 가시화(show)하는 함수

showLabel()

카메라뷰 라벨 가시화(show) 함수

update()

카메라뷰 화면과 랜더를 업데이트하는 함수

updateLabel(opt)

카메라뷰 라벨을 갱신하는 함수

Name Type Default Description
opt U3dPOICO {} optional

POI 생성 옵션

updatePositionByShift()

카메라뷰의 위치를 이동값에 따라 갱신하는 함수

viewAnalysis(options)Promise.<void>

카메라 시각을 분석하는 함수

Name Type Default Description
options U3dView~ViewAnalyOption {} optional

분석 옵션

Returns:
Type Description
Promise.<void>

Type Definitions

CameraRotationobject

Properties:
Name Type Argument Description
horizontality number

카메라 z축 각도 (수평 각)

Perpendicular number

카메라 x축 각도 (수직 각)

type string <optional>

각도 타입 (radian | degree)

CanvasStyleobject

Properties:
Name Type Argument Description
width string <optional>

canvas 너비 CSS 값

height string <optional>

canvas 높이 CSS 값

U3dViewCOobject

~extends U3dOverlay~U3dOverlayCO
U3dView 생성자 옵션 입니다.

Properties:
Name Type Argument Default Description
usePostProcess boolean <optional>
false

후처리(PostProcess) 적용 여부. true면 적용, false면 적용하지 않음.

canvasStyle object <optional>
{width: "100%", height: "100%"}

canvas DOM Element의 CSS 스타일

left number <optional>
0

좌우(yaw) 회전 각도(Degree). 양수일수록 오른쪽으로 회전한다.

up number <optional>
90

상하(pitch)회전 각도(Degree). 양수일수록 위쪽으로 회전한다.

fov number <optional>
45

수직 시야각(Degree). 양수일수록 더 넓게 보이나 왜곡이 증가 (일반적으로 30–75° 범위)

aspect number <optional>
1

카메라 종횡비(가로/세로)

near number <optional>
0.1

카메라 최소 거리.

far number <optional>
2000

카메라 최대 거리.

visiblehelper boolean <optional>
false

카메라 가시선 표시 여부.

useHelperObj boolean <optional>
true

Gizmo 컨트롤러 부착을 위한 가이드 오브젝트(3D Object) 사용 여부

objScale number <optional>
5

가이드 오브젝트(helperObject) 스케일

useLabel boolean <optional>
true

라벨(POI) 사용 여부.

useBHV boolean <optional>
false

BVH(Bounds Volume Hierarchy) 사용 여부

ViewAnalyOptionobject

Properties:
Name Type Argument Default Description
color ColorRepresentation <optional>
"#f25f5c"

분석 Mesh 색상

opacity number <optional>
0.5

분석 Mesh 투명도

type string <optional>
"Cone"

분석 타입 Cone : 3차원 콘 viewCone : 2차원 뷰콘

distance number <optional>

분석 Mesh 최대 거리

widthSegment number <optional>
100

너비 세그먼트 ( 클수록 촘촘한 분석 Mesh가 생성되지만 분석 시간이 많이 소요됨)

azimuth number <optional>
10

방위각

startOffset number <optional>
10

start 지점에서 생성할 Mesh 까지의 offset 값

start Vector3 <optional>

분석 시작 지점

end Vector3 <optional>

분석 종료 지점

componenet U3dComponentPosition <optional>

대상 컴포넌트