liuyg
2021-06-22 1a2c1d005bf7de2528f73638fb24d31da812aad5
增加模型
10 files modified
8 files added
800 ■■■■■ changed files
images/gltf/CesiumBalloon.glb patch | view | raw | blame | history
images/gltf/CesiumDrone.glb patch | view | raw | blame | history
images/gltf/CesiumMilkTruck.bin patch | view | raw | blame | history
images/gltf/CesiumMilkTruck.glb patch | view | raw | blame | history
images/gltf/CesiumMilkTruck.gltf 592 ●●●●● patch | view | raw | blame | history
images/gltf/CesiumMilkTruck.png patch | view | raw | blame | history
images/gltf/Cesium_Air.glb patch | view | raw | blame | history
images/gltf/GroundVehicle.glb patch | view | raw | blame | history
widgets/digTheEarth/Widget.html 3 ●●●● patch | view | raw | blame | history
widgets/digTheEarth/Widget.js 5 ●●●● patch | view | raw | blame | history
widgets/digTheEarth/css/style.css 16 ●●●●● patch | view | raw | blame | history
widgets/legends/css/style.css 2 ●●● patch | view | raw | blame | history
widgets/modelDiagram/Widget.html 39 ●●●●● patch | view | raw | blame | history
widgets/modelDiagram/Widget.js 97 ●●●●● patch | view | raw | blame | history
widgets/modelDiagram/css/style.css 36 ●●●● patch | view | raw | blame | history
widgets/profileAnalysis/css/style.css 4 ●●● patch | view | raw | blame | history
widgets/spatialAnalysis/Widget.js 2 ●●● patch | view | raw | blame | history
widgets/visibleArea/css/style.css 4 ●●● patch | view | raw | blame | history
images/gltf/CesiumBalloon.glb
Binary files differ
images/gltf/CesiumDrone.glb
Binary files differ
images/gltf/CesiumMilkTruck.bin
Binary files differ
images/gltf/CesiumMilkTruck.glb
Binary files differ
images/gltf/CesiumMilkTruck.gltf
New file
@@ -0,0 +1,592 @@
{
  "asset": {
    "generator": "COLLADA2GLTF",
    "version": "2.0"
  },
  "scene": 0,
  "scenes": [
    {
      "nodes": [
        0
      ]
    }
  ],
  "nodes": [
    {
      "mesh": 0,
      "children": [
        3,
        1
      ],
      "matrix": [
        0,
        0,
        1,
        0,
        0,
        1,
        0,
        0,
        -1,
        0,
        0,
        0,
        0,
        0,
        0,
        1
      ]
    },
    {
      "children": [
        2
      ],
      "matrix": [
        1,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        1,
        0,
        -1.352329969406128,
        0.4277220070362091,
        -2.98022992950564e-8,
        1
      ]
    },
    {
      "mesh": 1,
      "rotation": [
        0,
        0,
        0.08848590403795242,
        -0.9960774183273317
      ]
    },
    {
      "children": [
        4
      ],
      "matrix": [
        1,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        1,
        0,
        1.432669997215271,
        0.4277220070362091,
        -2.98022992950564e-8,
        1
      ]
    },
    {
      "mesh": 1,
      "rotation": [
        0,
        0,
        0.08848590403795242,
        -0.9960774183273317
      ]
    }
  ],
  "meshes": [
    {
      "primitives": [
        {
          "attributes": {
            "NORMAL": 5,
            "POSITION": 6,
            "TEXCOORD_0": 7
          },
          "indices": 4,
          "mode": 4,
          "material": 0,
          "extensions": {
            "KHR_draco_mesh_compression": {
              "bufferView": 2,
              "attributes": {
                "NORMAL": 0,
                "POSITION": 1,
                "TEXCOORD_0": 2
              }
            }
          }
        },
        {
          "attributes": {
            "NORMAL": 9,
            "POSITION": 10
          },
          "indices": 8,
          "mode": 4,
          "material": 1,
          "extensions": {
            "KHR_draco_mesh_compression": {
              "bufferView": 3,
              "attributes": {
                "NORMAL": 0,
                "POSITION": 1
              }
            }
          }
        },
        {
          "attributes": {
            "NORMAL": 12,
            "POSITION": 13
          },
          "indices": 11,
          "mode": 4,
          "material": 2,
          "extensions": {
            "KHR_draco_mesh_compression": {
              "bufferView": 4,
              "attributes": {
                "NORMAL": 0,
                "POSITION": 1
              }
            }
          }
        }
      ],
      "name": "Cesium_Milk_Truck"
    },
    {
      "primitives": [
        {
          "attributes": {
            "NORMAL": 15,
            "POSITION": 16,
            "TEXCOORD_0": 17
          },
          "indices": 14,
          "mode": 4,
          "material": 3,
          "extensions": {
            "KHR_draco_mesh_compression": {
              "bufferView": 5,
              "attributes": {
                "NORMAL": 0,
                "POSITION": 1,
                "TEXCOORD_0": 2
              }
            }
          }
        }
      ],
      "name": "Wheels"
    }
  ],
  "animations": [
    {
      "channels": [
        {
          "sampler": 0,
          "target": {
            "node": 4,
            "path": "rotation"
          }
        },
        {
          "sampler": 1,
          "target": {
            "node": 2,
            "path": "rotation"
          }
        }
      ],
      "samplers": [
        {
          "input": 0,
          "interpolation": "LINEAR",
          "output": 1
        },
        {
          "input": 2,
          "interpolation": "LINEAR",
          "output": 3
        }
      ]
    }
  ],
  "accessors": [
    {
      "bufferView": 0,
      "byteOffset": 0,
      "componentType": 5126,
      "count": 31,
      "max": [
        1.25
      ],
      "min": [
        0
      ],
      "type": "SCALAR"
    },
    {
      "bufferView": 1,
      "byteOffset": 0,
      "componentType": 5126,
      "count": 31,
      "max": [
        0,
        0,
        0.9990190863609314,
        1
      ],
      "min": [
        0,
        0,
        0,
        -0.9960774183273317
      ],
      "type": "VEC4"
    },
    {
      "bufferView": 0,
      "byteOffset": 124,
      "componentType": 5126,
      "count": 31,
      "max": [
        1.25
      ],
      "min": [
        0
      ],
      "type": "SCALAR"
    },
    {
      "bufferView": 1,
      "byteOffset": 496,
      "componentType": 5126,
      "count": 31,
      "max": [
        0,
        0,
        0.9990190863609314,
        1
      ],
      "min": [
        0,
        0,
        0,
        -0.9960774183273317
      ],
      "type": "VEC4"
    },
    {
      "componentType": 5123,
      "count": 5232,
      "max": [
        1855
      ],
      "min": [
        0
      ],
      "type": "SCALAR"
    },
    {
      "componentType": 5126,
      "count": 1856,
      "max": [
        1,
        1,
        1
      ],
      "min": [
        -1,
        -1,
        -1
      ],
      "type": "VEC3"
    },
    {
      "componentType": 5126,
      "count": 1856,
      "max": [
        2.437999963760376,
        2.5843698978424072,
        1.3960000276565552
      ],
      "min": [
        -2.430910110473633,
        0.2667999863624573,
        -1.3960000276565552
      ],
      "type": "VEC3"
    },
    {
      "componentType": 5126,
      "count": 1856,
      "max": [
        0.8964580297470093,
        0.997245192527771
      ],
      "min": [
        0.002956389915198088,
        0.015672028064727783
      ],
      "type": "VEC2"
    },
    {
      "componentType": 5123,
      "count": 168,
      "max": [
        71
      ],
      "min": [
        0
      ],
      "type": "SCALAR"
    },
    {
      "componentType": 5126,
      "count": 72,
      "max": [
        0.957480013370514,
        0.28850099444389343,
        1
      ],
      "min": [
        -1,
        0,
        -1
      ],
      "type": "VEC3"
    },
    {
      "componentType": 5126,
      "count": 72,
      "max": [
        1.6011799573898315,
        2.3545401096343994,
        1.3960000276565552
      ],
      "min": [
        0.22885000705718997,
        1.631850004196167,
        -1.3960000276565552
      ],
      "type": "VEC3"
    },
    {
      "componentType": 5123,
      "count": 864,
      "max": [
        463
      ],
      "min": [
        0
      ],
      "type": "SCALAR"
    },
    {
      "componentType": 5126,
      "count": 464,
      "max": [
        1,
        1,
        1
      ],
      "min": [
        -1,
        -1,
        -1
      ],
      "type": "VEC3"
    },
    {
      "componentType": 5126,
      "count": 464,
      "max": [
        1.62267005443573,
        2.3919999599456787,
        1.100000023841858
      ],
      "min": [
        0.1932000070810318,
        1.5961999893188477,
        -1.1100000143051147
      ],
      "type": "VEC3"
    },
    {
      "componentType": 5123,
      "count": 2304,
      "max": [
        585
      ],
      "min": [
        0
      ],
      "type": "SCALAR"
    },
    {
      "componentType": 5126,
      "count": 586,
      "max": [
        0.9990389943122864,
        0.9990379810333252,
        1
      ],
      "min": [
        -0.9990379810333252,
        -0.9990379810333252,
        -1
      ],
      "type": "VEC3"
    },
    {
      "componentType": 5126,
      "count": 586,
      "max": [
        0.4277999997138977,
        0.4277999997138977,
        1.0579999685287476
      ],
      "min": [
        -0.4277999997138977,
        -0.4277999997138977,
        -1.0579999685287476
      ],
      "type": "VEC3"
    },
    {
      "componentType": 5126,
      "count": 586,
      "max": [
        0.9936569929122924,
        0.9895756244659424
      ],
      "min": [
        0.6050930023193359,
        0.00905001163482666
      ],
      "type": "VEC2"
    }
  ],
  "materials": [
    {
      "pbrMetallicRoughness": {
        "baseColorTexture": {
          "index": 0
        },
        "metallicFactor": 0
      },
      "name": "truck"
    },
    {
      "pbrMetallicRoughness": {
        "baseColorFactor": [
          0,
          0.04050629958510399,
          0.021240700036287308,
          1
        ],
        "metallicFactor": 0
      },
      "name": "glass"
    },
    {
      "pbrMetallicRoughness": {
        "baseColorFactor": [
          0.06400000303983688,
          0.06400000303983688,
          0.06400000303983688,
          1
        ],
        "metallicFactor": 0
      },
      "name": "window_trim"
    },
    {
      "pbrMetallicRoughness": {
        "baseColorTexture": {
          "index": 1
        },
        "metallicFactor": 0
      },
      "name": "wheels"
    }
  ],
  "textures": [
    {
      "sampler": 0,
      "source": 0
    },
    {
      "sampler": 0,
      "source": 0
    }
  ],
  "images": [
    {
      "uri": "CesiumMilkTruck.png"
    }
  ],
  "samplers": [
    {
      "magFilter": 9729,
      "minFilter": 9986,
      "wrapS": 10497,
      "wrapT": 10497
    }
  ],
  "bufferViews": [
    {
      "buffer": 0,
      "byteOffset": 0,
      "byteLength": 248
    },
    {
      "buffer": 0,
      "byteOffset": 248,
      "byteLength": 992
    },
    {
      "buffer": 0,
      "byteOffset": 1240,
      "byteLength": 7871
    },
    {
      "buffer": 0,
      "byteOffset": 9111,
      "byteLength": 474
    },
    {
      "buffer": 0,
      "byteOffset": 9585,
      "byteLength": 1249
    },
    {
      "buffer": 0,
      "byteOffset": 10834,
      "byteLength": 3137
    }
  ],
  "buffers": [
    {
      "byteLength": 13971,
      "uri": "CesiumMilkTruck.bin"
    }
  ],
  "extensionsRequired": [
    "KHR_draco_mesh_compression"
  ],
  "extensionsUsed": [
    "KHR_draco_mesh_compression"
  ]
}
images/gltf/CesiumMilkTruck.png
images/gltf/Cesium_Air.glb
Binary files differ
images/gltf/GroundVehicle.glb
Binary files differ
widgets/digTheEarth/Widget.html
@@ -5,7 +5,8 @@
            <input id="depth" type="number" value="500" required="required" style="width:90px;" />
        </div>
        <div class="param-item">
            <button type="button" id="cleardigTheEarth" style="float:right;" class="button black">清除</button>
            <button type="button" id="beginigTheEarth" class="button black">开挖</button>
            <button type="button" id="cleardigTheEarth" class="button black">清除</button>
        </div>
    </div>
    <i class="layui-icon closeOUR">
