본문으로 건너뛰기

SetObjectDisableViewDistanceBBoxByArray

지정한 개체 설정 거리보다 먼 경우 박스 표시 설정 미적용 (SetViewDistanceBox으로 지정한 파일 ID만 적용)

Parameters

NameTypeDescription
filekeyString파일 ID
origin_idsNumber[]Origin IDs Array
disableBooleantrue : 미적용으로 설정 , false : 적용

Example

import VIZ3DCore from "./VIZCore3D/VIZCore.js";
import { VIZCore } from "./VIZCore3D/VIZCore.js";

let view = document.getElementById("view");
view.className = "VIZCore";
let vizcore = new VIZ3DCore(view);

// 파일 로딩 완료 시점 확인
let onModelLoadingCompleted = function (e, loadType) {
console.log("Loading Completed :: ", e);
if (loadType === VIZCore.Enum.CONFIG_KEY.LOADER.COMPLETEDTIME.STRUCTURE) {
console.log("onLoad Structure :: ", e);
// 구조정보 로딩 완료
}
if (loadType === VIZCore.Enum.CONFIG_KEY.LOADER.COMPLETEDTIME.MESH) {
console.log("onLoad Mesh :: ", e);
// 모델정보 로딩 완료

// 설정 거리보다 먼 경우 박스 로 표시(로딩이 완료된 후)
vizcore.Object3D.SetViewDistanceBox('example', 0.1);

//지정한 개체 설정 거리보다 먼 경우 박스 표시 설정 미적용 (SetViewDistanceBox으로 지정한 파일 ID만 적용)
vizcore.Object3D.SetObjectDisableViewDistanceBBoxByArray("example", [3, 11], true);
}
};

let onInit = () => {
let fileKey = 'example'
let url = './VIZCore3D/Model/toycar/vizw/toycar_wh.vizw';

vizcore.Model.OpenHeader(url, fileKey, onModelLoadingCompleted);
};

let option = {
event: {
onInit: onInit,
}
}

vizcore.Init(option);