1const t=`<script> 2 export let random = Math.random; 3 4 // Not important for the challenge, but some math fun: 5 // Math.random() gives us in the range [0...1] so we multiply 6 // so we can get a range [0...AMPLIFY]. 7 // BUT! We want our lights centered in the tree still, so we 8 // subtract (AMPLIFY / 2) so that we're centered over 0 9 // and our range is now [(-AMPLIFY / 2)...(AMPLIFY / 2)] 10 const AMPLIFY = 15; 11 const offsetY = random() * AMPLIFY - AMPLIFY / 2; 12 const offsetX = random() * AMPLIFY - AMPLIFY / 2; 13 // Should be the same as the length of the animation so that 14 // it's evenly distributed 15 const MAX_DELAY = 2; 16 const twinkleDelay = random() * MAX_DELAY; 17<\/script> 18 19<div 20 style:top="{offsetY}px" 21 style:left="{offsetX}px" 22 style:animation-delay="{twinkleDelay}s" 23 class="twinkle" 24/> 25 26<style> 27 .twinkle { 28 animation: twinkle 2s ease-in-out infinite; 29 border-radius: var(--radius-round); 30 background: var(--yellow-1); 31 width: 0.5rem; 32 height: 0.5rem; 33 position: relative; 34 z-index: 20; 35 box-shadow: var(--shadow-3); 36 } 37 @keyframes twinkle { 38 0% { 39 opacity: 0; 40 } 41 50% { 42 opacity: 1; 43 } 44 100% { 45 opacity: 0; 46 } 47 } 48</style> 49`;export{t as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.