본문으로 건너뛰기

SetCloudTemplate

환경 날씨 구름 적용

Parameters

NameTypeDescription
levelNumber0 ~ 4 (0 = 구름 없음, 1 = 조금, 2 = 보통, 3 = 많음, 4 = 흐린 구름 매우 많음 )

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);
// 모델정보 로딩 완료
}
};

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

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

// 환경 날씨 구름 적용
vizcore.View.Weather.SetCloudTemplate(3);
};

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

vizcore.Init(option);