Tang Xiaofei

Results 64 issues of Tang Xiaofei

1. 在[EarthSDK](http://earthsdk.com/v/last/Apps/Demos/Viewer/index.html)中对模型进行旋转平移缩放操作 场景树上鼠标右键弹出菜单,点击“属性”按钮 ![image](https://user-images.githubusercontent.com/13550568/67138553-bbf5f800-f277-11e9-85ae-29ec5dae54bd.png) 编辑相关参数。 ![image](https://user-images.githubusercontent.com/13550568/67138562-f3fd3b00-f277-11e9-8904-81ec22238d08.png) 当然平移和旋转是也可以进行可视化互动编辑的。 ![image](https://user-images.githubusercontent.com/13550568/67138643-37a47480-f279-11e9-8af6-84ba37c70752.png) 2. 编辑完成以后,再右键弹出菜单,选择“查看Cesium代码” ![image](https://user-images.githubusercontent.com/13550568/67138568-1e4ef880-f278-11e9-8828-3c366b115980.png) 3. 在代码中获取需要的信息,比如modelMatrix ![image](https://user-images.githubusercontent.com/13550568/67138595-8b628e00-f278-11e9-8c09-43c9b3c1dd58.png)

documentation
question

求助,我把模型缩小了,然后科技感因为变低显示不出来效果了,这个怎么调 ![image](https://user-images.githubusercontent.com/13550568/71968505-05832d00-3240-11ea-9518-251f3db8cca6.png) --- 需要修改一下:v_elevationPos.z => (v_elevationPos.z + diffHeight) 参考示例: http://earthsdk.com/v/last/Apps/Examples/?menu=true&url=./earth-digitalCity.html ![image](https://user-images.githubusercontent.com/13550568/71968534-159b0c80-3240-11ea-8d5b-929fc1963521.png)

documentation
question

“skywalkershe 15:56:57 查看原文 @vtxf 另外,视频融合能接stream吗 --- 能接,只要浏览器(不用插件)能播放出来的视频流,就可以在视频融合中使用。

“skywalkershe 15:49:21 查看原文 @vtxf 请问下两个问题: 1. path没有修改样式的接口吧 2. 视频融合可以修改classification type让它对地形有效吗 --- 1 path是用来做运动路径的,不是为了显示,所以不能修改样式 2 对地形的视频没有开接口,可以这样操作设置 xxx._cameraVideo._primitive.classificationType = 2

earthsdk使用后好像不能进行地图的二维,三维切换了 目前很多对象都是只能在三维上加载,如果切换到二维会报错;如果一定要切换到二维: 1 可以在创建Earth时,传入参数scene3DOnly: false, 和Cesium的Viewer创建是一致的。 2 需要删掉三维对象。 创建地球的示例在这里: http://earthsdk.com/v/last/Apps/Examples/?menu=true&url=./startup-createEarth.html ``` earth = new XE.Earth('earthContainer', { // 这里设置Viewer的配置,和new Viewer(container, options)中的options一致 homeButton: true, timeline: true, scene3DOnly: false, sceneMode: Cesium.SceneMode.SCENE2D, }); ```

pin用imageUrl的话,没有api可以调图片pin的偏移值吧?类似pinbuilder.extTextPixelOffset --- 有 origin属性,可以使用 --- 谢谢,但试了下,这个array里只有两位,也不接受负值,只能往下和往左调,没法往上调 --- 设置 xxx.isDivImage = true,就可以任意调整origin。 isDivImage为false时,内部使用的是Cesium的billboard,会受Cesium的限制。 --- 等下,isDivImage为true的话onmousehover就没用了。 --- 如果需要绑定事件,或者其他更复杂的操作,可以pin绑定div来操作 类似下面的示例: http://earthsdk.com/v/last/Apps/Examples/?menu=true&url=./earth-pin-div.html

使用EarthSDK以后,用原生Cesium加载3dtiles数据看不见; 倾斜摄影数据可以看见,但是人工建模的3dtiles看不见。 代码类似: ``` var tileset = uia.earth.czm.scene.primitives.add(new Cesium.Cesium3DTileset({url: 'http://xxx/tileset.json'})); uia.earth.czm.viewer.flyTo(tileset) ``` --- 这个版本已修复,下个版本就好。 目前使用时,需要加一句话就能显示出来: ``` tileset.style = new Cesium.Cesium3DTileStyle({}) ```

documentation
question

@vtxf 求问~ 我在类里加了两个属性, 但是this.toJSON()方法不会把这两个属性转成JSON请问 怎样设置才能保存这两个属性呢? ![image](https://user-images.githubusercontent.com/13550568/71968275-8b52a880-323f-11ea-860f-73866b954fd0.png) ![image](https://user-images.githubusercontent.com/13550568/71968281-8e4d9900-323f-11ea-83f9-a4c7215c6cd4.png) --- 可以参考自定义图元库中的写法: https://github.com/cesiumlab/CustomPrimitive-EarthSDK/blob/master/src/Tube.js 1 首先定义defaultOptions [图片] ![image](https://user-images.githubusercontent.com/13550568/71968307-9a395b00-323f-11ea-95f4-eec9673b5dab.png) 2 然后将其与自定义的类关联起来: Tube.defaultOptions = defaultOptions; [图片] ![image](https://user-images.githubusercontent.com/13550568/71968314-9efe0f00-323f-11ea-90a7-7d311b86537c.png) 3 注意代码中就不要再用 XE.MVVM.extend(...)来定义相关变量了 4 通过以上方法定义的变量是可以存储的

documentation
question

为什么CustomPrimitive绘制出来的面只能从正面看,背面就消失了,我用CustomPrimitive绘制一个立体风车,从正面看,有6个面24条线,从背面看,只有24条线没有面,请问一下需要怎么处理才能各个角度都看得到 ![image](https://user-images.githubusercontent.com/13550568/71659475-b726e780-2d82-11ea-978e-a886802627dc.png) ![image](https://user-images.githubusercontent.com/13550568/71659486-c017b900-2d82-11ea-96bd-880eaa26ef2a.png) --- 需要设置以下renderState xxx.renderState = XE.Obj.CustomPrimitive.getRenderState(false, false); getRenderState的第二个参数,为true时,不显示背面,为false时,双面都显示 ![image](https://user-images.githubusercontent.com/13550568/71659450-a4141780-2d82-11ea-8828-980ebe25dd10.png)

documentation
question

![image](https://user-images.githubusercontent.com/13550568/71653022-2a216580-2d65-11ea-8062-ef4f2a427d8d.png) --- 1.2.22版本以后修改了ODLines属性的positions单词的拼写错误,需要更正以下这个属性。 非常抱歉旧版本带来的此问题。。 ![image](https://user-images.githubusercontent.com/13550568/71655122-6e663300-2d70-11ea-8666-361d4935bc9b.png)

documentation
question