zoukankan      html  css  js  c++  java
  • 初遇Citymaker (五)

    针对设置citymaker 天空盒工具类skyBox

    ```javascript

    import { cw5 } from "../index.js";
    export const skyBox = {};

    /**

      • 设置天空盒图片
      • @param baseUrl 天空盒图片的基础路径
      • @param images 天空盒图片的对象
        */
        skyBox.setSkybox = function (baseUrl, images,userDefine) {
        let __g = document.getElementById("__g");
        try {
        if(userDefine!=null){
        let skyboxObj = __g.objectManager.getSkyBox(0);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageBack, userDefine.backImage);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageBottom, userDefine.bottomImage);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageFront, userDefine.frontImage);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageLeft, userDefine.leftImage);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageRight, userDefine.rightImage);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageTop, userDefine.topImage);
        return;
        }
        else if (map3dConfig.skyboxnode) {
        let skyboxObj = __g.objectManager.getSkyBox(0);
        let skyboxnode = images || map3dConfig.skyboxnode;
        baseUrl = baseUrl || ( BASE_URL + map3dConfig.skyboxnode.path );
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageBack, baseUrl + skyboxnode.backImage);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageBottom, baseUrl + skyboxnode.bottomImage);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageFront, baseUrl + skyboxnode.frontImage);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageLeft, baseUrl + skyboxnode.leftImage);
        skyboxObj.setImagePath(cw5.innerConfig.gviSkyboxImageIndex.gviSkyboxImageRight,
      • 更多参考 https://xiaozhuanlan.com/topic/3045986172
  • 相关阅读:
    javascript 时间与时间戳的转换
    javascript 判断对象的内置类型
    javascript 动态脚本添加
    javascript select标签的操作
    javascript canvas画订单
    css 移动端图片等比显示处理
    FastDFS分布式文件系统
    欧拉回路--模板
    tarjan求双联通分量--POJ 1523 +P2860 [USACO06JAN]Redundant Paths G
    tarjan求割点和割边
  • 原文地址:https://www.cnblogs.com/haibalai/p/15829596.html
Copyright © 2011-2022 走看看