顯示源代碼
                3D模型GLB
                 開發文檔
                            <!DOCTYPE html>
                <html>
                
                <head>
                    <meta charset='UTF-8' />
                    <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
                    <link  rel='stylesheet' />
                    <script src='http://ua.bigemap.com:30081/bmsdk/bigemap-gl.js/v1.1.0/bigemap-gl.js'></script>
                    <script src="/templates/bmgl-header.js"></script>
                    <style>
                        body {
                            margin: 0;
                            padding: 0;
                        }
                
                        #container {
                            position: absolute;
                            top: 0;
                            bottom: 0;
                            width: 100%;
                        }
                
                        .bmgl-widget-credits {
                            display: none
                        }
                
                        #toolbar {
                            position: absolute;
                            background: rgba(212, 212, 212, 0.8);
                            padding: 4px;
                            border-radius: 4px;
                        }
                
                        #toolbar input {
                            vertical-align: middle;
                            padding-top: 2px;
                            padding-bottom: 2px;
                        }
                
                        #toolbar .header {
                            font-weight: bold;
                        }
                    </style>
                    <title>Google Map Streets</title>
                </head>
                
                <body>
                    <div id='container'></div>
                    <div id="loadingOverlay">
                        <h1>Loading...</h1>
                    </div>
                    <div id="toolbar">
                        <table>
                            <tbody>
                                <tr>
                                    <td class="header">模型顏色r</td>
                                </tr>
                                <tr>
                                    <td>模型</td>
                                    <td>
                                        <select data-bind="options: colorBlendModes, value: colorBlendMode"></select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>顏色</td>
                                    <td><select data-bind="options: colors, value: color"></select></td>
                                </tr>
                                <tr>
                                    <td>透明度</td>
                                    <td>
                                        <input type="range" min="0.0" max="1.0" step="0.01"
                                            data-bind="value: alpha, valueUpdate: 'input'">
                                        <input type="text" size="5" data-bind="value: alpha">
                                    </td>
                                </tr>
                                <tr>
                                    <td data-bind="style: { color: colorBlendAmountEnabled ? '' : 'gray'}">
                                        最大值
                                    </td>
                                    <td>
                                        <input type="range" min="0.0" max="1.0" step="0.01"
                                            data-bind="value: colorBlendAmount, valueUpdate: 'input', enable: colorBlendAmountEnabled">
                                        <input type="text" size="5"
                                            data-bind="value: colorBlendAmount, enable: colorBlendAmountEnabled">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="header">模型輪廓</td>
                                </tr>
                                <tr>
                                    <td>顏色</td>
                                    <td>
                                        <select data-bind="options: silhouetteColors, value: silhouetteColor"></select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>透明度</td>
                                    <td>
                                        <input type="range" min="0.0" max="1.0" step="0.01"
                                            data-bind="value: silhouetteAlpha, valueUpdate: 'input'">
                                        <input type="text" size="5" data-bind="value: silhouetteAlpha">
                                    </td>
                                </tr>
                                <tr>
                                    <td>尺寸大小</td>
                                    <td>
                                        <input type="range" min="0.0" max="10.0" step="0.01"
                                            data-bind="value: silhouetteSize, valueUpdate: 'input'">
                                        <input type="text" size="5" data-bind="value: silhouetteSize">
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                
                    <script>
                        bmgl.Config.HTTP_URL = 'http://ua.bigemap.com:30081/bmsdk/';
                        var viewer = new bmgl.Viewer('container', { mapId: 'bigemap.dc-satellite',requestRenderMode:false});
                
                
                        var entity;
                
                        //獲取混色
                        function getColorBlendMode(colorBlendMode) {
                            return bmgl.ColorBlendMode[colorBlendMode.toUpperCase()];
                        }
                
                        //獲取顏色
                        function getColor(colorName, alpha) {
                            var color = bmgl.Color[colorName.toUpperCase()];
                            return bmgl.Color.fromAlpha(color, parseFloat(alpha));
                        }
                
                        // The viewModel tracks the state of our mini application.
                        //綁定參數
                        var viewModel = {
                            color: "Red",
                            colors: ["White", "Red", "Green", "Blue", "Yellow", "Gray"],
                            alpha: 1.0,
                            colorBlendMode: "Highlight",
                            colorBlendModes: ["Highlight", "Replace", "Mix"],
                            colorBlendAmount: 0.5,
                            colorBlendAmountEnabled: false,
                            silhouetteColor: "Red",
                            silhouetteColors: ["Red", "Green", "Blue", "Yellow", "Gray"],
                            silhouetteAlpha: 1.0,
                            silhouetteSize: 2.0,
                        };
                
                        // Convert the viewModel members into knockout observables.
                        bmgl.knockout.track(viewModel);
                
                        // Bind the viewModel to the DOM elements of the UI that call for it.
                        var toolbar = document.getElementById("toolbar");
                        bmgl.knockout.applyBindings(viewModel, toolbar);
                
                        bmgl.knockout
                            .getObservable(viewModel, "color")
                            .subscribe(function (newValue) {
                                entity.model.color = getColor(newValue, viewModel.alpha);
                            });
                
                        bmgl.knockout
                            .getObservable(viewModel, "alpha")
                            .subscribe(function (newValue) {
                                entity.model.color = getColor(viewModel.color, newValue);
                            });
                
                        bmgl.knockout
                            .getObservable(viewModel, "colorBlendMode")
                            .subscribe(function (newValue) {
                                var colorBlendMode = getColorBlendMode(newValue);
                                entity.model.colorBlendMode = colorBlendMode;
                                viewModel.colorBlendAmountEnabled =
                                    colorBlendMode === bmgl.ColorBlendMode.MIX;
                            });
                
                        bmgl.knockout
                            .getObservable(viewModel, "colorBlendAmount")
                            .subscribe(function (newValue) {
                                entity.model.colorBlendAmount = parseFloat(newValue);
                            });
                
                        bmgl.knockout
                            .getObservable(viewModel, "silhouetteColor")
                            .subscribe(function (newValue) {
                                entity.model.silhouetteColor = getColor(
                                    newValue,
                                    viewModel.silhouetteAlpha
                                );
                            });
                
                        bmgl.knockout
                            .getObservable(viewModel, "silhouetteAlpha")
                            .subscribe(function (newValue) {
                                entity.model.silhouetteColor = getColor(
                                    viewModel.silhouetteColor,
                                    newValue
                                );
                            });
                
                        bmgl.knockout
                            .getObservable(viewModel, "silhouetteSize")
                            .subscribe(function (newValue) {
                                entity.model.silhouetteSize = parseFloat(newValue);
                            });
                
                
                        createModel(
                            "/templates/glb/bmgl_Air.glb",
                            5000.0
                        );
                
                        // 添加模型
                        function createModel(url, height) {
                            viewer.entities.removeAll();
                
                            var position = bmgl.Cartesian3.fromDegrees(
                                -123.0744619,
                                44.0503706,
                                height
                            );
                            var heading = bmgl.Math.toRadians(135);
                            var pitch = 0;
                            var roll = 0;
                            var hpr = new bmgl.HeadingPitchRoll(heading, pitch, roll);
                            var orientation = bmgl.Transforms.headingPitchRollQuaternion(
                                position,
                                hpr
                            );
                
                            entity = viewer.entities.add({
                                name: url,
                                position: position,
                                orientation: orientation,
                                model: {
                                    uri: url,
                                    minimumPixelSize: 128,
                                    maximumScale: 20000,
                                    color: getColor(viewModel.color, viewModel.alpha),
                                    colorBlendMode: getColorBlendMode(viewModel.colorBlendMode),
                                    colorBlendAmount: parseFloat(viewModel.colorBlendAmount),
                                    silhouetteColor: getColor(
                                        viewModel.silhouetteColor,
                                        viewModel.silhouetteAlpha
                                    ),
                                    silhouetteSize: parseFloat(viewModel.silhouetteSize),
                                },
                            });
                            viewer.trackedEntity = entity;
                            viewer.zoomTo(entity)
                        }
                
                        var options = [
                            {
                                text: "飛機",
                                onselect: function () {
                                    createModel(
                                        "/templates/glb/bmgl_Air.glb",
                                        5000.0
                                    );
                                },
                            },
                            {
                                text: "運輸車",
                                onselect: function () {
                                    createModel(
                                        "/templates/glb/GroundVehicle.glb",
                                        0
                                    );
                                },
                            },
                            {
                                text: "熱氣球",
                                onselect: function () {
                                    createModel(
                                        "/templates/glb/bmglBalloon.glb",
                                        1000.0
                                    );
                                },
                            },
                            {
                                text: "牛奶卡車",
                                onselect: function () {
                                    createModel(
                                        "/templates/glb/bmglMilkTruck.glb",
                                        0
                                    );
                                },
                            },
                            {
                                text: "個性人物",
                                onselect: function () {
                                    createModel(
                                        "/templates/glb/bmgl_Man.glb",
                                        0
                                    );
                                },
                            },
                        ];
                
                        Sandcastle.addToolbarMenu(options);
                
                
                
                
                    </script>
                </body>
                
                </html>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                主站蜘蛛池模板: 国产精品视频免费| 日韩A无V码在线播放| 女神校花乳环调教| 九九九国产视频| 色欲狠狠躁天天躁无码中文字幕| 在线天堂av影院| 中文字幕无码不卡一区二区三区 | 国产高清乱理论片在线看| 中文字幕有码视频| 男人天堂网在线视频| 国产亚洲蜜芽精品久久| www.天天射| 欧美疯狂做受xxxxx高潮| 嘘禁止想象免费观看| 99re在线观看| 手机看片福利日韩国产| 乱小说欧美综合| 欧美猛少妇色xxxxx| 免费在线观看a级毛片| 色欲精品国产一区二区三区AV| 国产日韩成人内射视频| 91福利在线观看视频| 妲己高h荡肉呻吟np| 久久久久久成人毛片免费看| 欧美人与动zoz0大全| 国产twink男同chinese| avtt天堂网手机资源| 在线观看亚洲免费| 一级做a爰片性色毛片16美国| 欧美成人怡红院在线观看| 再深点灬舒服灬太大了添网站 | 亚洲国产精品成人久久久| 男女很舒服爽视频免费| 四虎永久精品免费网址大全| 国产精品视频网站你懂得| 国产精品毛片完整版视频| 99视频在线观看视频| 幻女free性zozo交| 中文字幕永久在线观看| 日本熟妇色熟妇在线视频播放 | 色视频在线观看免费|