Changement compteur
This commit is contained in:
@@ -17,6 +17,7 @@ var Loco = {
|
|||||||
Dir: LOCO_DIR.FORWARD,
|
Dir: LOCO_DIR.FORWARD,
|
||||||
Scale: 1, // Example real loco speed is 45Kmh/max, so what are step (128 for digital to represent 0-200Kmh) per Kmh
|
Scale: 1, // Example real loco speed is 45Kmh/max, so what are step (128 for digital to represent 0-200Kmh) per Kmh
|
||||||
MaxSpeed: 100, // Max speed in DCC step (<129) to reach scale speed (e.g. 45Kmh)
|
MaxSpeed: 100, // Max speed in DCC step (<129) to reach scale speed (e.g. 45Kmh)
|
||||||
|
TotalDist: 0, // Total distance traveled in kilometers (scaled)
|
||||||
setMode: function(mode) {
|
setMode: function(mode) {
|
||||||
this.Mode = mode;
|
this.Mode = mode;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
<svg width="300" height="200" viewBox="0 0 300 200" xmlns="http://www.w3.org/2000/svg">
|
<svg width="300" height="200" viewBox="0 0 300 200" xmlns="http://www.w3.org/2000/svg">
|
||||||
<image href="img/Speed.png" x="0" y="0" width="300" height="200"/>
|
<image href="img/Speed.png" x="0" y="0" width="300" height="200"/>
|
||||||
<line id="needle" x1="150" y1="120" x2="150" y2="70" stroke="#e74c3c" stroke-width="6" stroke-linecap="round" />
|
<line id="needle" x1="150" y1="120" x2="150" y2="70" stroke="#e74c3c" stroke-width="6" stroke-linecap="round" />
|
||||||
|
<text id="kmText" x="280" y="160" font-size="20" text-anchor="end" fill="#333">
|
||||||
|
0
|
||||||
|
</text>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-align:center; margin-top:20px;">
|
<div style="text-align:center; margin-top:20px;">
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<svg width="500" height="405" xmlns="http://www.w3.org/2000/svg">
|
<svg width="300" height="200" viewBox="0 0 300 200" xmlns="http://www.w3.org/2000/svg">
|
||||||
<image href="speed.png" x="0" y="0" width="500" height="405"/>
|
<image href="img/Speed.png" x="0" y="0" width="300" height="200"/>
|
||||||
<!-- SVG needle overlay -->
|
<line id="needle" x1="150" y1="120" x2="150" y2="70" stroke="#e74c3c" stroke-width="6" stroke-linecap="round" />
|
||||||
<line id="needle" x1="200" y1="200" x2="150" y2="50" stroke="#e74c3c" stroke-width="6"/>
|
<text id="kmText" x="280" y="160" font-size="20" text-anchor="end" fill="#333">
|
||||||
</svg>
|
0
|
||||||
|
</text>
|
||||||
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 414 B |
Reference in New Issue
Block a user