国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

基于WebGL架構的3D可視化平臺—新風系統演示

buildupchao / 2738人閱讀

摘要:實施方案是采用高風壓大流量風機依靠機械強力由一側向室內送風,由另一側用專門設計的排風風機向室外排出的方式強迫在系統內形成新風流動場。接下來就用平臺來搭建一個新風系統第一步,利用搭建模擬場景。

新風系統是根據在密閉的室內一側用專用設備向室內送新風,再從另一側由專用設備向室外排出,在室內會形成“新風流動場”,從而滿足室內新風換氣的需要。實施方案是:采用高風壓、大流量風機、依靠機械強力由一側向室內送風,由另一側用專門設計的排風風機向室外排出的方式強迫在系統內形成新風流動場。在送風的同時對進入室內的空氣進過濾、消毒、殺菌、增氧、預熱(冬天)。

接下來就用ThingJs平臺來搭建一個新風系統

第一步,利用CampusBuilder搭建模擬場景。CampusBuilder的模型庫有各種各樣的模型,使我們搭建出的場景更逼真。

//加載場景代碼
var app = new THING.App({
    // 場景地址
    "url": "http://www.thingjs.com/./uploads/wechat/oLX7p05lsWJZUIxnIWsNXAzJ40X8/scene/新風演示2",

});

第二步,創建三個數組來保存每個風的模型。、

var hotWindGroup = [];
var coolWindGroup = [];
var newWindGroup = [];
var wind = null;

第三步,構造一個創建風的函數,為了方便創建風及其位置,我們選取排風設備為風的父物體,將創建出來的風的visiable屬性設置為false(這里這個坐標問題可以看一下官網的教程中控制物體中的坐標轉換)。

function createWind(parent, x, y, angle, localPosition, color, group) {
    rs = app.query(parent)[0];
    wind = app.create({
        type: "Thing",
        name: "hotWind",
        url: "http://model.3dmomoda.cn/models/4da706d8a37047298c0318a5b9546abd/0/gltf/",
        localPosition: localPosition,
        scale: [1, 2, 1],
        angle: angle,
        parent: rs,
    });
    wind.style.color = color;
    wind.visible = false;
    wind.rotateX(x);
    wind.rotateY(y);
    group.push(wind);
}

第四步,開始創建風模型,并調整一下攝像機的角度及位置。

app.on("load", function () {
    //攝像機角度
    app.camera.position = [-22.91452445633646, 30.46296743148116, -23.83548169673341];
    app.camera.target = [-13.532807014407252, 5.6565539015865856, -3.3431546399681276];
    //hotWind
    createWind("空調1", 0, 0, 0, [0, -2, 0], "#FF0000", hotWindGroup);
    createWind("空調1", 0, 0, 0, [0, -2, 0.5], "#FF0000", hotWindGroup);
    createWind("空調1", 0, 0, 0, [0, -2, 1], "#FF0000", hotWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 0], "#FF0000", hotWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 0.5], "#FF0000", hotWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 1], "#FF0000", hotWindGroup);
    //coolWind
    createWind("空調1", 0, 0, 0, [0, -2, 0], "#0000FF", coolWindGroup);
    createWind("空調1", 0, 0, 0, [0, -2, 0.5], "#0000FF", coolWindGroup);
    createWind("空調1", 0, 0, 0, [0, -2, 1], "#0000FF", coolWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 0], "#0000FF", coolWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 0.5], "#0000FF", coolWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 1], "#0000FF", coolWindGroup);
    //newWind
    createWind("排風1", -50, 0, 0, [0, -0.5, 2], "#00FF00", newWindGroup);
    createWind("排風1", -50, 0, 0, [0, -0.5, 4], "#00FF00", newWindGroup);
    createWind("排風1", -50, 0, 0, [0, -0.5, 6], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [2, -0.5, 7], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [4, -0.5, 8], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [6, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [8, -0.5, 12], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [10, -0.5, 15], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [12, -0.5, 18], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [10, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [14, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [18, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [22, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [26, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風2", -50, 0, 0, [0, -0.5, 2], "#00FF00", newWindGroup);
    createWind("排風3", -50, 0, 0, [0, -0.5, 2], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 2], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 4], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 6], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 8], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 10], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 12], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 50, [2, -0.6, 12], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 50, [4, -0.7, 12], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 50, [6, -0.8, 13], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [8, -0.8, 11], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [12, -0.8, 9], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [16, -0.8, 7], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [20, -0.8, 5], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [24, -0.8, 3], "#00FF00", newWindGroup);
    createWind("排風4", -90, 0, 90, [8, -0.8, 13], "#00FF00", newWindGroup);
    createWind("排風4", -90, 0, 90, [12, -0.8, 13], "#00FF00", newWindGroup);
    createWind("排風4", -90, 0, 90, [16, -0.7, 13], "#00FF00", newWindGroup);
    createWind("排風4", -90, 0, 90, [20, -0.6, 13], "#00FF00", newWindGroup);
    //createWind("排風4", -90, 0, 90, [24, -0.5, 13], "#00FF00", newWindGroup);

    //熱風演示
    new THING.widget.Button("熱風演示", function () {
        for (let i of coolWindGroup) {
            i.visible = false;
        };
        for (let i of hotWindGroup) {
            i.visible = true;
        };

    });

    //冷風演示
    new THING.widget.Button("冷風演示", function () {
        for (let i of coolWindGroup) {
            i.visible = true;
        };
        for (let i of hotWindGroup) {
            i.visible = false;
        };
    });

    //新風演示
    new THING.widget.Button("新風演示", function () {
        playNewWind();
    });

    function playNewWind() {
        for (var i = 0; i < newWindGroup.length; i++) {
            if(i==newWindGroup.length-1)
            return;
            newWindGroup[i].visible = true;
            newWindGroup[i].moveTo({
                "time": 4000,
                "position": newWindGroup[i+1].position,
            });
        }
});

