指定されたHDR形式の画像をロードし、シーンの背景と環境マップに設定します。
const { camera, create, helper, load, controls, animate } = init()
create.ambientLight();
create.directionalLight();
camera.position.set(0, 0, 2);
controls.connect();
load.background(
"/easy-three/texture/hdr/kloofendal_48d_partly_cloudy_puresky_1k.hdr"
);
const cube = create.cube({
rounded: true,
segments: 16,
option: {
color: 0xffffff,
metalness: 0.9,
roughness: 0.1,
}
});
animate(({ delta }) => {
cube.rotation.x += delta;
cube.rotation.y += delta;
});