Commit 4bdb4402 authored by Roque's avatar Roque

erp5_drone_simulator: change flight trace to improve performance

parent 2eb3d717
......@@ -645,19 +645,16 @@ var GameManager = /** @class */ (function () {
}
}
if (GAMEPARAMETERS.draw_flight_path) {
//draw drone position every second
if (this._last_position_drawn[drone] !== seconds) {
//draw drone position every 5 seconds
if (seconds - this._last_position_drawn[drone] > 3) {
this._last_position_drawn[drone] = seconds;
position_obj = BABYLON.MeshBuilder.CreateSphere("obs_" +
seconds, {
'diameterX': 3.5,
'diameterY': 3.5,
'diameterZ': 3.5
}, this._scene);
position_obj = BABYLON.MeshBuilder.CreateBox("obs_" + seconds,
{ size: 1 },
this._scene);
position_obj.position = new BABYLON.Vector3(drone_position.x,
drone_position.z,
drone_position.y);
position_obj.scaling = new BABYLON.Vector3(3.5, 3.5, 3.5);
position_obj.scaling = new BABYLON.Vector3(4, 4, 4);
material = new BABYLON.StandardMaterial(this._scene);
material.alpha = 1;
color = new BABYLON.Color3(255, 0, 0);
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.23884.17798.30515</string> </value>
<value> <string>1004.23912.1845.25770</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1668620936.14</float>
<float>1668622736.46</float>
<string>UTC</string>
</tuple>
</state>
......
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