<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      primitive動態修改

      以貼底線 GroundPolylinePrimitive 為例

      我們知道,primitive的更新機制主要是通過update函數,所以通過源碼我們可以很容易找到如何對針對性的更新屬性。

      可以看到,update 每次都會判斷 _primitive 這個屬性,如果他未定義,則重新構建geometry相關的屬性,所以我們只需要將_primitive清空,然后讓他自己重構即可。

      注:記的設置 asynchronous 為 false,默認異步抖動嚴重。

      primitive._primitive = undefined;
      primitive.geometryInstances = [geometryInstances];

      源碼中update如下:

      GroundPolylinePrimitive.prototype.update = function (frameState) {
        ...省略
      var that = this; var primitiveOptions = this._primitiveOptions; if (!defined(this._primitive)) { var geometryInstances = Array.isArray(this.geometryInstances) ? this.geometryInstances : [this.geometryInstances]; var geometryInstancesLength = geometryInstances.length; var groundInstances = new Array(geometryInstancesLength); var attributes; // Check if each instance has a color attribute. for (i = 0; i < geometryInstancesLength; ++i) { attributes = geometryInstances[i].attributes; if (!defined(attributes) || !defined(attributes.color)) { this._hasPerInstanceColors = false; break; } } for (i = 0; i < geometryInstancesLength; ++i) { var geometryInstance = geometryInstances[i]; attributes = {}; var instanceAttributes = geometryInstance.attributes; for (var attributeKey in instanceAttributes) { if (instanceAttributes.hasOwnProperty(attributeKey)) { attributes[attributeKey] = instanceAttributes[attributeKey]; } } // Automatically create line width attribute if not already given if (!defined(attributes.width)) { attributes.width = new GeometryInstanceAttribute({ componentDatatype: ComponentDatatype.UNSIGNED_BYTE, componentsPerAttribute: 1.0, value: [geometryInstance.geometry.width], }); } // Update each geometry for framestate.scene3DOnly = true and projection geometryInstance.geometry._scene3DOnly = frameState.scene3DOnly; GroundPolylineGeometry.setProjectionAndEllipsoid( geometryInstance.geometry, frameState.mapProjection ); groundInstances[i] = new GeometryInstance({ geometry: geometryInstance.geometry, attributes: attributes, id: geometryInstance.id, pickPrimitive: that, }); } primitiveOptions.geometryInstances = groundInstances; primitiveOptions.appearance = this.appearance; primitiveOptions._createShaderProgramFunction = function ( primitive, frameState, appearance ) { createShaderProgram(that, frameState, appearance); }; primitiveOptions._createCommandsFunction = function ( primitive, appearance, material, translucent, twoPasses, colorCommands, pickCommands ) { createCommands( that, appearance, material, translucent, colorCommands, pickCommands ); }; primitiveOptions._updateAndQueueCommandsFunction = function ( primitive, frameState, colorCommands, pickCommands, modelMatrix, cull, debugShowBoundingVolume, twoPasses ) { updateAndQueueCommands( that, frameState, colorCommands, pickCommands, modelMatrix, cull, debugShowBoundingVolume ); }; this._primitive = new Primitive(primitiveOptions); this._primitive.readyPromise.then(function (primitive) { that._ready = true; if (that.releaseGeometryInstances) { that.geometryInstances = undefined; } var error = primitive._error; if (!defined(error)) { that._readyPromise.resolve(that); } else { that._readyPromise.reject(error); } }); } if ( this.appearance instanceof PolylineColorAppearance && !this._hasPerInstanceColors ) { throw new DeveloperError( "All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive." ); } this._primitive.appearance = this.appearance; this._primitive.show = this.show; this._primitive.debugShowBoundingVolume = this.debugShowBoundingVolume; this._primitive.update(frameState); };

       感興趣的朋友可以移步:LiZzhi/cesium-dev-set,如果對您有幫助,請給我一顆star,謝謝。

      posted @ 2023-12-29 11:43  邢韜  閱讀(708)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 超碰人人超碰人人| 久久国产精品精品国产色| 在线日韩日本国产亚洲| 狠狠爱五月丁香亚洲综| 额敏县| 国产肥臀视频一区二区三区 | 国产片AV国语在线观看手机版| 国产v综合v亚洲欧美久久| 国产成人精品国内自产色| 国产精品多p对白交换绿帽| 亚洲欧美色综合影院| 最近中文字幕国产精选| 成人午夜视频一区二区无码| 国产在线播放专区av| 国产男女猛烈无遮挡免费视频| 337p粉嫩大胆色噜噜噜| 国产农村乱人伦精品视频| 国产大学生粉嫩无套流白浆| 夜夜爽77777妓女免费看| 亚洲综合在线日韩av| 在线观看中文字幕国产码| 鄯善县| 成人亚洲欧美一区二区三区| 亚洲欧洲∨国产一区二区三区| 国产精品无码不卡在线播放| 亚洲国产成人自拍视频网| 成人国产乱对白在线观看| jizz国产免费观看| 精品国产一区二区三区av性色| 激情在线网| 九九九精品成人免费视频小说 | 色狠狠色噜噜AV一区| 午夜福利国产盗摄久久性| 强d乱码中文字幕熟女1000部| 91人妻熟妇在线视频| 成年女人午夜毛片免费视频| 日本午夜精品一区二区三区电影 | 国产一区二区一卡二卡| 中文字幕无码免费不卡视频 | 亚洲顶级裸体av片| 亚洲一区二区美女av|