diff --git a/.eslintrc.json b/.eslintrc.json index 792ee67f..ef0592bf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,6 +8,7 @@ "ecmaVersion": "latest", "sourceType": "module" }, + "ignorePatterns": ["/JSDOCS/scripts"], "overrides": [ { "files": ["*.test.js"], diff --git a/.github/workflows/jsdocs.yml b/.github/workflows/jsdocs.yml new file mode 100644 index 00000000..b3869fd5 --- /dev/null +++ b/.github/workflows/jsdocs.yml @@ -0,0 +1,25 @@ +name: Generate JSDOCS +run-name: Action by @${{ github.actor }} +on: push +permissions: + contents: write +jobs: + jsdocs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build JSDOCS + uses: andstor/jsdoc-action@v1 + with: + source_dir: ./source + recurse: true + output_dir: ./JSDOCs + template: minami + - name: Commit JSDOCS + uses: EndBug/add-and-commit@v9 + with: + author_name: GitHub Actions + author_email: noreply@github.com + message: "Generated JSDocs" + add: "JSDOCs/*" diff --git a/.jsdoc.conf.json b/.jsdoc.conf.json new file mode 100644 index 00000000..60f19516 --- /dev/null +++ b/.jsdoc.conf.json @@ -0,0 +1,21 @@ +{ + "plugins": [], + "recurseDepth": 10, + "opts": { + "recurse": true + }, + "source": { + "include": ["src"], + "includePattern": ".+\\.js(doc|x)?$", + "excludePattern": "node_modules" + }, + "sourceType": "module", + "tags": { + "allowUnknownTags": true, + "dictionaries": ["jsdoc", "closure"] + }, + "templates": { + "cleverLinks": false, + "monospaceLinks": false + } +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..0aa9f926 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +JSDOCs diff --git a/.vscode/settings.json b/.vscode/settings.json index 6b665aaa..4c7ff40f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "liveServer.settings.port": 5501 + "liveServer.settings.port": 5502 } diff --git a/JSDOCs/FortuneCookie_fortuneCookie.js.html b/JSDOCs/FortuneCookie_fortuneCookie.js.html new file mode 100644 index 00000000..36e2debd --- /dev/null +++ b/JSDOCs/FortuneCookie_fortuneCookie.js.html @@ -0,0 +1,304 @@ + + + + + + FortuneCookie/fortuneCookie.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

FortuneCookie/fortuneCookie.js

+ + + + + + + +
+
+
/**
+ * Array of general, college, and collage-romance type fortunes
+ */
+const fortunes = [
+  "Your future is bright, embrace it with open arms.",
+  "A wonderful surprise is coming your way.",
+  "Believe in yourself and you will achieve great things.",
+  "Your kindness will lead to good fortune.",
+  "The journey may be difficult, but the destination is worth it.",
+  "Your talents will soon be recognized and rewarded.",
+  "Don't be afraid to take a chance, it may lead to great things.",
+  "Your hard work and perseverance will pay off in the end.",
+  "Keep an open mind and you will find new opportunities.",
+  "Your positivity and optimism will bring you success.",
+  "You will soon experience a life-changing event.",
+  "Your creativity and imagination will bring you great success.",
+  "The best things in life are yet to come.",
+  "You will soon receive unexpected blessings.",
+  "A new friendship will bring you great happiness.",
+  "Your future is full of endless possibilities.",
+  "Good things come to those who work hard and never give up.",
+  "Let go of the past and embrace a bright future.",
+  "Your perseverance will lead to victory.",
+  "Your ability to adapt to change will bring you great success.",
+  "Your determination and hard work will pay off in the long run.",
+  "The journey may be tough, but the reward will be worth it.",
+  "Trust in your intuition and you will make the right decisions.",
+  "A new opportunity is on the horizon, seize it.",
+  "Your courage and confidence will bring you great success.",
+  "Your future is filled with abundance and prosperity.",
+  "Your greatest treasure is the love and support of those around you.",
+  "Your creativity will bring you great success in all areas of life.",
+  "Embrace change and you will find success and happiness.",
+  "Your positive attitude will bring you good luck and fortune.",
+  "Embrace the challenges that college brings, for they are the stepping stones to your future success.", // College
+  "Your college journey is like a blank canvas. Paint it with knowledge, experiences, and friendships that will last a lifetime.",
+  "In the halls of higher education, discover your true passions and let them guide you towards a fulfilling career.",
+  "Success in college is not just about grades; it's about the wisdom gained from both victories and failures.",
+  "The key to acing exams is not just studying hard but also finding the right balance between work and play.",
+  "Embrace diversity in college, for it is through understanding others that you will broaden your own horizons.",
+  "In college, you are the author of your own story. Make every chapter count and create a narrative that inspires others.",
+  "Don't be afraid to step out of your comfort zone in college. Growth happens when you challenge yourself.",
+  "Believe in your abilities, trust the process, and remember that you are capable of achieving great things in college and beyond.",
+  "Every setback in college is an opportunity for growth. Keep pushing forward, and you will emerge stronger than ever.",
+  "Success is not a destination but a journey. Enjoy the ride, make meaningful connections, and cherish every moment of your college years.",
+  "Remember, the true value of education lies not just in the knowledge gained but in the person you become.",
+  "Make the most of every networking opportunity in college. You never know where a connection can lead you.",
+  "In the face of challenges, remember that perseverance and resilience are the keys to unlocking your full potential.",
+  "College is the perfect time to explore your passions. Don't be afraid to pursue what truly sets your soul on fire.",
+  "Stay curious, stay hungry for knowledge. College is your chance to quench your thirst for learning.",
+  "Celebrate your achievements in college, big and small. They are the milestones that mark your personal growth.",
+  "Don't compare your college journey to others'. Stay focused on your own goals and pave your unique path to success.",
+  "Seek guidance when you need it, for mentors can offer invaluable wisdom that will shape your college experience.",
+  "Trust yourself and your abilities. You have the power to turn your college dreams into a reality.",
+  "Opportunities are like puzzle pieces; in college, you'll find the right ones to shape your future.",
+  "The friendships you forge in college will be your lifelong treasures. Nurture them with care.",
+  "In the realm of higher education, passion and dedication are the keys that unlock doors to boundless possibilities.",
+  "Embrace the unknown in college, for it is in the unfamiliar that you'll discover your true potential.",
+  "Remember, failure is not the end but a stepping stone on the path to greatness. Learn from it, rise above it.",
+  "In the realm of college, seize every chance to expand your horizons, for knowledge knows no bounds.",
+  "Your college experience is a mosaic of moments. Collect each one with gratitude and make a masterpiece.",
+  "The pursuit of education is a marathon, not a sprint. Pace yourself, stay determined, and finish strong.",
+  "In college, each class is a brushstroke, and your mind is the canvas. Paint a masterpiece of knowledge.",
+  "The walls of a college campus hold countless stories. Leave your own mark and become a part of its legacy.",
+  "Be fearless in pursuing your dreams in college. The world needs your unique talents and perspectives.",
+  "Remember, in college, failure is not falling down; it's staying down. Rise each time with renewed determination.",
+  "In college, challenges may test your limits, but they also reveal the strength and resilience within you.",
+  "Every lecture is an opportunity to expand your mind. Pay attention, ask questions, and embrace the power of knowledge.",
+  "Success in college is not solely measured by grades but by the growth and transformation you undergo along the way.",
+  "Take time to nourish your mind, body, and soul in college. Self-care is essential for a balanced and fulfilling journey.",
+  "As you navigate the college maze, trust your instincts and follow the path that aligns with your passions.",
+  "In college, make connections that transcend the classroom. Forge bonds that will support and inspire you throughout your life.",
+  "Every setback in college is an opportunity to learn, adapt, and come back stronger. Keep pushing forward!",
+  "Remember, in college, you have the power to shape your own narrative. Write a story that reflects your true potential.",
+  "Embrace diversity in college, for it enriches your understanding of the world and fosters compassion and empathy.",
+  "As you climb the mountain of knowledge in college, enjoy the breathtaking view of the discoveries you make along the way.",
+  "Celebrate the small victories in college. Each step forward, no matter how small, brings you closer to your goals.",
+  "In college, seek mentors who inspire and challenge you. Their guidance can ignite the spark that propels you towards greatness.",
+  "Let curiosity be your guiding light in college. Embrace the joy of learning and explore new realms of knowledge.",
+  "College is a time of self-discovery. Embrace the journey of finding who you truly are and embrace your authentic self.",
+  "Remember, in college, success is not a destination; it's a mindset. Embrace a growth mindset and watch your potential soar.",
+  "In college, each essay is an opportunity to articulate your thoughts and ideas. Let your voice shine and make an impact.",
+  "Dare to dream big in college. Your aspirations have the power to shape the world and leave a lasting legacy.",
+  "As you embark on your college adventure, remember that every day is a chance to grow, learn, and redefine what's possible.",
+  "Love may find you in the most unexpected places, even in the lecture hall or library. Keep your heart open.", // Romance
+  "In the realm of college, sparks of attraction can ignite friendships that blossom into beautiful love stories.",
+  "A study partner today may become a soulmate tomorrow. Let academic connections pave the way for lasting romance.",
+  "Love is like a research project, requiring patience, dedication, and the willingness to explore new depths.",
+  "In college, love knows no boundaries. Embrace the diversity of connections and let your heart guide you.",
+  "A campus stroll hand-in-hand can lead to memories that will warm your heart long after graduation.",
+  "Don't be afraid to let love distract you momentarily. Sometimes the best lessons are learned in the embrace of another.",
+  "The late-night conversations shared with someone special can deepen your connection and create unforgettable bonds.",
+  "In the whirlwind of college, love can be a guiding light, reminding you of the importance of both emotional and intellectual connections.",
+  "Just as knowledge grows, so can love. Nurture it with care, and watch it blossom into something extraordinary.",
+  "Remember, relationships in college are a delicate dance. Communicate, compromise, and cherish the magic of love.",
+  "The chemistry you share with someone special can be more electrifying than any scientific experiment.",
+  "In the realm of college romance, take risks, be vulnerable, and discover the magic of love's transformative power.",
+  "As you explore your passions in college, you may find that love is the most captivating subject of all.",
+  "Cherish the stolen moments with your college sweetheart, for they will become precious memories that last a lifetime.",
+  "Love is the ultimate inspiration. Let the love you find in college ignite your creativity and fuel your dreams.",
+  "In the sea of possibilities, love can be the anchor that grounds you and gives your college journey meaning.",
+  "True love sees no boundaries. Embrace cultural diversity in college and let love bridge the gaps.",
+  "The late-night study sessions can turn into whispers of love, as the line between friendship and romance blurs.",
+  "In college, love may be a detour from your original plans, but it can lead to a destination more beautiful than you ever imagined.",
+  "The right person can be your biggest cheerleader in college, supporting you in both your academic and personal pursuits.",
+  "Love is a dance, and college is the perfect stage to find a partner who moves to the rhythm of your heart.",
+  "A love letter written on a textbook page can hold more magic than any words penned in a fairy tale.",
+  "In college, love can be a refuge in the storm. Find solace in the arms of someone who understands your journey.",
+  "A smile from someone special can brighten even the gloomiest of college days. Let love be your sunshine.",
+  "Love has a way of finding you when you least expect it. Stay open-hearted, and let destiny work its magic.",
+  "In the journey of love, don't be afraid to rewrite the script. Create a love story in college that is uniquely yours.",
+  "The echoes of laughter shared with a loved one in college will reverberate in your heart for a lifetime.",
+  "Love can be a sanctuary in the whirlwind of college life. Find comfort and strength in the arms of your beloved.",
+  "In the hustle and bustle of college, love can be a calming melody that brings peace to your soul.",
+  "The path to love in college may not always be smooth, but with patience and understanding, it can lead to a love story for the ages.",
+  "The campus may be vast, but love has a way of bringing two hearts together, no matter the distance.",
+  "In college, love is an adventure waiting to unfold. Embrace the journey and let your heart guide you to incredible destinations.",
+  "The love you find in college can shape not only your present but also your future. Choose your love wisely, for it can inspire you to greatness.",
+];
+
+let previousFortune = "";
+const fortuneButton = document.getElementById("fortune-button");
+const fortuneText = document.getElementById("fortune-text");
+const fortuneAudioCrack = document.getElementById("fortune-crack");
+const voiceToggle = document.getElementById("voice-toggle-checkbox");
+
+/**
+ * This function will get a random fortune from the fortune array and make sure it does not match the previous one
+ * @returns {string} a random fortune
+ */
+function getRandomFortune() {
+  let randomIndex = Math.floor(Math.random() * fortunes.length);
+  let fortune = fortunes[randomIndex];
+
+  // Generate a new random fortune if it matches the previous fortune
+  while (fortune === previousFortune) {
+    randomIndex = Math.floor(Math.random() * fortunes.length);
+    fortune = fortunes[randomIndex];
+  }
+
+  previousFortune = fortune;
+  return fortune;
+}
+
+/**
+ * Displays the fortune and if voice toggle is checked, reads out the fortune
+ */
+function showFortune() {
+  const fortune = getRandomFortune();
+  fortuneText.textContent = fortune;
+  fortuneText.style.display = "block";
+  if (voiceToggle.checked) {
+    speakFortune(fortune);
+  } else {
+    setTimeout(enableButton, 1000);
+  }
+}
+
+/**
+ * Reads out the fortune using speech synthesis
+ * @param {string} fortune What the fortune to be read out is
+ */
+function speakFortune(fortune) {
+  const speech = new SpeechSynthesisUtterance(fortune);
+  const option = voiceSelect.selectedOptions[0].getAttribute("data-name");
+  for (let i = 0; i < voices.length; i++) {
+    if (voices[i].name == option) speech.voice = voices[i];
+  }
+  speech.lang = "en-US";
+  speech.rate = 0.8;
+  speech.pitch = 1.2;
+  window.speechSynthesis.speak(speech);
+
+  // Reenable button when fortune is done being read
+  speech.addEventListener("end", () => {
+    enableButton();
+  });
+}
+
+/**
+ * Disables button so user cannot click it
+ */
+function disableButton() {
+  fortuneButton.disabled = true;
+  fortuneButton.style.opacity = "0.5";
+}
+
+/**
+ * Enables button so user can click it
+ */
+function enableButton() {
+  fortuneButton.disabled = false;
+  fortuneButton.style.opacity = "1";
+}
+
+/**
+ * When the user clicks the button, disables it so they cannot click the button
+ * in quick succession and cause audio issues
+ */
+fortuneButton.addEventListener("click", function () {
+  fortuneAudioCrack.play();
+  disableButton();
+  setTimeout(showFortune, 1000);
+});
+
+/**
+ * Added options for different voices using voice synthesis
+ */
+const synth = window.speechSynthesis;
+
+// const inputForm = document.querySelector("form");
+// const inputTxt = document.querySelector(".txt");
+const voiceSelect = document.querySelector("select");
+// const pitch = document.querySelector("#pitch");
+// const pitchValue = document.querySelector(".pitch-value");
+// const rate = document.querySelector("#rate");
+// const rateValue = document.querySelector(".rate-value");
+
+let voices = [];
+
+/**
+ * Speech synthesis API
+ */
+function populateVoiceList() {
+  voices = synth.getVoices();
+
+  for (let i = 0; i < voices.length; i++) {
+    const option = document.createElement("option");
+    option.textContent = `${voices[i].name} (${voices[i].lang})`;
+
+    if (voices[i].default) {
+      option.textContent += " — DEFAULT";
+    }
+
+    option.setAttribute("data-lang", voices[i].lang);
+    option.setAttribute("data-name", voices[i].name);
+    voiceSelect.appendChild(option);
+  }
+}
+
+populateVoiceList();
+if (speechSynthesis.onvoiceschanged !== undefined) {
+  speechSynthesis.onvoiceschanged = populateVoiceList;
+}
+
+
+
+ + + + +
+ +
+ + + + + + + diff --git a/JSDOCs/PalmReading_script.js.html b/JSDOCs/PalmReading_script.js.html new file mode 100644 index 00000000..87b54e41 --- /dev/null +++ b/JSDOCs/PalmReading_script.js.html @@ -0,0 +1,82 @@ + + + + + + PalmReading/script.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

PalmReading/script.js

+ + + + + + + +
+
+
const fortune = document.getElementById("fortune-paragraph");
+// etc
+
+/**
+ * Generates random fortunes. Called when the app finishes analyzing the palm.
+ */
+export function handleFortune() {
+  console.log("TODO", fortune);
+}
+
+const tabLabels = document.querySelectorAll('input[name="tab"]');
+const tabContents = document.querySelectorAll('.tab-content');
+
+tabLabels.forEach(function(label){
+  label.addEventListener('change',function(){
+    tabContents.forEach(function(content){
+      content.hidden = true;
+    });
+
+    const selectedContent = document.getElementById(`${this.value}-tab`);
+    selectedContent.hidden = false;
+  });
+});
+
+
+ + + + +
+ +
+ + + + + + + diff --git a/JSDOCs/PalmReading_webcam.js.html b/JSDOCs/PalmReading_webcam.js.html new file mode 100644 index 00000000..b2021d5e --- /dev/null +++ b/JSDOCs/PalmReading_webcam.js.html @@ -0,0 +1,245 @@ + + + + + + PalmReading/webcam.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

PalmReading/webcam.js

+ + + + + + + +
+
+
import { handleFortune } from "./script.js";
+
+const webcamWrapper = document.getElementById("webcam-wrapper");
+/**
+ * The currently displayed `.instructions` element.
+ * @type {HTMLParagraphElement | null}
+ */
+let lastInstructionElem = null;
+/**
+ * Sets the message that appears under the webcam while it is analyzing the
+ * palm. There will be a fade transition between the previous and new
+ * instruction message.
+ *
+ * @param {string} instruction - The message to display. If an empty string,
+ * it'll hide the instructions.
+ */
+function setInstructions(instruction) {
+  if (lastInstructionElem) {
+    lastInstructionElem.addEventListener("animationend", (e) => {
+      e.currentTarget.remove();
+    });
+    lastInstructionElem.classList.remove("instructions-active");
+  }
+  if (instruction) {
+    lastInstructionElem = Object.assign(document.createElement("p"), {
+      textContent: instruction,
+      className: "instructions instructions-active",
+    });
+    webcamWrapper.append(lastInstructionElem);
+  } else {
+    lastInstructionElem = null;
+  }
+}
+
+/**
+ * The `<video>` element that previews whatever is on the webcam.
+ * @type {HTMLVideoElement}
+ */
+const video = document.getElementById("webcam-video");
+const requestBtn = document.getElementById("request-webcam");
+const ecgGraph = document.getElementById("ecg");
+const result = document.getElementById("result-palm");
+const context = result.getContext("2d");
+const readAnother = document.getElementById("read-another-hand");
+let flipCamera = true;
+async function startCamera() {
+  document.body.classList.remove("show-results");
+  requestBtn.parentNode.style.display = "none";
+  readAnother.style.display = "none";
+  flipCamera = true;
+  video.classList.add("flip");
+  try {
+    const stream = await navigator.mediaDevices.getUserMedia({ video: true });
+    video.srcObject = stream;
+    const track = stream.getTracks()[0];
+    // Firefox does not support getCapabilities
+    if ("getCapabilities" in track) {
+      const { facingMode } = track.getCapabilities();
+      if (facingMode.includes("environment")) {
+        video.classList.remove("flip");
+        flipCamera = false;
+      }
+    }
+  } catch (error) {
+    requestBtn.parentNode.style.display = null;
+  }
+}
+requestBtn.addEventListener("click", startCamera);
+video.addEventListener("loadedmetadata", () => {
+  video.play();
+  video.classList.add("video-on");
+  ecgGraph.classList.add("ecg-active");
+  ecgHistory.splice(0, ecgHistory.length);
+
+  setTimeout(() => {
+    setInstructions("Please hold your hand over your camera.");
+  }, 500);
+  setTimeout(() => {
+    frameId = 0;
+    paintEcg();
+    setInstructions("Heartbeat detected.");
+  }, 3000);
+  setTimeout(() => {
+    paintEcg();
+    setInstructions("Keep your hand steady.");
+  }, 6000);
+  setTimeout(() => {
+    video.pause();
+    const size = Math.min(video.videoWidth, video.videoHeight);
+    result.width = size;
+    result.height = size;
+    if (flipCamera) {
+      context.translate(size, 0);
+      context.scale(-1, 1);
+    }
+    if (video.videoWidth > video.videoHeight) {
+      context.drawImage(video, -(video.videoWidth - video.videoHeight) / 2, 0);
+    } else {
+      context.drawImage(video, 0, -(video.videoHeight - video.videoWidth) / 2);
+    }
+    video.srcObject.getTracks()[0].stop();
+    window.cancelAnimationFrame(frameId);
+    frameId = null;
+    video.classList.remove("video-on");
+    ecgGraph.classList.remove("ecg-active");
+    setInstructions("");
+    readAnother.style.display = "block";
+    handleFortune();
+    document.body.classList.add("show-results");
+  }, 10000);
+});
+readAnother.addEventListener("click", startCamera);
+
+// 20 units is about 0.6s, so 1 s = 33ish units
+const ecgPoints = [
+  [-0.8, 0.2],
+  [0.4, 1.2],
+  [1.5, 0.2],
+  [4.8, 0.2],
+  [5.1, -0.8],
+  [6.2, 13.9],
+  [7.4, -4],
+  [7.8, 0.2],
+  [10, 0.8],
+  [12, 4],
+  [13, 4],
+  [15, 0.5],
+  [16.8, 1.1],
+  [18, 0.2],
+];
+const XSHIFT = 0.8;
+const YSHIFT = -0.2;
+const PERIOD = 30;
+function ecg(time) {
+  time = time % PERIOD;
+  const index = ecgPoints.findIndex(([x]) => x + XSHIFT > time);
+  if (index === -1) {
+    return 0;
+  }
+  const [left, right] = ecgPoints.slice(index - 1, index + 1);
+  return (
+    ((time - XSHIFT - left[0]) * (right[1] - left[1])) / (right[0] - left[0]) +
+    left[1] +
+    YSHIFT
+  );
+}
+
+const ECG_LENGTH = 300;
+const FPS = 60;
+const ecgPath = document.getElementById("ecg-path");
+const ecgHistory = [];
+let simTime = 0;
+let startTime = Date.now();
+let frameId = null;
+function paintEcg() {
+  if (frameId === null) {
+    return;
+  }
+  // Correct for different monitor refresh rates
+  const now = Date.now();
+  const realTime = now - startTime;
+  if (realTime - simTime > 500) {
+    // If too much time passed
+    simTime = 0;
+    startTime = now;
+  } else {
+    while (simTime < realTime) {
+      ecgHistory.unshift(
+        -ecg(now / 30) * (Math.random() * 1 + 2.5) +
+          15 +
+          (Math.random() - 0.5) * 2
+      );
+      while (ecgHistory.length > ECG_LENGTH) {
+        ecgHistory.pop();
+      }
+      ecgPath.setAttributeNS(
+        null,
+        "d",
+        "M" + ecgHistory.map((pt, i) => `${i + 1} ${pt}`).join("L")
+      );
+      simTime += 1000 / FPS;
+    }
+  }
+  frameId = window.requestAnimationFrame(paintEcg);
+}
+
+
+
+ + + + +
+ +
+ + + + + + + diff --git a/JSDOCs/Zodiac_compatibility_script.js.html b/JSDOCs/Zodiac_compatibility_script.js.html new file mode 100644 index 00000000..03c9e884 --- /dev/null +++ b/JSDOCs/Zodiac_compatibility_script.js.html @@ -0,0 +1,323 @@ + + + + + + Zodiac_compatibility/script.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

Zodiac_compatibility/script.js

+ + + + + + + +
+
+
import {
+  romantic,
+  zodiacDateRangesLeft,
+  zodiacDateRangesRight,
+  mappingLeft,
+  mappingRight,
+} from "./data/dataArray.js";
+
+// Get all necessary document objects
+const leftWheel = document.getElementById("left_wheel_img");
+const rightWheel = document.getElementById("right_wheel_img");
+const button = document.getElementById("find-out");
+const how_to = document.getElementById("how_to");
+const help = document.getElementById("help");
+const closeButton = document.getElementById("closeButton");
+const popup = document.getElementById("pop-up");
+const left_arrow = document.getElementById("left_arrow");
+const right_arrow = document.getElementById("right_arrow");
+const left_bday = document.getElementById("left_bday_input");
+const right_bday = document.getElementById("right_bday_input");
+
+// add the necessary event listeners for the wheels
+leftWheel.addEventListener("wheel", rotateleftWheel);
+rightWheel.addEventListener("wheel", rotaterightWheel);
+leftWheel.addEventListener("mouseout", stopRotation);
+rightWheel.addEventListener("mouseout", stopRotation);
+// add all the necessary event listeners for the buttons
+button.addEventListener("mouseenter", stopRotation);
+button.addEventListener("click", displayResults);
+
+how_to.addEventListener("click", () => {
+  how_to.style.visibility = "hidden";
+  help.style.display = "block";
+  help.style.animation = "fadeIn 1s forwards";
+});
+closeButton.addEventListener("click", () => {
+  how_to.style.visibility = "visible";
+  help.style.animation = "fadeOut 1s forwards";
+  help.style.display = "none";
+});
+
+// Set initial rotation angle of the two zodiac wheels
+let leftWheelAngle = 0;
+let rightWheelAngle = 0;
+
+/**
+ * Rotates the left wheel based on the mouse wheel event.
+ * @param {WheelEvent} event - The mouse wheel event.
+ */
+function rotateleftWheel(event) {
+  const dateInput = document.getElementById("left_birthday");
+
+  // Determine the direction of scrolling
+  const direction = Math.sign(event.deltaY);
+
+  // Update the rotation angle based on the scrolling direction
+  leftWheelAngle += direction * 2;
+  // Apply the rotation transform to the wheel element
+  leftWheel.style.transform = `rotate(${leftWheelAngle}deg)`;
+  dateInput.type = "text";
+  dateInput.value = determineDateRangeLeft(roundAngle(leftWheelAngle));
+  dateInput.style.textAlign = "center";
+  dateInput.style.background = "transparent";
+  // Prevent the default scrolling behavior
+  event.preventDefault();
+}
+/**
+ * Rotates the right wheel based on the mouse wheel event.
+ * @param {WheelEvent} event - The mouse wheel event.
+ */
+function rotaterightWheel(event) {
+  const dateInput = document.getElementById("right_birthday");
+  // Determine the direction of scrolling
+  const direction = Math.sign(event.deltaY);
+
+  // Update the rotation angle based on the scrolling direction
+  rightWheelAngle += direction * 2;
+  // Apply the rotation transform to the wheel element
+  rightWheel.style.transform = `rotate(${rightWheelAngle}deg)`;
+
+  dateInput.type = "text";
+  dateInput.value = determineDateRangeRight(roundAngle(rightWheelAngle));
+  dateInput.style.textAlign = "center";
+  dateInput.style.background = "transparent";
+  // Prevent the default scrolling behavior
+  event.preventDefault();
+}
+/**
+ * Determines the zodiac sign date range based on the given angle on the left wheel.
+ * @param {number} angle - The angle of the left wheel.
+ * @returns {string} The zodiac sign associated with the angle.
+ */
+function determineDateRangeLeft(angle) {
+  angle = angle % 360;
+  for (let i = 0; i < zodiacDateRangesLeft.length; i++) {
+    if (angle === zodiacDateRangesLeft[i][0]) {
+      return zodiacDateRangesLeft[i][1];
+    }
+  }
+  return "unknown";
+}
+/**
+ * Determines the zodiac sign date range based on the given angle on the right wheel.
+ * @param {number} angle - The angle of the right wheel.
+ * @returns {string} The zodiac sign associated with the angle.
+ */
+function determineDateRangeRight(angle) {
+  angle = angle % 360;
+  for (let i = 0; i < zodiacDateRangesRight.length; i++) {
+    if (angle === zodiacDateRangesRight[i][0]) {
+      return zodiacDateRangesRight[i][1];
+    }
+  }
+  return "unknown";
+}
+/**
+ * Rounds the given angle to the nearest multiple of 30.
+ * @param {number} angle - The angle to round.
+ * @returns {number} The rounded angle.
+ */
+function roundAngle(angle) {
+  var base = Math.floor(angle / 360);
+  var rem = angle % 360;
+  if (angle >= 0) {
+    return base * 360 + Math.round(rem / 30) * 30;
+  } else {
+    base = Math.ceil(angle / 360); // Use Math.ceil instead of Math.floor
+    //console.log(base + ';' + rem)
+    return base * 360 + Math.round(rem / 30) * 30;
+  }
+}
+
+/**
+ * Stops the rotation of the wheels and applies a smooth transition to the nearest rounded angle.
+ */
+function stopRotation() {
+  // Round the current angle of the wheels to the nearest multiple of 30
+  const target1 = roundAngle(leftWheelAngle);
+  const target2 = roundAngle(rightWheelAngle);
+
+  // print rounded angles for clarity
+  console.log(
+    `Left Wheel is rounded to ${target1}: ${getMappingLeft(target1)}`
+  );
+  console.log(
+    `Right Wheel is rounded to ${target2}: ${getMappingRight(target2)}`
+  );
+
+  // Apply the rounded rotation transform to the wheel elements smoothly over 500ms
+  const interval = setInterval(() => {
+    if (leftWheelAngle < target1) {
+      leftWheelAngle += 1;
+      leftWheel.style.transform = `rotate(${leftWheelAngle}deg)`;
+    }
+    if (leftWheelAngle > target1) {
+      leftWheelAngle -= 1;
+      leftWheel.style.transform = `rotate(${leftWheelAngle}deg)`;
+    }
+    if (rightWheelAngle < target2) {
+      rightWheelAngle += 1;
+      rightWheel.style.transform = `rotate(${rightWheelAngle}deg)`;
+    }
+    if (rightWheelAngle > target2) {
+      rightWheelAngle -= 1;
+      rightWheel.style.transform = `rotate(${rightWheelAngle}deg)`;
+    }
+    if (leftWheelAngle === target1 && rightWheelAngle === target2) {
+      clearInterval(interval);
+    }
+  }, 15);
+}
+
+/**
+ * Retrieves the zodiac sign mapping for the given angle on the left wheel.
+ * @param {number} angle - The angle on the left wheel.
+ * @returns {string} The corresponding zodiac sign.
+ */
+function getMappingLeft(angle) {
+  angle = angle % 360;
+  for (let i = 0; i < mappingLeft.length; i++) {
+    if (angle == mappingLeft[i][0]) {
+      return mappingLeft[i][1];
+    }
+  }
+  return "unknown";
+}
+
+/**
+ * Retrieves the zodiac sign mapping for the given angle on the right wheel.
+ * @param {number} angle - The angle on the right wheel.
+ * @returns {string} The corresponding zodiac sign.
+ */
+function getMappingRight(angle) {
+  angle = angle % 360;
+  for (let i = 0; i < mappingRight.length; i++) {
+    if (angle == mappingRight[i][0]) {
+      return mappingRight[i][1];
+    }
+  }
+  return "unknown";
+}
+
+/**
+ * Gets the zodiac sign pair based on the angles of the left and right wheels.
+ * @param {number} angleLeft - The angle of the left wheel.
+ * @param {number} angleRight - The angle of the right wheel.
+ * @returns {Array} An array containing the zodiac sign pair.
+ */
+function determinePairing(angleLeft, angleRight) {
+  angleLeft = angleLeft % 360;
+  angleRight = angleRight % 360;
+  const leftMapping = getMappingLeft(angleLeft);
+  const rightMapping = getMappingRight(angleRight);
+  return [leftMapping, rightMapping];
+}
+
+/**
+ * Displays the results of the pairing and animates the UI elements.
+ */
+function displayResults() {
+  const pair = determinePairing(leftWheelAngle, rightWheelAngle);
+  // slide off or fade all of the elements on the page to make room for results popup
+  leftWheel.style.animation = "slideOffLeft 1s forwards";
+  rightWheel.style.animation = "slideOffRight 1s forwards";
+  left_arrow.style.animation = "slideOffLeft 0.1s forwards";
+  right_arrow.style.animation = "slideOffRight 0.1s forwards";
+  left_bday.style.animation = "slideOffLeft 0.4s forwards";
+  right_bday.style.animation = "slideOffRight 0.4s forwards";
+  button.style.animation = "fadeOut 0.5s forwards";
+  button.style.display = "none";
+  how_to.style.animation = "fadeOut 0.5s forwards";
+  how_to.style.display = "none";
+
+  /**
+   * Displays the popup with the pairing information after a delay.
+   */
+  setTimeout(() => {
+    popup.style.display = "block";
+    popup.style.animation = "fadeIn 2s forwards";
+    const pairingHeader = popup.querySelector("#pairing");
+    pairingHeader.textContent = pair[0] + " and " + pair[1];
+    const pairing_text = popup.querySelector("#pairing_text");
+    pairing_text.innerHTML = textGenerator(pair[0], pair[1]);
+  }, 2);
+}
+
+/**
+ * Generates the text describing the romantic compatibility between two zodiac signs.
+ * @param {string} leftSign - The left wheel's zodiac sign.
+ * @param {string} rightSign - The right wheel's zodiac sign.
+ * @returns {string} The generated text.
+ */
+function textGenerator(leftSign, rightSign) {
+  for (let i = 0; i < romantic.length; i++) {
+    console.log(leftSign + " and " + rightSign);
+    if (leftSign + " and " + rightSign === romantic[i][0]) {
+      return romantic[i][1];
+    } else if (rightSign + " and " + leftSign === romantic[i][0]) {
+      return romantic[i][1];
+    }
+  }
+  return "An error has occurred";
+}
+
+
+
+ + + + +
+ +
+ + + + + + + diff --git a/JSDOCs/fonts/OpenSans-Bold-webfont.eot b/JSDOCs/fonts/OpenSans-Bold-webfont.eot new file mode 100644 index 00000000..5d20d916 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Bold-webfont.eot differ diff --git a/JSDOCs/fonts/OpenSans-Bold-webfont.svg b/JSDOCs/fonts/OpenSans-Bold-webfont.svg new file mode 100644 index 00000000..3ed7be4b --- /dev/null +++ b/JSDOCs/fonts/OpenSans-Bold-webfont.svg @@ -0,0 +1,1830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JSDOCs/fonts/OpenSans-Bold-webfont.woff b/JSDOCs/fonts/OpenSans-Bold-webfont.woff new file mode 100644 index 00000000..1205787b Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Bold-webfont.woff differ diff --git a/JSDOCs/fonts/OpenSans-BoldItalic-webfont.eot b/JSDOCs/fonts/OpenSans-BoldItalic-webfont.eot new file mode 100644 index 00000000..1f639a15 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-BoldItalic-webfont.eot differ diff --git a/JSDOCs/fonts/OpenSans-BoldItalic-webfont.svg b/JSDOCs/fonts/OpenSans-BoldItalic-webfont.svg new file mode 100644 index 00000000..6a2607b9 --- /dev/null +++ b/JSDOCs/fonts/OpenSans-BoldItalic-webfont.svg @@ -0,0 +1,1830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JSDOCs/fonts/OpenSans-BoldItalic-webfont.woff b/JSDOCs/fonts/OpenSans-BoldItalic-webfont.woff new file mode 100644 index 00000000..ed760c06 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-BoldItalic-webfont.woff differ diff --git a/JSDOCs/fonts/OpenSans-Italic-webfont.eot b/JSDOCs/fonts/OpenSans-Italic-webfont.eot new file mode 100644 index 00000000..0c8a0ae0 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Italic-webfont.eot differ diff --git a/JSDOCs/fonts/OpenSans-Italic-webfont.svg b/JSDOCs/fonts/OpenSans-Italic-webfont.svg new file mode 100644 index 00000000..e1075dcc --- /dev/null +++ b/JSDOCs/fonts/OpenSans-Italic-webfont.svg @@ -0,0 +1,1830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JSDOCs/fonts/OpenSans-Italic-webfont.woff b/JSDOCs/fonts/OpenSans-Italic-webfont.woff new file mode 100644 index 00000000..ff652e64 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Italic-webfont.woff differ diff --git a/JSDOCs/fonts/OpenSans-Light-webfont.eot b/JSDOCs/fonts/OpenSans-Light-webfont.eot new file mode 100644 index 00000000..14868406 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Light-webfont.eot differ diff --git a/JSDOCs/fonts/OpenSans-Light-webfont.svg b/JSDOCs/fonts/OpenSans-Light-webfont.svg new file mode 100644 index 00000000..11a472ca --- /dev/null +++ b/JSDOCs/fonts/OpenSans-Light-webfont.svg @@ -0,0 +1,1831 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JSDOCs/fonts/OpenSans-Light-webfont.woff b/JSDOCs/fonts/OpenSans-Light-webfont.woff new file mode 100644 index 00000000..e7860748 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Light-webfont.woff differ diff --git a/JSDOCs/fonts/OpenSans-LightItalic-webfont.eot b/JSDOCs/fonts/OpenSans-LightItalic-webfont.eot new file mode 100644 index 00000000..8f445929 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-LightItalic-webfont.eot differ diff --git a/JSDOCs/fonts/OpenSans-LightItalic-webfont.svg b/JSDOCs/fonts/OpenSans-LightItalic-webfont.svg new file mode 100644 index 00000000..431d7e35 --- /dev/null +++ b/JSDOCs/fonts/OpenSans-LightItalic-webfont.svg @@ -0,0 +1,1835 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JSDOCs/fonts/OpenSans-LightItalic-webfont.woff b/JSDOCs/fonts/OpenSans-LightItalic-webfont.woff new file mode 100644 index 00000000..43e8b9e6 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-LightItalic-webfont.woff differ diff --git a/JSDOCs/fonts/OpenSans-Regular-webfont.eot b/JSDOCs/fonts/OpenSans-Regular-webfont.eot new file mode 100644 index 00000000..6bbc3cf5 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Regular-webfont.eot differ diff --git a/JSDOCs/fonts/OpenSans-Regular-webfont.svg b/JSDOCs/fonts/OpenSans-Regular-webfont.svg new file mode 100644 index 00000000..25a39523 --- /dev/null +++ b/JSDOCs/fonts/OpenSans-Regular-webfont.svg @@ -0,0 +1,1831 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JSDOCs/fonts/OpenSans-Regular-webfont.woff b/JSDOCs/fonts/OpenSans-Regular-webfont.woff new file mode 100644 index 00000000..e231183d Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Regular-webfont.woff differ diff --git a/JSDOCs/fonts/OpenSans-Semibold-webfont.eot b/JSDOCs/fonts/OpenSans-Semibold-webfont.eot new file mode 100755 index 00000000..d8375dd0 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Semibold-webfont.eot differ diff --git a/JSDOCs/fonts/OpenSans-Semibold-webfont.svg b/JSDOCs/fonts/OpenSans-Semibold-webfont.svg new file mode 100755 index 00000000..eec4db8b --- /dev/null +++ b/JSDOCs/fonts/OpenSans-Semibold-webfont.svg @@ -0,0 +1,1830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JSDOCs/fonts/OpenSans-Semibold-webfont.ttf b/JSDOCs/fonts/OpenSans-Semibold-webfont.ttf new file mode 100755 index 00000000..b3290843 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Semibold-webfont.ttf differ diff --git a/JSDOCs/fonts/OpenSans-Semibold-webfont.woff b/JSDOCs/fonts/OpenSans-Semibold-webfont.woff new file mode 100755 index 00000000..28d6adee Binary files /dev/null and b/JSDOCs/fonts/OpenSans-Semibold-webfont.woff differ diff --git a/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.eot b/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.eot new file mode 100755 index 00000000..0ab1db22 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.eot differ diff --git a/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.svg b/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.svg new file mode 100755 index 00000000..7166ec1b --- /dev/null +++ b/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.svg @@ -0,0 +1,1830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.ttf b/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.ttf new file mode 100755 index 00000000..d2d6318f Binary files /dev/null and b/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.ttf differ diff --git a/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.woff b/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.woff new file mode 100755 index 00000000..d4dfca40 Binary files /dev/null and b/JSDOCs/fonts/OpenSans-SemiboldItalic-webfont.woff differ diff --git a/JSDOCs/fortuneCookie.js.html b/JSDOCs/fortuneCookie.js.html new file mode 100644 index 00000000..dbe59f7c --- /dev/null +++ b/JSDOCs/fortuneCookie.js.html @@ -0,0 +1,304 @@ + + + + + + fortuneCookie.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

fortuneCookie.js

+ + + + + + + +
+
+
/**
+ * Array of general, college, and collage-romance type fortunes
+ */
+const fortunes = [
+  "Your future is bright, embrace it with open arms.",
+  "A wonderful surprise is coming your way.",
+  "Believe in yourself and you will achieve great things.",
+  "Your kindness will lead to good fortune.",
+  "The journey may be difficult, but the destination is worth it.",
+  "Your talents will soon be recognized and rewarded.",
+  "Don't be afraid to take a chance, it may lead to great things.",
+  "Your hard work and perseverance will pay off in the end.",
+  "Keep an open mind and you will find new opportunities.",
+  "Your positivity and optimism will bring you success.",
+  "You will soon experience a life-changing event.",
+  "Your creativity and imagination will bring you great success.",
+  "The best things in life are yet to come.",
+  "You will soon receive unexpected blessings.",
+  "A new friendship will bring you great happiness.",
+  "Your future is full of endless possibilities.",
+  "Good things come to those who work hard and never give up.",
+  "Let go of the past and embrace a bright future.",
+  "Your perseverance will lead to victory.",
+  "Your ability to adapt to change will bring you great success.",
+  "Your determination and hard work will pay off in the long run.",
+  "The journey may be tough, but the reward will be worth it.",
+  "Trust in your intuition and you will make the right decisions.",
+  "A new opportunity is on the horizon, seize it.",
+  "Your courage and confidence will bring you great success.",
+  "Your future is filled with abundance and prosperity.",
+  "Your greatest treasure is the love and support of those around you.",
+  "Your creativity will bring you great success in all areas of life.",
+  "Embrace change and you will find success and happiness.",
+  "Your positive attitude will bring you good luck and fortune.",
+  "Embrace the challenges that college brings, for they are the stepping stones to your future success.", // College
+  "Your college journey is like a blank canvas. Paint it with knowledge, experiences, and friendships that will last a lifetime.",
+  "In the halls of higher education, discover your true passions and let them guide you towards a fulfilling career.",
+  "Success in college is not just about grades; it's about the wisdom gained from both victories and failures.",
+  "The key to acing exams is not just studying hard but also finding the right balance between work and play.",
+  "Embrace diversity in college, for it is through understanding others that you will broaden your own horizons.",
+  "In college, you are the author of your own story. Make every chapter count and create a narrative that inspires others.",
+  "Don't be afraid to step out of your comfort zone in college. Growth happens when you challenge yourself.",
+  "Believe in your abilities, trust the process, and remember that you are capable of achieving great things in college and beyond.",
+  "Every setback in college is an opportunity for growth. Keep pushing forward, and you will emerge stronger than ever.",
+  "Success is not a destination but a journey. Enjoy the ride, make meaningful connections, and cherish every moment of your college years.",
+  "Remember, the true value of education lies not just in the knowledge gained but in the person you become.",
+  "Make the most of every networking opportunity in college. You never know where a connection can lead you.",
+  "In the face of challenges, remember that perseverance and resilience are the keys to unlocking your full potential.",
+  "College is the perfect time to explore your passions. Don't be afraid to pursue what truly sets your soul on fire.",
+  "Stay curious, stay hungry for knowledge. College is your chance to quench your thirst for learning.",
+  "Celebrate your achievements in college, big and small. They are the milestones that mark your personal growth.",
+  "Don't compare your college journey to others'. Stay focused on your own goals and pave your unique path to success.",
+  "Seek guidance when you need it, for mentors can offer invaluable wisdom that will shape your college experience.",
+  "Trust yourself and your abilities. You have the power to turn your college dreams into a reality.",
+  "Opportunities are like puzzle pieces; in college, you'll find the right ones to shape your future.",
+  "The friendships you forge in college will be your lifelong treasures. Nurture them with care.",
+  "In the realm of higher education, passion and dedication are the keys that unlock doors to boundless possibilities.",
+  "Embrace the unknown in college, for it is in the unfamiliar that you'll discover your true potential.",
+  "Remember, failure is not the end but a stepping stone on the path to greatness. Learn from it, rise above it.",
+  "In the realm of college, seize every chance to expand your horizons, for knowledge knows no bounds.",
+  "Your college experience is a mosaic of moments. Collect each one with gratitude and make a masterpiece.",
+  "The pursuit of education is a marathon, not a sprint. Pace yourself, stay determined, and finish strong.",
+  "In college, each class is a brushstroke, and your mind is the canvas. Paint a masterpiece of knowledge.",
+  "The walls of a college campus hold countless stories. Leave your own mark and become a part of its legacy.",
+  "Be fearless in pursuing your dreams in college. The world needs your unique talents and perspectives.",
+  "Remember, in college, failure is not falling down; it's staying down. Rise each time with renewed determination.",
+  "In college, challenges may test your limits, but they also reveal the strength and resilience within you.",
+  "Every lecture is an opportunity to expand your mind. Pay attention, ask questions, and embrace the power of knowledge.",
+  "Success in college is not solely measured by grades but by the growth and transformation you undergo along the way.",
+  "Take time to nourish your mind, body, and soul in college. Self-care is essential for a balanced and fulfilling journey.",
+  "As you navigate the college maze, trust your instincts and follow the path that aligns with your passions.",
+  "In college, make connections that transcend the classroom. Forge bonds that will support and inspire you throughout your life.",
+  "Every setback in college is an opportunity to learn, adapt, and come back stronger. Keep pushing forward!",
+  "Remember, in college, you have the power to shape your own narrative. Write a story that reflects your true potential.",
+  "Embrace diversity in college, for it enriches your understanding of the world and fosters compassion and empathy.",
+  "As you climb the mountain of knowledge in college, enjoy the breathtaking view of the discoveries you make along the way.",
+  "Celebrate the small victories in college. Each step forward, no matter how small, brings you closer to your goals.",
+  "In college, seek mentors who inspire and challenge you. Their guidance can ignite the spark that propels you towards greatness.",
+  "Let curiosity be your guiding light in college. Embrace the joy of learning and explore new realms of knowledge.",
+  "College is a time of self-discovery. Embrace the journey of finding who you truly are and embrace your authentic self.",
+  "Remember, in college, success is not a destination; it's a mindset. Embrace a growth mindset and watch your potential soar.",
+  "In college, each essay is an opportunity to articulate your thoughts and ideas. Let your voice shine and make an impact.",
+  "Dare to dream big in college. Your aspirations have the power to shape the world and leave a lasting legacy.",
+  "As you embark on your college adventure, remember that every day is a chance to grow, learn, and redefine what's possible.",
+  "Love may find you in the most unexpected places, even in the lecture hall or library. Keep your heart open.", // Romance
+  "In the realm of college, sparks of attraction can ignite friendships that blossom into beautiful love stories.",
+  "A study partner today may become a soulmate tomorrow. Let academic connections pave the way for lasting romance.",
+  "Love is like a research project, requiring patience, dedication, and the willingness to explore new depths.",
+  "In college, love knows no boundaries. Embrace the diversity of connections and let your heart guide you.",
+  "A campus stroll hand-in-hand can lead to memories that will warm your heart long after graduation.",
+  "Don't be afraid to let love distract you momentarily. Sometimes the best lessons are learned in the embrace of another.",
+  "The late-night conversations shared with someone special can deepen your connection and create unforgettable bonds.",
+  "In the whirlwind of college, love can be a guiding light, reminding you of the importance of both emotional and intellectual connections.",
+  "Just as knowledge grows, so can love. Nurture it with care, and watch it blossom into something extraordinary.",
+  "Remember, relationships in college are a delicate dance. Communicate, compromise, and cherish the magic of love.",
+  "The chemistry you share with someone special can be more electrifying than any scientific experiment.",
+  "In the realm of college romance, take risks, be vulnerable, and discover the magic of love's transformative power.",
+  "As you explore your passions in college, you may find that love is the most captivating subject of all.",
+  "Cherish the stolen moments with your college sweetheart, for they will become precious memories that last a lifetime.",
+  "Love is the ultimate inspiration. Let the love you find in college ignite your creativity and fuel your dreams.",
+  "In the sea of possibilities, love can be the anchor that grounds you and gives your college journey meaning.",
+  "True love sees no boundaries. Embrace cultural diversity in college and let love bridge the gaps.",
+  "The late-night study sessions can turn into whispers of love, as the line between friendship and romance blurs.",
+  "In college, love may be a detour from your original plans, but it can lead to a destination more beautiful than you ever imagined.",
+  "The right person can be your biggest cheerleader in college, supporting you in both your academic and personal pursuits.",
+  "Love is a dance, and college is the perfect stage to find a partner who moves to the rhythm of your heart.",
+  "A love letter written on a textbook page can hold more magic than any words penned in a fairy tale.",
+  "In college, love can be a refuge in the storm. Find solace in the arms of someone who understands your journey.",
+  "A smile from someone special can brighten even the gloomiest of college days. Let love be your sunshine.",
+  "Love has a way of finding you when you least expect it. Stay open-hearted, and let destiny work its magic.",
+  "In the journey of love, don't be afraid to rewrite the script. Create a love story in college that is uniquely yours.",
+  "The echoes of laughter shared with a loved one in college will reverberate in your heart for a lifetime.",
+  "Love can be a sanctuary in the whirlwind of college life. Find comfort and strength in the arms of your beloved.",
+  "In the hustle and bustle of college, love can be a calming melody that brings peace to your soul.",
+  "The path to love in college may not always be smooth, but with patience and understanding, it can lead to a love story for the ages.",
+  "The campus may be vast, but love has a way of bringing two hearts together, no matter the distance.",
+  "In college, love is an adventure waiting to unfold. Embrace the journey and let your heart guide you to incredible destinations.",
+  "The love you find in college can shape not only your present but also your future. Choose your love wisely, for it can inspire you to greatness.",
+];
+
+let previousFortune = "";
+const fortuneButton = document.getElementById("fortune-button");
+const fortuneText = document.getElementById("fortune-text");
+const fortuneAudioCrack = document.getElementById("fortune-crack");
+const voiceToggle = document.getElementById("voice-toggle-checkbox");
+
+/**
+ * This function will get a random fortune from the fortune array and make sure it does not match the previous one
+ * @returns {string} a random fortune
+ */
+function getRandomFortune() {
+  let randomIndex = Math.floor(Math.random() * fortunes.length);
+  let fortune = fortunes[randomIndex];
+
+  // Generate a new random fortune if it matches the previous fortune
+  while (fortune === previousFortune) {
+    randomIndex = Math.floor(Math.random() * fortunes.length);
+    fortune = fortunes[randomIndex];
+  }
+
+  previousFortune = fortune;
+  return fortune;
+}
+
+/**
+ * Displays the fortune and if voice toggle is checked, reads out the fortune
+ */
+function showFortune() {
+  const fortune = getRandomFortune();
+  fortuneText.textContent = fortune;
+  fortuneText.style.display = "block";
+  if (voiceToggle.checked) {
+    speakFortune(fortune);
+  } else {
+    setTimeout(enableButton, 1000);
+  }
+}
+
+/**
+ * Reads out the fortune using speech synthesis
+ * @param {string} fortune What the fortune to be read out is
+ */
+function speakFortune(fortune) {
+  const speech = new SpeechSynthesisUtterance(fortune);
+  const option = voiceSelect.selectedOptions[0].getAttribute("data-name");
+  for (let i = 0; i < voices.length; i++) {
+    if (voices[i].name == option) speech.voice = voices[i];
+  }
+  speech.lang = "en-US";
+  speech.rate = 0.8;
+  speech.pitch = 1.2;
+  window.speechSynthesis.speak(speech);
+
+  // Reenable button when fortune is done being read
+  speech.addEventListener("end", () => {
+    enableButton();
+  });
+}
+
+/**
+ * Disables button so user cannot click it
+ */
+function disableButton() {
+  fortuneButton.disabled = true;
+  fortuneButton.style.opacity = "0.5";
+}
+
+/**
+ * Enables button so user can click it
+ */
+function enableButton() {
+  fortuneButton.disabled = false;
+  fortuneButton.style.opacity = "1";
+}
+
+/**
+ * When the user clicks the button, disables it so they cannot click the button
+ * in quick succession and cause audio issues
+ */
+fortuneButton.addEventListener("click", function () {
+  fortuneAudioCrack.play();
+  disableButton();
+  setTimeout(showFortune, 1000);
+});
+
+/**
+ * Added options for different voices using voice synthesis
+ */
+const synth = window.speechSynthesis;
+
+// const inputForm = document.querySelector("form");
+// const inputTxt = document.querySelector(".txt");
+const voiceSelect = document.querySelector("select");
+// const pitch = document.querySelector("#pitch");
+// const pitchValue = document.querySelector(".pitch-value");
+// const rate = document.querySelector("#rate");
+// const rateValue = document.querySelector(".rate-value");
+
+let voices = [];
+
+/**
+ * Speech synthesis API
+ */
+function populateVoiceList() {
+  voices = synth.getVoices();
+
+  for (let i = 0; i < voices.length; i++) {
+    const option = document.createElement("option");
+    option.textContent = `${voices[i].name} (${voices[i].lang})`;
+
+    if (voices[i].default) {
+      option.textContent += " — DEFAULT";
+    }
+
+    option.setAttribute("data-lang", voices[i].lang);
+    option.setAttribute("data-name", voices[i].name);
+    voiceSelect.appendChild(option);
+  }
+}
+
+populateVoiceList();
+if (speechSynthesis.onvoiceschanged !== undefined) {
+  speechSynthesis.onvoiceschanged = populateVoiceList;
+}
+
+
+
+ + + + +
+ +
+ + + + + + + diff --git a/JSDOCs/global.html b/JSDOCs/global.html new file mode 100644 index 00000000..6cff207d --- /dev/null +++ b/JSDOCs/global.html @@ -0,0 +1,2825 @@ + + + + + + Global - Documentation + + + + + + + + + + + + + + + + + +
+ +

Global

+ + + + + + + +
+ +
+ +

+ +

+ + +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + +

Members

+ + + +
+

(constant) fortunes

+ + + + +
+ Array of general, college, and collage-romance type fortunes +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +
+ + + +
+

lastInstructionElem :HTMLParagraphElement|null

+ + + + +
+ The currently displayed `.instructions` element. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
Type:
+
    +
  • + +HTMLParagraphElement +| + +null + + +
  • +
+ + + + + +
+ + + +
+

(constant) synth

+ + + + +
+ Added options for different voices using voice synthesis +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +
+ + + +
+

(constant) video :HTMLVideoElement

+ + + + +
+ The `
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
Type:
+
    +
  • + +HTMLVideoElement + + +
  • +
+ + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

determineDateRangeLeft(angle) → {string}

+ + + + + +
+ Determines the zodiac sign date range based on the given angle on the left wheel. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
angle + + +number + + + + + The angle of the left wheel. + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+ The zodiac sign associated with the angle. +
+ + +
+ + + +
+ + +
+ + + +

determineDateRangeRight(angle) → {string}

+ + + + + +
+ Determines the zodiac sign date range based on the given angle on the right wheel. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
angle + + +number + + + + + The angle of the right wheel. + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+ The zodiac sign associated with the angle. +
+ + +
+ + + +
+ + +
+ + + +

determinePairing(angleLeft, angleRight) → {Array}

+ + + + + +
+ Gets the zodiac sign pair based on the angles of the left and right wheels. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
angleLeft + + +number + + + + + The angle of the left wheel. + +
angleRight + + +number + + + + + The angle of the right wheel. + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array + + +
+
+ + +
+ An array containing the zodiac sign pair. +
+ + +
+ + + +
+ + +
+ + + +

disableButton()

+ + + + + +
+ Disables button so user cannot click it +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

displayResults()

+ + + + + +
+ Displays the results of the pairing and animates the UI elements. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

enableButton()

+ + + + + +
+ Enables button so user can click it +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

getMappingLeft(angle) → {string}

+ + + + + +
+ Retrieves the zodiac sign mapping for the given angle on the left wheel. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
angle + + +number + + + + + The angle on the left wheel. + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+ The corresponding zodiac sign. +
+ + +
+ + + +
+ + +
+ + + +

getMappingRight(angle) → {string}

+ + + + + +
+ Retrieves the zodiac sign mapping for the given angle on the right wheel. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
angle + + +number + + + + + The angle on the right wheel. + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+ The corresponding zodiac sign. +
+ + +
+ + + +
+ + +
+ + + +

getRandomFortune() → {string}

+ + + + + +
+ This function will get a random fortune from the fortune array and make sure it does not match the previous one +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+ a random fortune +
+ + +
+ + + +
+ + +
+ + + +

handleFortune()

+ + + + + +
+ Generates random fortunes. Called when the app finishes analyzing the palm. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

populateVoiceList()

+ + + + + +
+ Speech synthesis API +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

rotateleftWheel(event)

+ + + + + +
+ Rotates the left wheel based on the mouse wheel event. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
event + + +WheelEvent + + + + + The mouse wheel event. + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

rotaterightWheel(event)

+ + + + + +
+ Rotates the right wheel based on the mouse wheel event. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
event + + +WheelEvent + + + + + The mouse wheel event. + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

roundAngle(angle) → {number}

+ + + + + +
+ Rounds the given angle to the nearest multiple of 30. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
angle + + +number + + + + + The angle to round. + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +number + + +
+
+ + +
+ The rounded angle. +
+ + +
+ + + +
+ + +
+ + + +

setInstructions(instruction)

+ + + + + +
+ Sets the message that appears under the webcam while it is analyzing the +palm. There will be a fade transition between the previous and new +instruction message. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
instruction + + +string + + + + + The message to display. If an empty string, +it'll hide the instructions. + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

showFortune()

+ + + + + +
+ Displays the fortune and if voice toggle is checked, reads out the fortune +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

speakFortune(fortune)

+ + + + + +
+ Reads out the fortune using speech synthesis +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
fortune + + +string + + + + + What the fortune to be read out is + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

stopRotation()

+ + + + + +
+ Stops the rotation of the wheels and applies a smooth transition to the nearest rounded angle. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

textGenerator(leftSign, rightSign) → {string}

+ + + + + +
+ Generates the text describing the romantic compatibility between two zodiac signs. +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
leftSign + + +string + + + + + The left wheel's zodiac sign. + +
rightSign + + +string + + + + + The right wheel's zodiac sign. + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+ The generated text. +
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + \ No newline at end of file diff --git a/JSDOCs/index.html b/JSDOCs/index.html new file mode 100644 index 00000000..e761a08d --- /dev/null +++ b/JSDOCs/index.html @@ -0,0 +1,66 @@ + + + + + + Home - Documentation + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + \ No newline at end of file diff --git a/JSDOCs/palmReading.js.html b/JSDOCs/palmReading.js.html new file mode 100644 index 00000000..76478b84 --- /dev/null +++ b/JSDOCs/palmReading.js.html @@ -0,0 +1,69 @@ + + + + + + palmReading.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

palmReading.js

+ + + + + + + +
+
+
const fortune = document.getElementById("fortune-paragraph");
+// etc
+
+/**
+ * Generates random fortunes. Called when the app finishes analyzing the palm.
+ */
+export function handleFortune() {
+  console.log("TODO", fortune);
+}
+
+
+
+ + + + +
+ +
+ + + + + + + diff --git a/JSDOCs/scripts/linenumber.js b/JSDOCs/scripts/linenumber.js new file mode 100644 index 00000000..8d52f7ea --- /dev/null +++ b/JSDOCs/scripts/linenumber.js @@ -0,0 +1,25 @@ +/*global document */ +(function() { + var source = document.getElementsByClassName('prettyprint source linenums'); + var i = 0; + var lineNumber = 0; + var lineId; + var lines; + var totalLines; + var anchorHash; + + if (source && source[0]) { + anchorHash = document.location.hash.substring(1); + lines = source[0].getElementsByTagName('li'); + totalLines = lines.length; + + for (; i < totalLines; i++) { + lineNumber++; + lineId = 'line' + lineNumber; + lines[i].id = lineId; + if (lineId === anchorHash) { + lines[i].className += ' selected'; + } + } + } +})(); diff --git a/JSDOCs/scripts/prettify/Apache-License-2.0.txt b/JSDOCs/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/JSDOCs/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/JSDOCs/scripts/prettify/lang-css.js b/JSDOCs/scripts/prettify/lang-css.js new file mode 100644 index 00000000..041e1f59 --- /dev/null +++ b/JSDOCs/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/JSDOCs/scripts/prettify/prettify.js b/JSDOCs/scripts/prettify/prettify.js new file mode 100644 index 00000000..eef5ad7e --- /dev/null +++ b/JSDOCs/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p code { + font-size: 0.85em; +} + +.readme table { + margin-bottom: 1em; + border-collapse: collapse; + border-spacing: 0; +} + +.readme table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +.readme table th, +.readme table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +.readme table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +/** Nav **/ +nav { + float: left; + display: block; + width: 250px; + background: #fff; + overflow: auto; + position: fixed; + height: 100%; + padding: 10px; + border-right: 1px solid #eee; + /* box-shadow: 0 0 3px rgba(0,0,0,0.1); */ +} + +nav li { + list-style: none; + padding: 0; + margin: 0; +} + +.nav-heading { + margin-top: 10px; + font-weight: bold; +} + +.nav-heading a { + color: #888; + font-size: 14px; + display: inline-block; +} + +.nav-item-type { + /* margin-left: 5px; */ + width: 18px; + height: 18px; + display: inline-block; + text-align: center; + border-radius: 0.2em; + margin-right: 5px; + font-weight: bold; + line-height: 20px; + font-size: 13px; +} + +.type-function { + background: #B3E5FC; + color: #0288D1; +} + +.type-class { + background: #D1C4E9; + color: #4527A0; +} + +.type-member { + background: #C8E6C9; + color: #388E3C; +} + +.type-module { + background: #E1BEE7; + color: #7B1FA2; +} + + +/** Footer **/ +footer { + color: hsl(0, 0%, 28%); + margin-left: 250px; + display: block; + padding: 30px; + font-style: italic; + font-size: 90%; + border-top: 1px solid #eee; +} + +.ancestors { + color: #999 +} + +.ancestors a { + color: #999 !important; + text-decoration: none; +} + +.clear { + clear: both +} + +.important { + font-weight: bold; + color: #950B02; +} + +.yes-def { + text-indent: -1000px +} + +.type-signature { + color: #aaa +} + +.name, .signature { + font-family: Consolas, Monaco, 'Andale Mono', monospace +} + +.details { + margin-top: 14px; + border-left: 2px solid #DDD; + line-height: 30px; +} + +.details dt { + width: 120px; + float: left; + padding-left: 10px; +} + +.details dd { + margin-left: 70px +} + +.details ul { + margin: 0 +} + +.details ul { + list-style-type: none +} + +.details li { + margin-left: 30px +} + +.details pre.prettyprint { + margin: 0 +} + +.details .object-value { + padding-top: 0 +} + +.description { + margin-bottom: 1em; + margin-top: 1em; +} + +.code-caption { + font-style: italic; + font-size: 107%; + margin: 0; +} + +.prettyprint { + font-size: 13px; + border: 1px solid #ddd; + border-radius: 3px; + box-shadow: 0 1px 3px hsla(0, 0%, 0%, 0.05); + overflow: auto; +} + +.prettyprint.source { + width: inherit +} + +.prettyprint code { + font-size: 12px; + line-height: 18px; + display: block; + background-color: #fff; + color: #4D4E53; +} + +.prettyprint code:empty:before { + content: ''; +} + +.prettyprint > code { + padding: 15px +} + +.prettyprint .linenums code { + padding: 0 15px +} + +.prettyprint .linenums li:first-of-type code { + padding-top: 15px +} + +.prettyprint code span.line { + display: inline-block +} + +.prettyprint.linenums { + padding-left: 70px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.prettyprint.linenums ol { + padding-left: 0 +} + +.prettyprint.linenums li { + border-left: 3px #ddd solid +} + +.prettyprint.linenums li.selected, .prettyprint.linenums li.selected * { + background-color: lightyellow +} + +.prettyprint.linenums li * { + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; +} + +.params, .props { + border-spacing: 0; + border: 1px solid #ddd; + border-collapse: collapse; + border-radius: 3px; + box-shadow: 0 1px 3px rgba(0,0,0,0.1); + width: 100%; + font-size: 14px; + /* margin-left: 15px; */ +} + +.params .name, .props .name, .name code { + color: #4D4E53; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 100%; +} + +.params td, .params th, .props td, .props th { + margin: 0px; + text-align: left; + vertical-align: top; + padding: 10px; + display: table-cell; +} + +.params td { + border-top: 1px solid #eee +} + +.params thead tr, .props thead tr { + background-color: #fff; + font-weight: bold; +} + +.params .params thead tr, .props .props thead tr { + background-color: #fff; + font-weight: bold; +} + +.params td.description > p:first-child, .props td.description > p:first-child { + margin-top: 0; + padding-top: 0; +} + +.params td.description > p:last-child, .props td.description > p:last-child { + margin-bottom: 0; + padding-bottom: 0; +} + +dl.param-type { + /* border-bottom: 1px solid hsl(0, 0%, 87%); */ + margin: 0; + padding: 0; + font-size: 16px; +} + +.param-type dt, .param-type dd { + display: inline-block +} + +.param-type dd { + font-family: Consolas, Monaco, 'Andale Mono', monospace; + display: inline-block; + padding: 0; + margin: 0; + font-size: 14px; +} + +.disabled { + color: #454545 +} + +/* navicon button */ +.navicon-button { + display: none; + position: relative; + padding: 2.0625rem 1.5rem; + transition: 0.25s; + cursor: pointer; + user-select: none; + opacity: .8; +} +.navicon-button .navicon:before, .navicon-button .navicon:after { + transition: 0.25s; +} +.navicon-button:hover { + transition: 0.5s; + opacity: 1; +} +.navicon-button:hover .navicon:before, .navicon-button:hover .navicon:after { + transition: 0.25s; +} +.navicon-button:hover .navicon:before { + top: .825rem; +} +.navicon-button:hover .navicon:after { + top: -.825rem; +} + +/* navicon */ +.navicon { + position: relative; + width: 2.5em; + height: .3125rem; + background: #000; + transition: 0.3s; + border-radius: 2.5rem; +} +.navicon:before, .navicon:after { + display: block; + content: ""; + height: .3125rem; + width: 2.5rem; + background: #000; + position: absolute; + z-index: -1; + transition: 0.3s 0.25s; + border-radius: 1rem; +} +.navicon:before { + top: .625rem; +} +.navicon:after { + top: -.625rem; +} + +/* open */ +.nav-trigger:checked + label:not(.steps) .navicon:before, +.nav-trigger:checked + label:not(.steps) .navicon:after { + top: 0 !important; +} + +.nav-trigger:checked + label .navicon:before, +.nav-trigger:checked + label .navicon:after { + transition: 0.5s; +} + +/* Minus */ +.nav-trigger:checked + label { + transform: scale(0.75); +} + +/* × and + */ +.nav-trigger:checked + label.plus .navicon, +.nav-trigger:checked + label.x .navicon { + background: transparent; +} + +.nav-trigger:checked + label.plus .navicon:before, +.nav-trigger:checked + label.x .navicon:before { + transform: rotate(-45deg); + background: #FFF; +} + +.nav-trigger:checked + label.plus .navicon:after, +.nav-trigger:checked + label.x .navicon:after { + transform: rotate(45deg); + background: #FFF; +} + +.nav-trigger:checked + label.plus { + transform: scale(0.75) rotate(45deg); +} + +.nav-trigger:checked ~ nav { + left: 0 !important; +} + +.nav-trigger:checked ~ .overlay { + display: block; +} + +.nav-trigger { + position: fixed; + top: 0; + clip: rect(0, 0, 0, 0); +} + +.overlay { + display: none; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + width: 100%; + height: 100%; + background: hsla(0, 0%, 0%, 0.5); + z-index: 1; +} + +.section-method { + margin-bottom: 30px; + padding-bottom: 30px; + border-bottom: 1px solid #eee; +} + +@media only screen and (min-width: 320px) and (max-width: 680px) { + body { + overflow-x: hidden; + } + + nav { + background: #FFF; + width: 250px; + height: 100%; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: -250px; + z-index: 3; + padding: 0 10px; + transition: left 0.2s; + } + + .navicon-button { + display: inline-block; + position: fixed; + top: 1.5em; + right: 0; + z-index: 2; + } + + #main { + width: 100%; + min-width: 360px; + } + + #main h1.page-title { + margin: 1em 0; + } + + #main section { + padding: 0; + } + + footer { + margin-left: 0; + } +} + +@media only print { + nav { + display: none; + } + + #main { + float: none; + width: 100%; + } +} diff --git a/JSDOCs/styles/prettify-jsdoc.css b/JSDOCs/styles/prettify-jsdoc.css new file mode 100644 index 00000000..834a866d --- /dev/null +++ b/JSDOCs/styles/prettify-jsdoc.css @@ -0,0 +1,111 @@ +/* JSDoc prettify.js theme */ + +/* plain text */ +.pln { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* string content */ +.str { + color: hsl(104, 100%, 24%); + font-weight: normal; + font-style: normal; +} + +/* a keyword */ +.kwd { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a comment */ +.com { + font-weight: normal; + font-style: italic; +} + +/* a type name */ +.typ { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a literal value */ +.lit { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* punctuation */ +.pun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp open bracket */ +.opn { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp close bracket */ +.clo { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a markup tag name */ +.tag { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute name */ +.atn { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute value */ +.atv { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a declaration */ +.dec { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a variable name */ +.var { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a function name */ +.fun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} diff --git a/JSDOCs/styles/prettify-tomorrow.css b/JSDOCs/styles/prettify-tomorrow.css new file mode 100644 index 00000000..81e74d13 --- /dev/null +++ b/JSDOCs/styles/prettify-tomorrow.css @@ -0,0 +1,132 @@ +/* Tomorrow Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +/* plain text */ +.pln { + color: #4d4d4c; } + +@media screen { + /* string content */ + .str { + color: hsl(104, 100%, 24%); } + + /* a keyword */ + .kwd { + color: hsl(240, 100%, 50%); } + + /* a comment */ + .com { + color: hsl(0, 0%, 60%); } + + /* a type name */ + .typ { + color: hsl(240, 100%, 32%); } + + /* a literal value */ + .lit { + color: hsl(240, 100%, 40%); } + + /* punctuation */ + .pun { + color: #000000; } + + /* lisp open bracket */ + .opn { + color: #000000; } + + /* lisp close bracket */ + .clo { + color: #000000; } + + /* a markup tag name */ + .tag { + color: #c82829; } + + /* a markup attribute name */ + .atn { + color: #f5871f; } + + /* a markup attribute value */ + .atv { + color: #3e999f; } + + /* a declaration */ + .dec { + color: #f5871f; } + + /* a variable name */ + .var { + color: #c82829; } + + /* a function name */ + .fun { + color: #4271ae; } } +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; } + + .kwd { + color: #006; + font-weight: bold; } + + .com { + color: #600; + font-style: italic; } + + .typ { + color: #404; + font-weight: bold; } + + .lit { + color: #044; } + + .pun, .opn, .clo { + color: #440; } + + .tag { + color: #006; + font-weight: bold; } + + .atn { + color: #404; } + + .atv { + color: #060; } } +/* Style */ +/* +pre.prettyprint { + background: white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 12px; + line-height: 1.5; + border: 1px solid #ccc; + padding: 10px; } +*/ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; } + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ } + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ } diff --git a/JSDOCs/webcam.js.html b/JSDOCs/webcam.js.html new file mode 100644 index 00000000..2dd603e5 --- /dev/null +++ b/JSDOCs/webcam.js.html @@ -0,0 +1,245 @@ + + + + + + webcam.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

webcam.js

+ + + + + + + +
+
+
import { handleFortune } from "./script.js";
+
+const webcamWrapper = document.getElementById("webcam-wrapper");
+/**
+ * The currently displayed `.instructions` element.
+ * @type {HTMLParagraphElement | null}
+ */
+let lastInstructionElem = null;
+/**
+ * Sets the message that appears under the webcam while it is analyzing the
+ * palm. There will be a fade transition between the previous and new
+ * instruction message.
+ *
+ * @param {string} instruction - The message to display. If an empty string,
+ * it'll hide the instructions.
+ */
+function setInstructions(instruction) {
+  if (lastInstructionElem) {
+    lastInstructionElem.addEventListener("animationend", (e) => {
+      e.currentTarget.remove();
+    });
+    lastInstructionElem.classList.remove("instructions-active");
+  }
+  if (instruction) {
+    lastInstructionElem = Object.assign(document.createElement("p"), {
+      textContent: instruction,
+      className: "instructions instructions-active",
+    });
+    webcamWrapper.append(lastInstructionElem);
+  } else {
+    lastInstructionElem = null;
+  }
+}
+
+/**
+ * The `<video>` element that previews whatever is on the webcam.
+ * @type {HTMLVideoElement}
+ */
+const video = document.getElementById("webcam-video");
+const requestBtn = document.getElementById("request-webcam");
+const ecgGraph = document.getElementById("ecg");
+const result = document.getElementById("result-palm");
+const context = result.getContext("2d");
+const readAnother = document.getElementById("read-another-hand");
+let flipCamera = true;
+async function startCamera() {
+  document.body.classList.remove("show-results");
+  requestBtn.parentNode.style.display = "none";
+  readAnother.style.display = "none";
+  flipCamera = true;
+  video.classList.add("flip");
+  try {
+    const stream = await navigator.mediaDevices.getUserMedia({ video: true });
+    video.srcObject = stream;
+    const track = stream.getTracks()[0];
+    // Firefox does not support getCapabilities
+    if ("getCapabilities" in track) {
+      const { facingMode } = track.getCapabilities();
+      if (facingMode.includes("environment")) {
+        video.classList.remove("flip");
+        flipCamera = false;
+      }
+    }
+  } catch (error) {
+    requestBtn.parentNode.style.display = null;
+  }
+}
+requestBtn.addEventListener("click", startCamera);
+video.addEventListener("loadedmetadata", () => {
+  video.play();
+  video.classList.add("video-on");
+  ecgGraph.classList.add("ecg-active");
+  ecgHistory.splice(0, ecgHistory.length);
+
+  setTimeout(() => {
+    setInstructions("Please hold your hand over your camera.");
+  }, 500);
+  setTimeout(() => {
+    frameId = 0;
+    paintEcg();
+    setInstructions("Heartbeat detected.");
+  }, 3000);
+  setTimeout(() => {
+    paintEcg();
+    setInstructions("Keep your hand steady.");
+  }, 6000);
+  setTimeout(() => {
+    video.pause();
+    const size = Math.min(video.videoWidth, video.videoHeight);
+    result.width = size;
+    result.height = size;
+    if (flipCamera) {
+      context.translate(size, 0);
+      context.scale(-1, 1);
+    }
+    if (video.videoWidth > video.videoHeight) {
+      context.drawImage(video, -(video.videoWidth - video.videoHeight) / 2, 0);
+    } else {
+      context.drawImage(video, 0, -(video.videoHeight - video.videoWidth) / 2);
+    }
+    video.srcObject.getTracks()[0].stop();
+    window.cancelAnimationFrame(frameId);
+    frameId = null;
+    video.classList.remove("video-on");
+    ecgGraph.classList.remove("ecg-active");
+    setInstructions("");
+    readAnother.style.display = "block";
+    handleFortune();
+    document.body.classList.add("show-results");
+  }, 10000);
+});
+readAnother.addEventListener("click", startCamera);
+
+// 20 units is about 0.6s, so 1 s = 33ish units
+const ecgPoints = [
+  [-0.8, 0.2],
+  [0.4, 1.2],
+  [1.5, 0.2],
+  [4.8, 0.2],
+  [5.1, -0.8],
+  [6.2, 13.9],
+  [7.4, -4],
+  [7.8, 0.2],
+  [10, 0.8],
+  [12, 4],
+  [13, 4],
+  [15, 0.5],
+  [16.8, 1.1],
+  [18, 0.2],
+];
+const XSHIFT = 0.8;
+const YSHIFT = -0.2;
+const PERIOD = 30;
+function ecg(time) {
+  time = time % PERIOD;
+  const index = ecgPoints.findIndex(([x]) => x + XSHIFT > time);
+  if (index === -1) {
+    return 0;
+  }
+  const [left, right] = ecgPoints.slice(index - 1, index + 1);
+  return (
+    ((time - XSHIFT - left[0]) * (right[1] - left[1])) / (right[0] - left[0]) +
+    left[1] +
+    YSHIFT
+  );
+}
+
+const ECG_LENGTH = 300;
+const FPS = 60;
+const ecgPath = document.getElementById("ecg-path");
+const ecgHistory = [];
+let simTime = 0;
+let startTime = Date.now();
+let frameId = null;
+function paintEcg() {
+  if (frameId === null) {
+    return;
+  }
+  // Correct for different monitor refresh rates
+  const now = Date.now();
+  const realTime = now - startTime;
+  if (realTime - simTime > 500) {
+    // If too much time passed
+    simTime = 0;
+    startTime = now;
+  } else {
+    while (simTime < realTime) {
+      ecgHistory.unshift(
+        -ecg(now / 30) * (Math.random() * 1 + 2.5) +
+          15 +
+          (Math.random() - 0.5) * 2
+      );
+      while (ecgHistory.length > ECG_LENGTH) {
+        ecgHistory.pop();
+      }
+      ecgPath.setAttributeNS(
+        null,
+        "d",
+        "M" + ecgHistory.map((pt, i) => `${i + 1} ${pt}`).join("L")
+      );
+      simTime += 1000 / FPS;
+    }
+  }
+  frameId = window.requestAnimationFrame(paintEcg);
+}
+
+
+
+ + + + +
+ +
+ +
+ Generated by JSDoc 3.6.7 on Fri Jun 09 2023 21:09:36 GMT+0000 (Coordinated Universal Time) using the Minami theme. +
+ + + + + diff --git a/JSDOCs/zodiacCompatability.js.html b/JSDOCs/zodiacCompatability.js.html new file mode 100644 index 00000000..d2edfdae --- /dev/null +++ b/JSDOCs/zodiacCompatability.js.html @@ -0,0 +1,262 @@ + + + + + + zodiacCompatability.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

zodiacCompatability.js

+ + + + + + + +
+
+
// Get the wheel element
+//const wheel = document.querySelector('.wheel');
+var wheel1 = document.getElementById("wheel1");
+var wheel2 = document.getElementById("wheel2");
+// Set initial rotation angle
+let w1angle = 0;
+let w1anglereal = 0;
+let w2angle = 0;
+let w2anglereal = 0;
+
+// Function to handle the mouse wheel event
+function rotateWheel1(event) {
+  // Determine the direction of scrolling
+  const direction = Math.sign(event.deltaY);
+
+  // Update the rotation angle based on the scrolling direction
+  w1angle += direction * 2;
+  w1anglereal = w1angle % 360;
+  console.log(w1anglereal);
+  // Apply the rotation transform to the wheel element
+  wheel1.style.transform = `rotate(${w1anglereal}deg)`;
+
+  // Prevent the default scrolling behavior
+  event.preventDefault();
+}
+// Function to handle the mouse wheel event
+function rotateWheel2(event) {
+  // Determine the direction of scrolling
+  const direction = Math.sign(event.deltaY);
+
+  // Update the rotation angle based on the scrolling direction
+  w2angle += direction * 2;
+  w2anglereal = w2angle % 360;
+  // Apply the rotation transform to the wheel element
+  wheel2.style.transform = `rotate(${w2anglereal}deg)`;
+
+  // Prevent the default scrolling behavior
+  event.preventDefault();
+}
+
+// Add the event listener for the mouse wheel event
+//wheel.addEventListener('wheel', rotateWheel);
+// Function to round the angle to the nearest multiple of 30
+function roundAngle(angle) {
+  return Math.round(angle / 30) * 30;
+}
+
+/** Function to handle the mouseout event */
+function stopRotation() {
+  // Round the current angle of the wheels to the nearest multiple of 30
+  const target1 = roundAngle(w1anglereal);
+  const target2 = roundAngle(w2anglereal);
+  // print rounded angles for clarity
+  console.log(`wheel 1 is rounded to ${target1}`);
+  console.log(`wheel 2 is rounded to ${target2}`);
+
+  // Apply the rounded rotation transform to the wheel elements smoothly over 500ms
+  const interval = setInterval(() => {
+    if (w1anglereal < target1) {
+      w1anglereal += 1;
+      wheel1.style.transform = `rotate(${w1anglereal}deg)`;
+    }
+    if (w1anglereal > target1) {
+      w1anglereal -= 1;
+      wheel1.style.transform = `rotate(${w1anglereal}deg)`;
+    }
+    if (w2anglereal < target2) {
+      w2anglereal += 1;
+      wheel2.style.transform = `rotate(${w2anglereal}deg)`;
+    }
+    if (w2anglereal > target2) {
+      w2anglereal -= 1;
+      wheel2.style.transform = `rotate(${w2anglereal}deg)`;
+    }
+    if (w1anglereal === target1 && w2anglereal === target2) {
+      clearInterval(interval);
+    }
+  }, 15);
+}
+
+// Add the event listeners for the mouse wheel and mouseout events
+wheel1.addEventListener("wheel", rotateWheel1);
+wheel2.addEventListener("wheel", rotateWheel2);
+wheel1.addEventListener("mouseout", stopRotation);
+wheel2.addEventListener("mouseout", stopRotation);
+
+var button = document.getElementById("find-out");
+const popup = document.getElementById("pop-up");
+
+console.log(popup);
+button.addEventListener("click", () => {
+  const pair = determinePairing(w1anglereal, w2anglereal);
+  //console.log(pair);
+  wheel1.style.animation = "slideOffLeft 1s forwards";
+  wheel2.style.animation = "slideOffRight 1s forwards";
+  button.style.animation = "fadeOut 1s forwards";
+  setTimeout(() => {
+    popup.style.display = "block";
+    popup.style.animation = "fadeIn 3s forwards";
+    const pairingHeader = popup.querySelector("#pairing");
+    pairingHeader.textContent = pair;
+  }, 2);
+});
+
+const mapping1 = [
+  [0, "aquarius"],
+  [360, "aquarius"],
+
+  [30, "pisces"],
+  [-330, "pisces"],
+
+  [60, "aries"],
+  [-300, "aries"],
+
+  [90, "taurus"],
+  [-270, "taurus"],
+
+  [120, "gemini"],
+  [-240, "gemini"],
+
+  [150, "cancer"],
+  [-210, "cancer"],
+
+  [180, "leo"],
+  [-180, "leo"],
+
+  [210, "virgo"],
+  [-150, "virgo"],
+
+  [240, "libra"],
+  [-120, "libra"],
+
+  [270, "scorpio"],
+  [-90, "scorpio"],
+
+  [300, "sagittarius"],
+  [-60, "scorpio"],
+
+  [330, "capricorn"],
+  [-30, "scorpio"],
+];
+
+const mapping2 = [
+  [0, "leo"],
+  [360, "leo"],
+
+  [30, "virgo"],
+  [-330, "virgo"],
+
+  [60, "libra"],
+  [-300, "libra"],
+
+  [90, "scorpio"],
+  [-270, "scorpio"],
+
+  [120, "sagittarius"],
+  [-240, "sagittarius"],
+
+  [150, "capricorn"],
+  [-210, "capricorn"],
+
+  [180, "aquarius"],
+  [-180, "aquarius"],
+
+  [210, "pisces"],
+  [-150, "pisces"],
+
+  [240, "aires"],
+  [-120, "aires"],
+
+  [270, "taurus"],
+  [-90, "taurus"],
+
+  [300, "gemini"],
+  [-60, "gemini"],
+
+  [330, "cancer"],
+  [-30, "cancer"],
+];
+
+function getMapping1(angle1) {
+  for (let i = 0; i < mapping1.length; i++) {
+    if (angle1 === mapping1[i][0]) {
+      return mapping1[i][1];
+    }
+  }
+  return "unknown";
+}
+function getMapping2(angle2) {
+  for (let i = 0; i < mapping2.length; i++) {
+    if (angle2 === mapping2[i][0]) {
+      return mapping2[i][1];
+    }
+  }
+  return "unknown";
+}
+
+function determinePairing(angle1, angle2) {
+  const angle1Mapping = getMapping1(angle1);
+  const angle2Mapping = getMapping2(angle2);
+  return `wheel1's mapping is ${angle1Mapping} and wheel2's mapping is ${angle2Mapping}.`;
+}
+
+
+
+ + + + +
+ +
+ +
+ Generated by JSDoc 3.6.7 on Fri Jun 09 2023 21:09:36 GMT+0000 (Coordinated Universal Time) using the Minami theme. +
+ + + + + diff --git a/package-lock.json b/package-lock.json index f78f9bb9..75699549 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "eslint-config-prettier": "^8.8.0", "jest": "^29.5.0", "jest-puppeteer": "^9.0.0", + "minami": "^1.2.3", "prettier": "^2.8.8", "puppeteer": "^20.5.0" } @@ -5438,6 +5439,12 @@ "node": ">=6" } }, + "node_modules/minami": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/minami/-/minami-1.2.3.tgz", + "integrity": "sha512-3f2QqqbUC1usVux0FkQMFYB73yd9JIxmHSn1dWQacizL6hOUaNu6mA3KxZ9SfiCc4qgcgq+5XP59+hP7URa1Dw==", + "dev": true + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", diff --git a/package.json b/package.json index 5a8f1bfe..77e89770 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,15 @@ "eslint-config-prettier": "^8.8.0", "jest": "^29.5.0", "jest-puppeteer": "^9.0.0", + "minami": "^1.2.3", "prettier": "^2.8.8", "puppeteer": "^20.5.0" }, "scripts": { "format": "prettier --no-config -w .", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", - "test": "jest" + "test": "jest", + "docs": "jsdoc" }, "jest": { "preset": "jest-puppeteer", diff --git a/source/FortuneCookie/fortuneCookie.js b/source/FortuneCookie/fortuneCookie.js index 6b155af8..b7613753 100644 --- a/source/FortuneCookie/fortuneCookie.js +++ b/source/FortuneCookie/fortuneCookie.js @@ -1,3 +1,6 @@ +/** + * Array of general, college, and collage-romance type fortunes + */ const fortunes = [ "Your future is bright, embrace it with open arms.", "A wonderful surprise is coming your way.", @@ -121,7 +124,10 @@ const fortuneText = document.getElementById("fortune-text"); const fortuneAudioCrack = document.getElementById("fortune-crack"); const voiceToggle = document.getElementById("voice-toggle-checkbox"); -// Gets a random fortune and ensures it does not match the previous fortune +/** + * This function will get a random fortune from the fortune array and make sure it does not match the previous one + * @returns {string} a random fortune + */ function getRandomFortune() { let randomIndex = Math.floor(Math.random() * fortunes.length); let fortune = fortunes[randomIndex]; @@ -136,7 +142,9 @@ function getRandomFortune() { return fortune; } -// Displays the fortune and if voice toggle is checked, read the fortune +/** + * Displays the fortune and if voice toggle is checked, reads out the fortune + */ function showFortune() { const fortune = getRandomFortune(); fortuneText.textContent = fortune; @@ -148,7 +156,10 @@ function showFortune() { } } -// Uses speech synthesis to read out fortune +/** + * Reads out the fortune using speech synthesis + * @param {string} fortune What the fortune to be read out is + */ function speakFortune(fortune) { const speech = new SpeechSynthesisUtterance(fortune); const option = voiceSelect.selectedOptions[0].getAttribute("data-name"); @@ -166,26 +177,35 @@ function speakFortune(fortune) { }); } -// Disables button when called +/** + * Disables button so user cannot click it + */ function disableButton() { fortuneButton.disabled = true; fortuneButton.style.opacity = "0.5"; } -// Enables button when called +/** + * Enables button so user can click it + */ function enableButton() { fortuneButton.disabled = false; fortuneButton.style.opacity = "1"; } -// When button is clicked, audio plays and then fortune is read/displayed +/** + * When the user clicks the button, disables it so they cannot click the button + * in quick succession and cause audio issues + */ fortuneButton.addEventListener("click", function () { fortuneAudioCrack.play(); disableButton(); setTimeout(showFortune, 1000); }); -// Added options for different voices +/** + * Added options for different voices using voice synthesis + */ const synth = window.speechSynthesis; // const inputForm = document.querySelector("form"); @@ -198,6 +218,9 @@ const voiceSelect = document.querySelector("select"); let voices = []; +/** + * Speech synthesis API + */ function populateVoiceList() { voices = synth.getVoices(); diff --git a/source/Zodiac_compatibility/script.js b/source/Zodiac_compatibility/script.js index 639bba76..0569c510 100644 --- a/source/Zodiac_compatibility/script.js +++ b/source/Zodiac_compatibility/script.js @@ -129,6 +129,7 @@ function roundAngle(angle) { return base * 360 + Math.round(rem / 30) * 30; } } + /** * Stops the rotation of the wheels and applies a smooth transition to the nearest rounded angle. */ diff --git a/source/home-page/script.js b/source/home-page/script.js index 22034f9d..552b3f48 100644 --- a/source/home-page/script.js +++ b/source/home-page/script.js @@ -3,7 +3,7 @@ const cardContainers = document.querySelectorAll(".card-container"); // Get the "Randomize" button element const randomizeButton = document.querySelector(".randomize-button"); -// Add click event listener to the "Randomize" button +/** Add click event listener to the "Randomize" button */ randomizeButton.addEventListener("click", () => { // Get a random index for the card containers const randomIndex = Math.floor(Math.random() * cardContainers.length);