zoukankan      html  css  js  c++  java
  • mago3DJS 应用

    用于3D多块可视化的开源JavaScript库

    生成3D GIS平台,集成和可视化AEC(建筑,工程,建筑)区域和传统的3D空间信息(3D GIS)。将AEC和3D GIS集成到Web浏览器中,室内,室外,无法区分。您可以浏览和协作进行大规模BIM(建筑信息模型),JT(Jupiter Tessellation)和3D GIS文件,而无需在Web浏览器上安装任何程序。

    特性

    • AEC和3D GIS的集成
    • 室内和室外空间的无缝连接
    • 在Web浏览器上运行,不需要单独的插件或ActiveX安装
    • 它基于开源(Cesium,W​​eb World Wind)开发,具有出色的开放性和可扩展性
    • 高效管理和超高速渲染高容量3-D文件

    支持的格式格式

    • IFC(工业基础课程)
    • JT(木星镶嵌)
    • OBJ
    • 3DS
    • COLLADA

    入门

    1.发展环境

    2.来源下载

    • 使用git通过git clone https://github.com/Gaia3D/mago3djs.git将源安装到C: git repository mago3djs 
    • 运行eclipse并导入mago3djs Project Import File -> import -> General -> Projects from Folder or Archive
    • 如果您不使用git,请单击“下载ZIP”链接进行安装。

    3.节点安装

    • 节点安装窗口安装(.msi)64位。
    • 安装完成后,转到C: git repository mago3djs目录。
    • 使用节点包管理器为mago3DJS安装node_modules。
      C:git
      epositorymago3djs> npm install
    • gulp在Terminal中全局安装以使用模块的模型。
      C:git
      epositorymago3djs> npm install -g gulp

    4. F4D转换器安装

    • 安装程序:F4D转换器64位(此安装需要Windows 7或更高版本)
    • 安装路径:C: F4DConverter

    5.数据转换

    • 创建一个目录来存储已更改的f4d(outputFolder) 
      C:f4dprojectname (Create a directory for each project under the data folder, the root folder)
    • 保存要转换为C: demo_data(inputFolder)的数据
    • 以管理员身份运行命令行提示符(cmd.exe)并移至安装F4D Converter的目录
    • 运行 
      ※有关F4D Conveter参数F4D Conveter的描述
      C:F4DConverter>F4DConverter.exe #inputFolder C:demo_f4d #outputFolder C:f4dprojectname #log C:demo_f4d/logTest.txt #indexing y
    • 创建符号链接以将转换后的F4D文件用作mago3D JS项目中的Web服务
      • 使用管理权限运行命令行提示符(cmd.exe)并转到mago3D JS项目
        C:mago3djs
      C:mago3djs>mklink /d "C:git
      epositorymago3djsf4d" "C:f4d" 
      (delete is rmdir data)

    6.编辑配置文件

    添加两个配置文件。(data.json,policy.json)

    data.json

    • 它分为三个主要领域。存储属性值的属性,存储子节点信息的子节点,存储位置信息的其他区域
    • - attributes字段的isPhysical属性是必需属性
    • json的根节点的data_key与f4d文件夹下的项目名称匹配
    {
        //attributes area
        "attributes" : {
          "isPhysical" : false,
          "nodeType": "root",
          "projectType": "project Type"
        },
        //Child node area
        "children" : [
        ],
        //Location information area
        "data_key" : "Project name",
        "data_name" : "Project name"
    }
    • C:f4dprojectname找到要渲染的目录
    • 目录名称中F4D_之后的字符是唯一标识符
    • 将data.json文件中child的data_key值修改为唯一标识符
    • 将纬度,经度,高度,航向,俯仰和滚动值修改为适当的值
    //Child node area
    "children" : [
       {
         "attributes" : {
           "isPhysical" : true,
           "nodeType" : "..."
         },
         "children" : [
         ],
         "data_key" : "Unique identifier",
         "data_name" : "Data name",
         "latitude" : Enter latitude,
         "longitude" : Enter longitude,
         "height" : Enter height,
         "heading" : Enter heading,
         "pitch" : Enter pitch,
         "roll" : Enter roll
      }
    ]
    

    policy.json

    • 要在初始化时加载的项目,Init Camera Latitude,Longitude,CallBack Function,Geo Server setup
    • 如果要加载多个项目在初始化页面时输入要加载的键值
    "geo_data_default_projects": [
        "data.json"
    ]
    • 修复网页启动时移动的位置(lattiude,经度)
    "geo_init_latitude": "Enter latitude",
    "geo_init_longitude": "Enter longitude"
    • 铯离子地形访问令牌设置
      • 下载maago3D JS源代码时,默认使用Cesium World Terrain。
      • 在mago3D JS中发布用于铯地形应用的Cesium离子令牌。https://cesium.com/ion/signin
     "geo_cesium_ion_token": "cesium ion token" 

    7.运行节点服务器

    // If you run the server privately
    C:git
    epositorymago3djs>node server.js
    // If you run the server as public
    C:git
    epositorymago3djs>node server.js --public true
    

    8.浏览器验证

    // Cesium
    http:localhost/sample/cesium.html
    // WorlWind
    http:localhost/sample/worldwind.html
  • 相关阅读:
    嵌入式开发之基于模型的设计思想
    tslib库的移植以及"selected device is not a touchscreen I understand"问题解决
    rocketMq broker.conf全部参数解释
    rocketMq 消息偏移量 Offset
    3、验证,数据绑定和类型转换
    2、springframe Resources
    1、Spring Framework 5.0简述
    POI导出Excel时下拉列表值超过255的问题(String literals in formulas can't be bigger than 255 characters ASCII)
    rocketMq console MQClientException异常
    25. Secure Object Implementations(安全对象实现)
  • 原文地址:https://www.cnblogs.com/w2011/p/11063093.html
Copyright © 2011-2022 走看看