Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions js/prettygcodeview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -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) {
Expand All @@ -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?
Expand Down Expand Up @@ -556,7 +569,7 @@ $(function () {
scene.background = new THREE.Color(0xd0d0d0);
else
scene.background = null;//new THREE.Color(0xd0d0d0);

//for debugging
window.myScene = scene;

Expand Down
25 changes: 14 additions & 11 deletions pgcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -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; } */
</style>

<canvas id="pgccanvas" ></canvas>
<div style="
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);
">
<div class="pgLogo">
<a href='https://github.com/Kragrathea/pgcode' target="_blank">
<div id="pgclogo"><span style="color: #a385ff;">Pretty</span><span style="color: #a385ff;">G</span><span style="color: #a385ff;">Code</span></div>
</a></div>
Expand Down