diff --git a/js/prettygcodeview.js b/js/prettygcodeview.js index c01026b..4184e09 100644 --- a/js/prettygcodeview.js +++ b/js/prettygcodeview.js @@ -17,6 +17,7 @@ $(function () { this.showNozzle=true; this.highlightCurrentLayer=true; this.show2d=true; + this.font="Brush Script"; }; var pgSettings = new PGSettings(); window.PGCSettings=pgSettings; @@ -338,6 +339,11 @@ $(function () { //todo handle finish change for this gui.add(pgSettings, 'perspectiveCamera'); + + gui.add(pgSettings, 'font', ["Ariel", "Brush Script", "Courier New", "Helvetica", "Times", "Verdana"]).onFinishChange(function(){ + InitFont(); + });; + InitFont(); var folder = gui.addFolder('Windows');//hidden. // folder.add(pgSettings, 'showState').onFinishChange(updateWindowStates).listen(); @@ -355,6 +361,12 @@ $(function () { } } + function InitFont() + { + var font = pgSettings.font === "Brush Script" ? "'Brush Script MT', cursive" : pgSettings.font; + $('.pgLogo').css({"font-family" : font}); + $('.pgclabel').css({"font-family" : font}); + } self.initScene = function () { if (!viewInitialized) { @@ -378,10 +390,11 @@ $(function () { if($(".pgconnection").hasClass("connected")) $(".pgconnection").removeClass("connected") } + $("#status-state").html(newState.state) $("#status-elapsed").html(new Date(newState.printTime * 1000).toISOString().substr(11, 8)) $("#status-done").html(newState.perDone.toString()+"%") - if(newState.printTimeLeft) + if(newState.printTimeLeft && Number.isFinite(newState.printTimeLeft)) $("#status-eta").html(new Date(newState.printTimeLeft * 1000).toISOString().substr(11, 8)) //todo. find another place for this? @@ -556,7 +569,7 @@ $(function () { scene.background = new THREE.Color(0xd0d0d0); else scene.background = null;//new THREE.Color(0xd0d0d0); - + //for debugging window.myScene = scene; diff --git a/pgcode.html b/pgcode.html index 3d10cd1..c0d4345 100644 --- a/pgcode.html +++ b/pgcode.html @@ -120,21 +120,24 @@ color: white; } + .pgLogo + { + position: absolute; + top: 12px; + left: 24px; + color: #38bfff; + z-index: 10; + /* background: rgb(119 85 85 / 45%); */ + font-family: 'Brush Script MT', cursive; + font-size: large; + text-shadow: 2px 2px 2px rgb(51, 51, 51); + } + /* h1 { font-family: "Architects Daughter"; font-size: 24px; font-style: normal; font-variant: normal; font-weight: 700; line-height: 26.4px; } h3 { font-family: "Architects Daughter"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 700; line-height: 15.4px; } p { font-family: "Architects Daughter"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; line-height: 20px; } blockquote { font-family: "Architects Daughter"; font-size: 21px; font-style: normal; font-variant: normal; font-weight: 400; line-height: 30px; } pre { font-family: "Architects Daughter"; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; line-height: 18.5714px; } */ -
+