第五步,運行項目。演示地址

思考與總結:

首先就是空間坐標系下轉父物體坐標真是弄暈了,看了官網的教程多少理解了一點。剛開始的時候我一直認為我的子物體以父物體坐標下放置的時候,子物體坐標軸的問題指向的問題。看了教程發現自己的擔心多余了,就好像是人戴鴨舌帽帽子不管戴在誰的頭上都一樣。

其次就是讓風動起來,最初是想讓一個模型在空間中運動,發現效果不好用。最后就創建了多個模型他們對應著有各自的點,讓每一個模型向他下一個模型的位置移動實現運動。

完整代碼

/加載場景代碼
var app = new THING.App({
    // 場景地址
    "url": "http://www.thingjs.com/./uploads/wechat/oLX7p05lsWJZUIxnIWsNXAzJ40X8/scene/新風演示2",

});

var hotWindGroup = [];
var coolWindGroup = [];
var newWindGroup = [];
var wind = null;

function createWind(parent, x, y, angle, localPosition, color, group) {
    rs = app.query(parent)[0];
    wind = app.create({
        type: "Thing",
        name: "hotWind",
        url: "http://model.3dmomoda.cn/models/4da706d8a37047298c0318a5b9546abd/0/gltf/",
        localPosition: localPosition,
        scale: [1, 2, 1],
        angle: angle,
        parent: rs,
    });
    wind.style.color = color;
    wind.visible = false;
    wind.rotateX(x);
    wind.rotateY(y);
    group.push(wind);
}

app.on("load", function () {
    //攝像機角度
    app.camera.position = [-22.91452445633646, 30.46296743148116, -23.83548169673341];
    app.camera.target = [-13.532807014407252, 5.6565539015865856, -3.3431546399681276];
    //hotWind
    createWind("空調1", 0, 0, 0, [0, -2, 0], "#FF0000", hotWindGroup);
    createWind("空調1", 0, 0, 0, [0, -2, 0.5], "#FF0000", hotWindGroup);
    createWind("空調1", 0, 0, 0, [0, -2, 1], "#FF0000", hotWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 0], "#FF0000", hotWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 0.5], "#FF0000", hotWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 1], "#FF0000", hotWindGroup);
    //coolWind
    createWind("空調1", 0, 0, 0, [0, -2, 0], "#0000FF", coolWindGroup);
    createWind("空調1", 0, 0, 0, [0, -2, 0.5], "#0000FF", coolWindGroup);
    createWind("空調1", 0, 0, 0, [0, -2, 1], "#0000FF", coolWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 0], "#0000FF", coolWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 0.5], "#0000FF", coolWindGroup);
    createWind("空調2", 0, 0, 0, [0, -2, 1], "#0000FF", coolWindGroup);

    //newWind
    createWind("排風1", -50, 0, 0, [0, -0.5, 2], "#00FF00", newWindGroup);
    createWind("排風1", -50, 0, 0, [0, -0.5, 4], "#00FF00", newWindGroup);
    createWind("排風1", -50, 0, 0, [0, -0.5, 6], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [2, -0.5, 7], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [4, -0.5, 8], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [6, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [8, -0.5, 12], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [10, -0.5, 15], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [12, -0.5, 18], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [10, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [14, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [18, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [22, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風1", -50, 50, 50, [26, -0.5, 9], "#00FF00", newWindGroup);
    createWind("排風2", -50, 0, 0, [0, -0.5, 2], "#00FF00", newWindGroup);
    createWind("排風3", -50, 0, 0, [0, -0.5, 2], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 2], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 4], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 6], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 8], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 10], "#00FF00", newWindGroup);
    createWind("排風4", -50, 0, 0, [0, -0.5, 12], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 50, [2, -0.6, 12], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 50, [4, -0.7, 12], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 50, [6, -0.8, 13], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [8, -0.8, 11], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [12, -0.8, 9], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [16, -0.8, 7], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [20, -0.8, 5], "#00FF00", newWindGroup);
    createWind("排風4", -90, 50, 90, [24, -0.8, 3], "#00FF00", newWindGroup);
    createWind("排風4", -90, 0, 90, [8, -0.8, 13], "#00FF00", newWindGroup);
    createWind("排風4", -90, 0, 90, [12, -0.8, 13], "#00FF00", newWindGroup);
    createWind("排風4", -90, 0, 90, [16, -0.7, 13], "#00FF00", newWindGroup);
    createWind("排風4", -90, 0, 90, [20, -0.6, 13], "#00FF00", newWindGroup);
    //createWind("排風4", -90, 0, 90, [24, -0.5, 13], "#00FF00", newWindGroup);

    //熱風演示
    new THING.widget.Button("熱風演示", function () {
        for (let i of coolWindGroup) {
            i.visible = false;
        };
        for (let i of hotWindGroup) {
            i.visible = true;
            //playWind(i,[0,-0.6499999999999999,0],[0,-0.7234152255572697,0.46352549156242107],[0,-1.2683221215612903,1.2135254915624212],[0,-2.15,1.5])
        };

    });

    //冷風演示
    new THING.widget.Button("冷風演示", function () {
        for (let i of coolWindGroup) {
            i.visible = true;
        };
        for (let i of hotWindGroup) {
            i.visible = false;
        };
    });

    //新風演示
    new THING.widget.Button("新風演示", function () {
        playNewWind();
    });

    function playNewWind() {
        for (var i = 0; i < newWindGroup.length; i++) {
            if(i==newWindGroup.length-1)
            return;
            newWindGroup[i].visible = true;
            newWindGroup[i].moveTo({
                "time": 4000,
                "position": newWindGroup[i+1].position,
            });
        }
    }

});

