亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專欄INFORMATION COLUMN

基于WebGL架構(gòu)的3D可視化平臺(tái)—新風(fēng)系統(tǒng)演示

buildupchao / 2803人閱讀

摘要:實(shí)施方案是采用高風(fēng)壓大流量風(fēng)機(jī)依靠機(jī)械強(qiáng)力由一側(cè)向室內(nèi)送風(fēng),由另一側(cè)用專門設(shè)計(jì)的排風(fēng)風(fēng)機(jī)向室外排出的方式強(qiáng)迫在系統(tǒng)內(nèi)形成新風(fēng)流動(dòng)場(chǎng)。接下來(lái)就用平臺(tái)來(lái)搭建一個(gè)新風(fēng)系統(tǒng)第一步,利用搭建模擬場(chǎng)景。

新風(fēng)系統(tǒng)是根據(jù)在密閉的室內(nèi)一側(cè)用專用設(shè)備向室內(nèi)送新風(fēng),再?gòu)牧硪粋?cè)由專用設(shè)備向室外排出,在室內(nèi)會(huì)形成“新風(fēng)流動(dòng)場(chǎng)”,從而滿足室內(nèi)新風(fēng)換氣的需要。實(shí)施方案是:采用高風(fēng)壓、大流量風(fēng)機(jī)、依靠機(jī)械強(qiáng)力由一側(cè)向室內(nèi)送風(fēng),由另一側(cè)用專門設(shè)計(jì)的排風(fēng)風(fēng)機(jī)向室外排出的方式強(qiáng)迫在系統(tǒng)內(nèi)形成新風(fēng)流動(dòng)場(chǎng)。在送風(fēng)的同時(shí)對(duì)進(jìn)入室內(nèi)的空氣進(jìn)過(guò)濾、消毒、殺菌、增氧、預(yù)熱(冬天)。

接下來(lái)就用ThingJs平臺(tái)來(lái)搭建一個(gè)新風(fēng)系統(tǒng)

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

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

});

第二步,創(chuàng)建三個(gè)數(shù)組來(lái)保存每個(gè)風(fēng)的模型。、

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

第三步,構(gòu)造一個(gè)創(chuàng)建風(fēng)的函數(shù),為了方便創(chuàng)建風(fēng)及其位置,我們選取排風(fēng)設(shè)備為風(fēng)的父物體,將創(chuàng)建出來(lái)的風(fēng)的visiable屬性設(shè)置為false(這里這個(gè)坐標(biāo)問(wèn)題可以看一下官網(wǎng)的教程中控制物體中的坐標(biāo)轉(zhuǎn)換)。

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);
}

第四步,開始創(chuàng)建風(fēng)模型,并調(diào)整一下攝像機(jī)的角度及位置。

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

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

    });

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

    //新風(fēng)演示
    new THING.widget.Button("新風(fēng)演示", 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,
            });
        }
});

第五步,運(yùn)行項(xiàng)目。演示地址

思考與總結(jié):

首先就是空間坐標(biāo)系下轉(zhuǎn)父物體坐標(biāo)真是弄暈了,看了官網(wǎng)的教程多少理解了一點(diǎn)。剛開始的時(shí)候我一直認(rèn)為我的子物體以父物體坐標(biāo)下放置的時(shí)候,子物體坐標(biāo)軸的問(wèn)題指向的問(wèn)題??戳私坛贪l(fā)現(xiàn)自己的擔(dān)心多余了,就好像是人戴鴨舌帽帽子不管戴在誰(shuí)的頭上都一樣。

其次就是讓風(fēng)動(dòng)起來(lái),最初是想讓一個(gè)模型在空間中運(yùn)動(dòng),發(fā)現(xiàn)效果不好用。最后就創(chuàng)建了多個(gè)模型他們對(duì)應(yīng)著有各自的點(diǎn),讓每一個(gè)模型向他下一個(gè)模型的位置移動(dòng)實(shí)現(xiàn)運(yùn)動(dòng)。

完整代碼

