import * as THREE from 'three'
import SkyBox from 'SkyBox.esm.min.js';
.... 省略 render 代码
/**
创建SkyBox对象,添加到Scene中
**/
const skybox = new SkyBox(renderer, scene, camera)
scene.add(skybox.object) //将天空盒添加到scene中;
await skybox.init();//初始化天空盒
skybox.time = 16 //修改天空盒时间为下午4点
/**
在animate函数中调用render方法以实现动态云移动
**/
animate() {
requestAnimationFrame(this.animate);
this.renderer.render(this.scene, this.camera);
skybox.render();
}
运行效果, 上图为Skybox日落效果截图,下图为Skybox夜晚效果截图。
4. 证书与授权
This software is provided by 中交简石数字科技(苏州)有限公司 (hereinafter referred to as "Licensor") under the following terms and conditions:
Grant of License: Licensor hereby grants to you a non-exclusive, non-transferable license to use this software on one computer for your own personal or internal business purposes.
Use Restrictions: You may not copy, modify, reverse engineer, decompile, disassemble, or otherwise attempt to discover the source code of this software. You may not sublicense, assign, rent, loan, sell, or transfer any rights in or to this software except with the express written consent of Licensor.
No Export: You may not export this software to any country or region without the prior written permission of Licensor.
Term and Termination: This license will remain in effect until terminated. You may terminate it at any time by destroying all copies of this software. It will also automatically terminate if you fail to comply with any term or condition of this agreement. Upon termination, you must destroy all copies of this software.
Limited Warranty: Licensor warrants that the software will perform in substantial accordance with its accompanying documentation for a period of ninety (90) days from the date of delivery. If the software does not perform substantially in accordance with such documentation, Licensor will, at its option, either replace the software or refund the license fee paid by you.