作者:extends Thread

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/99817.html

相關文章

  • 基于WebGL架構3D視化平臺ThingJS—讓糧倉“智慧”升級

    摘要:隨著信息化技術發展,全國各地開始智慧糧倉的建設,我們可以通過一個視頻看一下使用可視化平臺做的可視應用,可視一體化,讓糧倉智慧升級。構建糧倉內糧情的監控預警診斷分析一體化的可視化平臺。 首先我們先了解一下基于WebGL架構的3D可視化平臺——ThingJS是什么? ThingJS是優锘科技開發的一套面向物聯網應用的在線3D可視化應用開發及運營PaaS平臺,以 ThingJS云視PaaS服...

    aaron 評論0 收藏0
  • 如何用基于WebGL架構3D視化平臺搭建-設備管理系統

    摘要:下面我們將用平臺來模擬一個設備管理系統。查看是否創建了定時器第三步,創建攝像機面板,煙感報警面板以及控制設備的開關,這里簡單調整一下面板位置之后會增加兩個創建設備的按鈕。創建對象數組,以及數組標識第五步,為每個設備對應的創建控制開關。 國內高層建筑不斷興建,它的特點是高度高、層數多、體量大。面積可達幾萬平方米到幾十萬平方米。這些建筑都是一個個龐然大物,高高的聳立在地面上,這是它的外觀,...

    jiekechoo 評論0 收藏0
  • ThingJS物聯網3D視化平臺——智慧城市應用

    摘要:說起物聯網,大家的第一反應就是智慧城市。在物聯網的幫助下,得以讓我們居住的城市正變得越來越有智慧。作為面向物聯網的可視化開發平臺有廣闊的行業應用場景。 隨著科技的發展,5G網絡的到來,將開啟萬物即插即慧的新時代。這就是物聯網,當網絡不再是阻礙,萬物互聯,萬物可視,把數字世界帶入每個人、每個家庭、每個組織,構建萬物互聯的智能世界。 說起物聯網,大家的第一反應就是智慧城市。在物聯網的幫助下...

    eccozhou 評論0 收藏0
  • 從“智能”樓宇到“智慧”樓宇—ThingJS助力“智慧”升級

    摘要:智慧樓宇可視化系統是綜合上述手段打造出的智慧樓宇可查可管可控的一體化可視平臺。智能環境可視化展示樓宇內水電氣冷風等的管線含流向及設備的空間分布。集成停車引導系統,高亮展示最佳停車位及到車位的最佳路線。 智慧樓宇大勢所趨,從智能 到智慧,一字之差,它到底有多智慧? 我們可以看一下智慧樓宇3D可視應用視頻:https://v.qq.com/x/page/h0767... 基于ThingJS...

    hqman 評論0 收藏0

發表評論

0條評論

最新活動
閱讀需要支付1元查看
<