/加載場(chǎng)景代碼
var app = new THING.App({
    // 場(chǎng)景地址
    "url": "http://www.thingjs.com/./uploads/wechat/oLX7p05lsWJZUIxnIWsNXAzJ40X8/scene/新風(fēng)演示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 () {
    //攝像機(jī)角度
    app.camera.position = [-22.91452445633646, 30.46296743148116, -23.83548169673341];
    app.camera.target = [-13.532807014407252, 5.6565539015865856, -3.3431546399681276];
    //hotWind
    createWind("空調(diào)1", 0, 0, 0, [0, -2, 0], "#FF0000", hotWindGroup);
    createWind("空調(diào)1", 0, 0, 0, [0, -2, 0.5], "#FF0000", hotWindGroup);
    createWind("空調(diào)1", 0, 0, 0, [0, -2, 1], "#FF0000", hotWindGroup);
    createWind("空調(diào)2", 0, 0, 0, [0, -2, 0], "#FF0000", hotWindGroup);
    createWind("空調(diào)2", 0, 0, 0, [0, -2, 0.5], "#FF0000", hotWindGroup);
    createWind("空調(diào)2", 0, 0, 0, [0, -2, 1], "#FF0000", hotWindGroup);
    //coolWind
    createWind("空調(diào)1", 0, 0, 0, [0, -2, 0], "#0000FF", coolWindGroup);
    createWind("空調(diào)1", 0, 0, 0, [0, -2, 0.5], "#0000FF", coolWindGroup);
    createWind("空調(diào)1", 0, 0, 0, [0, -2, 1], "#0000FF", coolWindGroup);
    createWind("空調(diào)2", 0, 0, 0, [0, -2, 0], "#0000FF", coolWindGroup);
    createWind("空調(diào)2", 0, 0, 0, [0, -2, 0.5], "#0000FF", coolWindGroup);
    createWind("空調(diào)2", 0, 0, 0, [0, -2, 1], "#0000FF", coolWindGroup);

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

    //熱風(fēng)演示
    new THING.widget.Button("熱風(fēng)演示", 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])
        };

    });

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

    //新風(fēng)演示
    new THING.widget.Button("新風(fēng)演示", 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

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://www.ezyhdfw.cn/yun/99817.html

相關(guān)文章

  • 基于WebGL架構(gòu)3D視化平臺(tái)ThingJS—讓糧倉(cāng)“智慧”升級(jí)

    摘要:隨著信息化技術(shù)發(fā)展,全國(guó)各地開始智慧糧倉(cāng)的建設(shè),我們可以通過(guò)一個(gè)視頻看一下使用可視化平臺(tái)做的可視應(yīng)用,可視一體化,讓糧倉(cāng)智慧升級(jí)。構(gòu)建糧倉(cāng)內(nèi)糧情的監(jiān)控預(yù)警診斷分析一體化的可視化平臺(tái)。 首先我們先了解一下基于WebGL架構(gòu)的3D可視化平臺(tái)——ThingJS是什么? ThingJS是優(yōu)锘科技開發(fā)的一套面向物聯(lián)網(wǎng)應(yīng)用的在線3D可視化應(yīng)用開發(fā)及運(yùn)營(yíng)PaaS平臺(tái),以 ThingJS云視PaaS服...

    aaron 評(píng)論0 收藏0
  • 如何用基于WebGL架構(gòu)3D視化平臺(tái)搭建-設(shè)備管理系統(tǒng)

    摘要:下面我們將用平臺(tái)來(lái)模擬一個(gè)設(shè)備管理系統(tǒng)。查看是否創(chuàng)建了定時(shí)器第三步,創(chuàng)建攝像機(jī)面板,煙感報(bào)警面板以及控制設(shè)備的開關(guān),這里簡(jiǎn)單調(diào)整一下面板位置之后會(huì)增加兩個(gè)創(chuàng)建設(shè)備的按鈕。創(chuàng)建對(duì)象數(shù)組,以及數(shù)組標(biāo)識(shí)第五步,為每個(gè)設(shè)備對(duì)應(yīng)的創(chuàng)建控制開關(guān)。 國(guó)內(nèi)高層建筑不斷興建,它的特點(diǎn)是高度高、層數(shù)多、體量大。面積可達(dá)幾萬(wàn)平方米到幾十萬(wàn)平方米。這些建筑都是一個(gè)個(gè)龐然大物,高高的聳立在地面上,這是它的外觀,...

    jiekechoo 評(píng)論0 收藏0
  • ThingJS物聯(lián)網(wǎng)3D視化平臺(tái)——智慧城市應(yīng)用

    摘要:說(shuō)起物聯(lián)網(wǎng),大家的第一反應(yīng)就是智慧城市。在物聯(lián)網(wǎng)的幫助下,得以讓我們居住的城市正變得越來(lái)越有智慧。作為面向物聯(lián)網(wǎng)的可視化開發(fā)平臺(tái)有廣闊的行業(yè)應(yīng)用場(chǎng)景。 隨著科技的發(fā)展,5G網(wǎng)絡(luò)的到來(lái),將開啟萬(wàn)物即插即慧的新時(shí)代。這就是物聯(lián)網(wǎng),當(dāng)網(wǎng)絡(luò)不再是阻礙,萬(wàn)物互聯(lián),萬(wàn)物可視,把數(shù)字世界帶入每個(gè)人、每個(gè)家庭、每個(gè)組織,構(gòu)建萬(wàn)物互聯(lián)的智能世界。 說(shuō)起物聯(lián)網(wǎng),大家的第一反應(yīng)就是智慧城市。在物聯(lián)網(wǎng)的幫助下...

    eccozhou 評(píng)論0 收藏0
  • 從“智能”樓宇到“智慧”樓宇—ThingJS助力“智慧”升級(jí)

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

    hqman 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<