pull/110/head
openbuilds-engineer 2018-08-28 17:16:17 +02:00
rodzic cfbd93f780
commit ce5187bc4a
2 zmienionych plików z 66 dodań i 53 usunięć

Wyświetl plik

@ -274,15 +274,6 @@ function init3D() {
antialias: false, antialias: false,
preserveDrawingBuffer: true preserveDrawingBuffer: true
}); });
} else if (canvas) {
printLog('No WebGL Support found on this computer! Disabled 3D Viewer - Sorry!');
return false;
$('#gcodeviewertab').hide()
// renderer = new THREE.CanvasRenderer();
};
// ThreeJS Render/Control/Camera // ThreeJS Render/Control/Camera
scene = new THREE.Scene(); scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 20000); camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 20000);
@ -332,6 +323,16 @@ function init3D() {
animate(); animate();
}, 200) }, 200)
} else if (canvas) {
printLog('No WebGL Support found on this computer! Disabled 3D Viewer - Sorry!');
$('#gcodeviewertab').hide()
// renderer = new THREE.CanvasRenderer();
return false;
};
} }
function animate() { function animate() {

Wyświetl plik

@ -10,6 +10,16 @@ var simstopped = false;
var bellstate = false; var bellstate = false;
var toast = Metro.toast.create; var toast = Metro.toast.create;
var webgl = (function() {
try {
return !!window.WebGLRenderingContext && !!document.createElement('canvas').getContext('experimental-webgl');
} catch (e) {
return false;
}
})();
$(document).ready(function() { $(document).ready(function() {
initSocket(); initSocket();
@ -248,6 +258,7 @@ function initSocket() {
$('#zPos').html(zpos); $('#zPos').html(zpos);
} }
if (webgl) {
if (!isJogWidget) { if (!isJogWidget) {
if (!simRunning) { if (!simRunning) {
cone.position.x = status.machine.position.work.x cone.position.x = status.machine.position.work.x
@ -255,6 +266,7 @@ function initSocket() {
cone.position.z = (parseFloat(status.machine.position.work.z) + 20) cone.position.z = (parseFloat(status.machine.position.work.z) + 20)
} }
} }
}
// $('#T0CurTemp').html(status.machine.temperature.actual.t0.toFixed(1) + " / " + status.machine.temperature.setpoint.t0.toFixed(1)); // $('#T0CurTemp').html(status.machine.temperature.actual.t0.toFixed(1) + " / " + status.machine.temperature.setpoint.t0.toFixed(1));
// $('#T1CurTemp').html(status.machine.temperature.actual.t1.toFixed(1) + " / " + status.machine.temperature.setpoint.t1.toFixed(1)); // $('#T1CurTemp').html(status.machine.temperature.actual.t1.toFixed(1) + " / " + status.machine.temperature.setpoint.t1.toFixed(1));