widgets/digTheEarth/Widget.js
@@ -27,7 +27,10 @@
                    that.closesDigTheEarth();
                })
                // that.beginDigTheEarth();
                $("#beginigTheEarth").click(()=>{
                    that.beginDigTheEarth();
                })
            },
            beginDigTheEarth: function () {
                var that = this
widgets/digTheEarth/css/style.css
@@ -54,3 +54,19 @@
.jimu-widget-digTheEarth #cleardigTheEarth:hover {
  box-shadow: 2px 2px 20px -2px #1a8ff0;
}
.jimu-widget-digTheEarth #beginigTheEarth {
  width: 60px;
  height: 30px;
  margin-top: 10px;
  border: 1px solid transparent;
  background-color: transparent;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 2px 2px 15px -2px #39A5FD;
}
.jimu-widget-digTheEarth #beginigTheEarth:hover {
  box-shadow: 2px 2px 20px -2px #1a8ff0;
}
widgets/legends/css/style.css
@@ -28,7 +28,7 @@
}
.jimu-widget-legends .main {
  max-height: 280px !important;
  max-height: 278px !important;
  overflow: auto;
  transition: all 0.5s;
}
widgets/modelDiagram/Widget.html
@@ -43,11 +43,44 @@
        </tbody>
      </table>
    </div> -->
  <div id="modelDiagramCHONGFU" title="建议先点击单次添加">
    输入重复多少:
    <div>
      <span>宽个数:</span> <input type="number" id="modelDiagramW" value="3" placeholder="经度">
    </div>
    <div>
      <span>宽间距:</span> <input type="number" id="modelDiagramJW" value="1" placeholder="经度">
    </div>
    <div>
      <span>长个数:</span> <input type="number" id="modelDiagramH" value="3" placeholder="经度">
    </div>
    <div>
      <span>长间距:</span> <input type="number" id="modelDiagramJH" value="1" placeholder="经度">
    </div>
    <div style="position: relative;top:10px;">
      <button type="button" id="modelDYes" class="layui-btn layui-btn-normal" layui-btn-xs
        style="border-radius: 5px;height:30px;line-height: 30px;">确定</button>
      <button type="button" id="modelDNo" class="layui-btn layui-btn-danger" layui-btn-xs
        style="border-radius: 5px;height:30px;line-height: 30px;">取消</button>
    </div>
  </div>
  <div class="modelDiagramMain" >
    <button class="layui-btn layui-btn-primary models">
      人偶
      <i class="layui-icon layui-icon-down layui-font-12"></i>
    </button>
    <div class="inp">
      <input type="number" class="closemodoinput" id="modelDiagramjdu" value="116.00001" placeholder="经度">
      <input type="number" class="closemodoinput" id="modelDiagramwdu" value="29.00001" placeholder="纬度">
      <input type="number" class="closemodoinput" id="modelDiagramgdu" value="1000" placeholder="高度">
      <div>
        <span>经度:</span> <input type="number" class="closemodoinput" id="modelDiagramjdu" value="116.00001"
          placeholder="经度">
      </div>
      <div>
        <span>纬度:</span> <input type="number" class="closemodoinput" id="modelDiagramwdu" value="28.973468"
          placeholder="经度">
      </div>
      <div>
        <span>高度:</span> <input type="number" class="closemodoinput" id="modelDiagramgdu" value="1000" placeholder="经度">
      </div>
    </div>
    <div class="seemodo">跟踪</div>
    <div class="closemodo">添加/删除</div>
