SetSnowDrawArea
환경 날씨 눈 그려지는 영역 설정
Parameters
| Name | Type | Description |
|---|---|---|
| bbox | VIZCore.BBox | BoundBox |
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.EnableSnow(true);
// 환경 날씨 눈 그려지는 수 설정
vizcore.View.Weather.SetSnowDrawCount(10000);
// 환경 날씨 눈 그려지는 영역 설정
let bbox = new VIZCore.BBox();
bbox.min.set(0,0,0);
bbox.max.set(10000,10000,10000);
bbox.update();
vizcore.View.Weather.SetSnowDrawArea(bbox);
// 정의된 날씨 반복 재생
vizcore.View.Weather.SetRepeatRender(true);
};
let option = {
event: {
onInit: onInit,
}
}
vizcore.Init(option);