Commit 26510553 authored by oscar's avatar oscar

提交测试修改

parent 580bd2a6
......@@ -30,7 +30,7 @@ function csv2json(csvFile, parsetime) {
else if(items[24] == 5)
typeName = "Bicycle";
let obj = { ID: items[3], PtcType: typeName, time: parseInt(items[2]), PtcHeading: items[31], PtcLon: items[35], PtcLat: items[36], DataType: '3', Dev: '1' }
let obj = { ID: items[3], PtcType: typeName, time: parseInt(items[2]), PtcHeading: items[31], PtcLon: items[36], PtcLat: items[35], DataType: '3', Dev: '1' }
if( num == 0)
{
}
......
......@@ -59,7 +59,7 @@ function resolveData(data, scene) {
{
let textObj = null;
if (textFont) {
let txt = data[i].ID.substr(data[i].ID.length - 5, data[i].ID.length) + '.' + data[i].Dev.substr(data[i].Dev.length - 5, data[i].Dev.length)
let txt = data[i].ID.substr(data[i].ID.length - 5, data[i].ID.length) + "." + data[i].PtcHeading.substr(0,3);//data[i].ID.substr(data[i].ID.length - 5, data[i].ID.length)
var geometry = new THREE.TextGeometry(txt, {
font: textFont, size: 1, height: 0.1, curveSegments: 1
......@@ -83,6 +83,23 @@ function resolveData(data, scene) {
}
if (obj) {
if (textFont) {
let txt = data[i].ID.substr(data[i].ID.length - 5, data[i].ID.length) + "." + data[i].PtcHeading.substr(0,3);//data[i].ID.substr(data[i].ID.length - 5, data[i].ID.length)
var geometry = new THREE.TextGeometry(txt, {
font: textFont, size: 1, height: 0.1, curveSegments: 1
});
//创建法向量材质
var meshMaterial = new THREE.MeshNormalMaterial({
flatShading: THREE.FlatShading, transparent: true, opacity: 1
});
textObj = new THREE.Mesh(geometry, meshMaterial);
textObj.position.set(pos[0], pos[1], 30);
scene.add(textObj);
scene.remove(obj.textObj);
obj.textObj = textObj;
}
obj.textObj.position.set(pos[0], pos[1], 30);
obj.carObj.position.set(pos[0], pos[1], heightz);
let heading = parseFloat(data[i].PtcHeading)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment