; (function (Cesium) { checkSkyScenery(Cesium); function upraiseModel(primitiveArr, option) { var defaultParam = { time: 10, height: 10, defaultHeight: 0 } var options = defaultParam; if (option) { if (typeof option == 'object') { options = Object.assign(defaultParam, option); } } var everyH = options.height / (options.time * 1000 / 10); var index = 0; var xh = setInterval(function () { primitiveArr.map(function (item) { // // var t = (6378137 + everyH * index + item.geometryInstances.geometry._height) / (6378137 + item.geometryInstances.geometry._height); var t = (6378137 + everyH * index + options.defaultHeight) / (6378137 + options.defaultHeight); item.modelMatrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(t, t, t)); // const translation = Cesium.Matrix4.fromTranslation(new Cesium.Cartesian3(everyH * index, 0,0)) // Cesium.Matrix4.multiply(item.modelMatrix, translation, item.modelMatrix) }) index += 1; if (index > options.time * 100) { clearInterval(xh); } }, 10); return xh; } function destoryUpraise(interval) { clearInterval(interval); } Cesium.upraiseModel = upraiseModel; Cesium.destoryUpraise = destoryUpraise; }(SkyScenery))