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
  • 相关阅读:
    MySQL通过RPM安装
    HDU4279(2012年天津网络赛---数论分析题)
    Redis实战
    顺序环形队列的各种基本运算
    cocos2d_随手篇1_关于ccTouchBegan的调用
    URAL 1019
    Redis实战之Redis + Jedis
    dataGridView控件--未将对象引用设置添加到对象的实例
    创建 router 连通 subnet- 每天5分钟玩转 OpenStack(100)
    配置 L3 agent
  • 原文地址:https://www.cnblogs.com/haibalai/p/15829596.html
Copyright © 2011-2022 走看看