diff --git a/html/markers.js b/html/markers.js index 3b2b1c9..7648d20 100644 --- a/html/markers.js +++ b/html/markers.js @@ -454,6 +454,33 @@ let shapes = { h: 31, path: 'M14.4 15.66l-1.16 1.13-.63.07-.01.18 1.87.1-1.87.08s-.09.53-.34.62c0 0-.25-.1-.35-.6l-1.85-.03 1.83-.17v-.2l-.58-.07-1.26-1.06-6.55 1.9L3 19s-.1-.61.21-1.9l-.32-.12v-.18l7.12-3.62 1.42-2.88s0-1.9.08-2.5l-4.02.03s-.18-.97.3-1l3.9-.03s.25-.9.5-1c0 0 .12-.13.58.98l3.79-.05s.4.05.26.98l-3.8.04s.1 1.18.03 2.59l1.4 2.74 7.32 3.43v.22l-.22.07s.35 1.69.14 1.8l-.4-1.25z', }, + // Flying Pumpkin + 'pumpkin': { + viewBox:'-4 -3 32 32', + w: 38, + h: 38, + accentMult: 0.6, + path: 'M12.33 20.61s.43.02.65-.28c0 0 .68.5 1.72-.31 0 0 .94.37 2-1.32 1.04-1.7.58-3.44.58-3.44s.99-.8 2.1.33c0 0 .81-1.95 3.02-.29 0 0 .36-2.2 2.93-.62 0 0-.89-2.47-4.12-2.7-3.23-.23-4.3 2.32-4.3 2.32s-.12-.47-.64-1.12c0 0 1.54-.16.84-.64 0 0-1.04-.97-2.24-1.37 0 0 .06-1.01-.73-2.52 0 0 .5-.38.93-1.64 0 0 .83-.05 1.67-.47 0 0-1.67-1.06-3.27-.58-1.6.48-2.27 1.18-2.76 2.68 0 0-1.33.83-1.8 2.76 0 0-2.8 1.45-1.67 1.63 0 0 1.09.17.94.35 0 0-.42.46-.6.85 0 0-1.36-1.94-3.06-2.1 0 0-3.88-.71-5.4 2.64 0 0 2.64-1.6 2.95.6 0 0 1.97-1.85 3 .34 0 0 1.37-1.4 2.16-.36 0 0-.57 1.47.21 3.02.78 1.55 1.95 2.1 2.36 1.83 0 0 1.16.67 1.7.17 0 0 .3.25.83.24z', + accent: 'M10.7 17.63c-.04 0-.53 1.11-.53 1.11l-.76-1.39m2.1 2.35l-.37-.98-.45.76m3.07-.14l-.49-.7-.38.97m-.1-1.93l-.56 1.26-.73-1.23m3.4-.5l-.5 1.37-.64-1.05m-5.72-.74s3.81 2.29 8.36-.27c0 0-.38 2.54-4.03 3.2 0 0-2.94.38-4.33-2.93zm3.11-.28s1-2.46 1.98 0c0 0 .52.75-.23.82-.76.07-1.26.06-1.26.06s-1.08.14-.49-.88zm2.4-1.12s-1.4-1.13-.33-1.2c1.08-.07 1.69 0 1.69 0s.91.05.43.77c-.49.72-.52.8-.52.8s-.27.48-1.28-.37zm-2.6-.12s-1.18 1.04-1.58.34c-.4-.7-.43-.86-.43-.86s-.32-.62.67-.62h.97-.18s1.67.17 1.08.69l-.52.45zm6.26-2.29s-4.12-1.34-10.3 0', + }, + // Witch on broom Mirrored + 'witchr': { + w: 28, + h: 28, + viewBox: '0 0 32 32', + strokeScale: 1.2, + transform: 'rotate(90,16,16)', + path: 'M8.55 15.85s.54-.33.86-.37a5.06 5.06 0 011.53.07c.1.1.52.1.27.5-.24.4-1.35 1.12-1.34 1.81l.11.43-.12.3s-.03.16-.3-.04c-.28-.2-.6 0-.6 0s-.02.13.14.38c.16.24.14.2-.1.72-.25.53-.42.2-.77-.02-.35-.21-.23.9.34 1.21 0 0 1.02.08-.01.36 0 0-.9.16-2.1.2 0 0-.8 0-.83.36l3.3-.08s.3-.04.3.13c0 0-.08.45.45 1.42 0 0 .13.13.61 1.08 0 0 .3.6 1.36.14l1.33-.59s.65-.39.9-1.16c0 0-2.3 1.21-2.24.04l.1-1s-.03-.52 1.23-.6c0 0 .43-.12 2.37-.3 0 0-1.55-.14-3.49 0 0 0 2.56-.3 3.28-.24.72.05 1.61-.02 2.08-.37 0 0 1.29-1.15 2.13-1.23 0 0-.13-.4-.72-.23-.6.18-1.6.99-1.6.99s-.54.4-2.3.38c0 0 1.27-.04 1.76-.37.48-.33.7-.72 1.48-1.16.8-.44 1.47-.13 1.67.16.21.3.87 1.51 1.2 1.45 0 0-.73-1.6-1.2-2.03-.46-.44-.99-.68-1.65-.28-.65.4-1.15.97-2.42 1.2-1.27.24-1.45.17-1.45.17s.44-.13.87-.46c.43-.32 1-.74 1.18-.93.18-.18 1.4-1.05 2.14-1 .75.04.99-.05 1.84 1.3.85 1.36.96 1.7 2.1 1.6 1.14-.1 2.77-.68 3.58-.73.81-.05 1.59-.26 2.57 1.27 0 0 .33-1-.8-1.63-1.14-.62-3.6-.06-4.6-.2-.98-.13-1.34-.34-2.17-1.5-.82-1.16-1.79-1.42-3.33-1.5 0 0 .9-.52 1-1.02.1-.5-.16-1.05-.16-1.05s-.26-.4.29-.44c.55-.05.63-.07.63-.07l.5.26.73-.04s1.44.95 3.24.3c1.8-.63 1-1.25 4-.98 0 0 .02-.37-1.79-.39 0 0 .63-.36 2.75.3 0 0 .03-1.27-3.54-1.44 0 0 1.3-.7 3.08.52 0 0-.06-.98-1.2-1.28-1.15-.3-2.34-.86-4.9-.04 0 0 .9-.86 3.39-.51 0 0-1.1-.92-3.4-.48-2.3.43-2.7 2.32-2.7 2.32s-.2.19-.42.23c-.21.05-.21.5-.21.5s.18.24-.44.31c-.62.08-.4-.37-.5-.42 0 0-.65-2.14 4.42-3.67 0 0-3.31-.72-6.31 2.92 0 0-.37-.77.43-1.18.8-.41 1.44-.72 1.37-3.12 0 0-.86 1.75-2.41 2.14 0 0-.68.14-1.63 1.17 0 0-.74-1.04 1.24-2.96 0 0-2.73.65-3.8 3 0 0-.53 1.11-.78 2.85 0 0-.03.92-.37.97 0 0-.56.12-.64-.71 0 0-.4-1.07.61-3.3 0 0-.74.48-1.57 1.92 0 0-.58 1.05-.45 1.86 0 0 .27.5.1.6 0 0-.26-.19-.66.1l-.48.27-5.23 1.18s-.63.42.15.47l4.7-1.12.46-.04.28.27.47.04-.03.22s-.13.5.84-.11z', + }, + // Witch on broom Normal + 'witchl': { + w: 28, + h: 28, + viewBox: '0 0 32 32', + strokeScale: 1.2, + transform: 'rotate(90,16,16)', + path: 'M9.06 15.51s.55.33.86.37c.32.04 1.43.03 1.53-.07.1-.1.53-.1.28-.5s-1.35-1.12-1.34-1.81l.1-.43-.11-.3s-.04-.16-.31.04c-.28.2-.59 0-.59 0s-.03-.13.14-.38c.16-.24.14-.2-.1-.73-.25-.52-.43-.19-.78.02-.34.22-.22-.9.34-1.2 0 0 1.03-.08 0-.36 0 0-.91-.16-2.11-.21 0 0-.79.01-.82-.35l3.3.08s.3.03.3-.13c0 0-.08-.45.44-1.43 0 0 .13-.12.62-1.07 0 0 .3-.6 1.36-.14l1.32.59s.66.39.9 1.16c0 0-2.3-1.21-2.23-.04l.1 1s-.04.52 1.22.6c0 0 .43.12 2.37.3 0 0-1.55.14-3.48 0 0 0 2.56.3 3.28.24.72-.05 1.6.02 2.08.37 0 0 1.28 1.15 2.12 1.23 0 0-.12.4-.71.23-.6-.18-1.6-.99-1.6-.99s-.55-.4-2.3-.38c0 0 1.27.04 1.75.37s.7.72 1.49 1.16c.79.44 1.47.13 1.67-.16.2-.3.86-1.51 1.2-1.45 0 0-.74 1.59-1.2 2.03-.46.44-1 .68-1.65.28-.66-.4-1.15-.97-2.42-1.2-1.27-.24-1.46-.17-1.46-.17s.44.13.87.46c.43.32 1 .74 1.18.93.19.18 1.4 1.04 2.15 1 .75-.04.98.04 1.83-1.3.85-1.36.97-1.7 2.1-1.6 1.14.1 2.78.68 3.59.73.8.05 1.59.26 2.57-1.27 0 0 .33 1-.81 1.63-1.14.62-3.6.06-4.58.2-.99.13-1.36.34-2.18 1.5-.82 1.16-1.8 1.42-3.33 1.5 0 0 .89.52 1 1.02.1.5-.16 1.05-.16 1.05s-.27.39.29.44c.55.05.62.07.62.07l.51-.26.72.04s1.45-.95 3.24-.31c1.8.64 1 1.26 4 .98 0 0 .02.38-1.78.4 0 0 .62.36 2.75-.3 0 0 .03 1.27-3.54 1.44 0 0 1.3.69 3.08-.52 0 0-.06.98-1.2 1.28-1.16.3-2.34.86-4.91.04 0 0 .9.86 3.4.51 0 0-1.1.92-3.4.48-2.3-.43-2.7-2.32-2.7-2.32s-.2-.19-.42-.23c-.22-.05-.22-.5-.22-.5s.19-.24-.43-.31c-.63-.08-.4.37-.5.42 0 0-.65 2.14 4.41 3.67 0 0-3.3.72-6.3-2.92 0 0-.37.77.43 1.18.8.41 1.44.72 1.36 3.12 0 0-.86-1.75-2.4-2.14 0 0-.68-.14-1.64-1.17 0 0-.74 1.04 1.24 2.96 0 0-2.73-.65-3.8-3 0 0-.53-1.11-.77-2.85 0 0-.03-.92-.37-.97 0 0-.56-.12-.65.7 0 0-.39 1.08.62 3.31 0 0-.74-.48-1.57-1.92 0 0-.59-1.05-.45-1.86 0 0 .27-.5.09-.6 0 0-.26.19-.66-.1l-.48-.27-5.22-1.18s-.64-.42.14-.47l4.71 1.12.45.04.3-.27.45-.04-.03-.22s-.12-.5.84.11z', + }, 'unknown': { w: 22, h: 22, @@ -895,8 +922,18 @@ let CategoryIcons = { 'C3' : ['ground_tower', 1], }; -function getBaseMarker(category, typeDesignator, typeDescription, wtc, addrtype, altitude) { +function getBaseMarker(category, typeDesignator, typeDescription, wtc, addrtype, altitude, eastbound) { //return ['f5_tiger', 1]; + if (halloween) { + if (typeDesignator == 'C172') + return ['pumpkin', 1]; + if (typeDescription == 'L2J' && wtc == 'L') { + if (eastbound) + return ['witchr', 1]; + else + return ['witchl', 1]; + } + } if (squareMania) return ['ground_square', 1.2]; if (typeDesignator in TypeDesignatorIcons) { @@ -905,8 +942,8 @@ function getBaseMarker(category, typeDesignator, typeDescription, wtc, addrtype, return [shape, scaling]; } - if (typeDescription !== undefined && typeDescription !== null && typeDescription.length === 3) { - if (wtc !== undefined && wtc !== null && wtc.length === 1) { + if (typeDescription != null && typeDescription.length === 3) { + if (wtc !== null && wtc.length === 1) { let typeDescriptionWithWtc = typeDescription + "-" + wtc; if (typeDescriptionWithWtc === "L2J-M" && category === "A2") { return ["jet_swept", 1]; @@ -937,6 +974,8 @@ function getBaseMarker(category, typeDesignator, typeDescription, wtc, addrtype, if (altitude == 'ground' && (addrtype == 'adsb_icao_nt' || addrtype == 'tisb_other' || addrtype == 'tisb_trackfile')) return ['ground_square', 1]; + if (halloween) + return ['pumpkin', 1]; return ['unknown', 1]; } diff --git a/html/planeObject.js b/html/planeObject.js index 9225aff..ff89ea2 100644 --- a/html/planeObject.js +++ b/html/planeObject.js @@ -695,13 +695,14 @@ PlaneObject.prototype.updateIcon = function() { if (icaoType == null && this.squawk == 7777) icaoType = 'TWR'; + let eastbound = this.rotation < 180; let fillColor = this.getMarkerColor(); let baseMarkerKey = (this.category ? this.category : "A0") + "_" - + this.typeDescription + "_" + this.wtc + "_" + icaoType + '_' + (this.altitude == "ground"); + + this.typeDescription + "_" + this.wtc + "_" + icaoType + '_' + (this.altitude == "ground") + eastbound; if (!this.baseMarker || this.baseMarkerKey != baseMarkerKey) { this.baseMarkerKey = baseMarkerKey; - this.baseMarker = getBaseMarker(this.category, icaoType, this.typeDescription, this.wtc, this.addrtype, this.altitude); + this.baseMarker = getBaseMarker(this.category, icaoType, this.typeDescription, this.wtc, this.addrtype, this.altitude, eastbound); this.shape = this.baseMarker[0]; this.baseScale = this.baseMarker[1] * 0.96; this.baseMarker = shapes[this.shape] diff --git a/html/script.js b/html/script.js index ed6245f..df7a877 100644 --- a/html/script.js +++ b/html/script.js @@ -111,6 +111,7 @@ let inactive = 0; let firstFetchDone = false; let overrideMapType = null; let altitudeChartDisplay; +let halloween = false; let shareLink = ''; @@ -490,6 +491,9 @@ function initialize() { if (search.has('showGrid')) showGrid = true; + if (search.has('halloween')) + halloween = true; + if (search.has('onlyDataSource')) onlyDataSource = search.get('onlyDataSource');