widgets/modelDiagram/Widget.js
@@ -47,36 +47,115 @@
                $('.jimu-widget-modelDiagram').find('.always').unbind("mousedown").bind("mousedown", function (event) {
                    if (event.which == 3) {
                        // console.log('you');
                        if ($("#modelDiagramCHONGFU").is(":hidden")) {//判断是否隐藏
                            $('#modelDiagramCHONGFU').show();
                            $('#modelDYes').click(() => {
                        that.getInput();
                        var as = that.a - 0.00004
                            , bs = that.b - 0.00004;
                        for (var i = 1; i <= 7; i++) {
                                var W = $('#modelDiagramW').val()
                                    , H = $('#modelDiagramH').val()
                                    , JW = $('#modelDiagramJW').val()
                                    , JH = $('#modelDiagramJH').val()
                                    , as = that.a - (0.00001 * ((+H + 1) / 2)) * JH
                                    , bs = that.b - (0.00001 * ((+W + 1) / 2)) * JW;
                                for (var i = 1; i <= H; i++) {
                            var aa = as * 100000;
                            aa += i;
                                    aa += i * JH;
                            aa = aa / 100000;
                            for (var n = 1; n <= 6; n++) {
                                    for (var n = 1; n <= W; n++) {
                                var bb = bs * 100000;
                                bb += n;
                                        bb += n * JW;
                                bb = bb / 100000;
                                // console.log(aa,bb)
                                that.always(aa, bb);
                            }
                        }
                            })
                            $('#modelDNo').click(() => {
                                $('#modelDiagramCHONGFU').hide();
                            })
                        }
                    } else if (event.which == 1) {
                        // console.log('zuo');
                    }
                });
                $('.jimu-widget-modelDiagram').find('.closesmodelDiagram').click(() => {
                    $('.jimu-widget-modelDiagram').hide();
                    that.stopPlay();
                })
                //初演示
                layui.use(['dropdown', 'util', 'layer', 'table'], function () {
                    var dropdown = layui.dropdown
                        , layer = layui.layer;
                    dropdown.render({
                        elem: '.models'
                        , data: [{
                            title: '人偶'
                            , value: './images/gltf/Cesium_Man.glb'
                            , id: 100
                            , num: [3, 3, 1, 1]
                        }, {
                            title: '飞机'
                            , value: './images/gltf/Cesium_Air.glb'
                            , id: 101
                            , num: [3, 3, 30, 30]
                        }, {
                            title: '飞机2'
                            , value: './images/gltf/CesiumDrone.glb'
                            , id: 102
                            , num: [3, 3, 7, 7]
                        }, {
                            title: '装甲车'
                            , value: './images/gltf/GroundVehicle.glb'
                            , id: 103
                            , num: [3, 3, 4, 9]
                        }, {
                            title: '热气球'
                            , value: './images/gltf/CesiumBalloon.glb'
                            , id: 104
                            , num: [3, 3, 1, 1]
                        }, {
                            title: '牛奶车动画'
                            , value: './images/gltf/CesiumMilkTruck.glb'
                            , id: 105
                            , num: [3, 3, 1, 1]
                        }, {
                            title: '牛奶车gltf'
                            , value: './images/gltf/CesiumMilkTruck.gltf'
                            , id: 106
                            , num: [3, 3, 1, 1]
                        }, {
                            title: '人gltf'
                            , value: './images/gltf/walk.gltf'
                            , id: 107
                            , num: [3, 3, 1, 1]
                        }
                        ]
                        , click: function (obj) {
                            layer.tips('选择了:' + obj.title, this.elem, { tips: [1, '#5FB878'] });
                            that.urls = obj.value;
                            var dom = $('.models');
                            dom.empty();
                            var str = `${obj.title} <i class="layui-icon layui-icon-down layui-font-12"></i>`
                            dom.append(str);
                            that.setNum(obj.num)
                        }
                    });
                });
            },
            beginCesium: function (a = 116.058987, b = 28.973468, g = 1000, once = 'always') {
            urls: './images/gltf/Cesium_Man.glb',
            setNum: function (num) {
                $('#modelDiagramW').val(num[0])
                $('#modelDiagramH').val(num[1])
                $('#modelDiagramJW').val(num[2])
                $('#modelDiagramJH').val(num[3])
            },
            beginCesium: function (a, b, g, once) {
                var viewer = this.map
                    , that = this
                    , url = "./images/gltf/Cesium_Man.glb";
                    , url = that.urls;
                //静态
                // var position = Cesium.Cartesian3.fromDegrees(116.058987, 28.973468, 1000);
widgets/modelDiagram/css/style.css
@@ -1,7 +1,7 @@
.jimu-widget-modelDiagram {
  position: absolute !important;
  font-size: 14px;
  height: 120px !important;
  height: 180px !important;
  width: 280px !important;
  /* 240px */
  background: rgb(254, 254, 254);
@@ -15,7 +15,7 @@
  right: 383px !important;
  left: auto !important;
  box-shadow: 0 0 8px #fff;
  display: none;
  /* display: none; */
}
.jimu-widget-modelDiagram .seemodo {
@@ -36,15 +36,18 @@
.jimu-widget-modelDiagram .modelDiagramMain {
  width: 230px;
  height: 110px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: absolute;
  top: 1.5px;
  left: 10px;
  top: 8px;
  left: 15px;
  cursor: pointer;
}
.jimu-widget-modelDiagram .modelDiagramMain button{
  line-height: 12px;
}
.jimu-widget-modelDiagram .inp {
@@ -58,7 +61,7 @@
}
.jimu-widget-modelDiagram .inp .closemodoinput {
  width: 200px;
  width: 180px;
}
.jimu-widget-modelDiagram .but {
@@ -103,3 +106,24 @@
.jimu-widget-modelDiagram .closesmodelDiagram:hover {
  color: red;
}
#modelDiagramCHONGFU{
  z-index: 20;
  position: absolute;
  top: 180px;
  left: 140px;
  width: 170px;
  height: 150px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 5px ;
  box-shadow: 0px 0px 5px #378ef1;
  display: none;
}
#modelDiagramCHONGFU input{
  width: 80px;
}
widgets/profileAnalysis/css/style.css
@@ -36,9 +36,7 @@
}
.jimu-widget-profileAnalysis #toolbar #chooseViews:hover, .jimu-widget-profileAnalysis #toolbar #clears:hover {
  background-color: #3E9FFC;
  box-shadow: 3px 3px 20px -4px #000000;
  filter: grayscale(100%) brightness(200%);
  box-shadow: 3px 3px 20px -5px #1a8fee;
}
.jimu-widget-profileAnalysis #toolbar .closes {
widgets/spatialAnalysis/Widget.js
@@ -252,7 +252,7 @@
                $('.digTheEarth-tool').click(function () {
                    that.closeOnceUse('digTheEarth');
                    $(".jimu-widget-digTheEarth").show();
                    topic.publish('beginDigTheEarth', 'beginDigTheEarth');
                    // topic.publish('beginDigTheEarth', 'beginDigTheEarth');
                })
widgets/visibleArea/css/style.css
@@ -56,9 +56,7 @@
}
.jimu-widget-visibleArea #toolbar #chooseView:hover, .jimu-widget-visibleArea #toolbar #clear:hover {
  background-color: #3E9FFC;
  box-shadow: 3px 3px 20px -4px #000000;
  filter: grayscale(100%) brightness(200%);
  box-shadow: 3px 3px 20px -5px #1696ff;
}
.jimu-widget-visibleArea #toolbar .closes {