@@ -26,44 +26,6 @@ const pluginName = 'slotMachine',
2626 FX_GRADIENT = 'slotMachineGradient' ,
2727 FX_STOP = FX_GRADIENT ;
2828
29- // Set required styles, filters and masks
30- $ ( document ) . ready ( function documentReady ( ) {
31-
32- function getSvgFilter ( blur ) {
33- return `<svg version="1.1" xmlns="http:// www.w3.org/2000/svg" width="0" height="0"><filter id="slotMachineBlurFilter${ blur } "><feGaussianBlur stdDeviation="${ blur } " /></filter></svg>#slotMachineBlurFilter${ blur } ` ;
34- }
35-
36- function getBlurStyle ( amount ) {
37- return `-webkit-filter: blur(${ amount } px);-moz-filter: blur(${ amount } px);-o-filter: blur(${ amount } px);-ms-filter: blur(${ amount } px);filter: blur(${ amount } px);filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius="${ amount } ");filter: url("data:image/svg+xml;utf8,${ getSvgFilter ( amount ) } ");` ;
38- }
39-
40- const slotMachineFadeMaskString = '<svg version="1.1" xmlns="http:// www.w3.org/2000/svg" width="0" height="0">' +
41- '<mask id="slotMachineFadeMask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">' +
42- '<linearGradient id="slotMachineFadeGradient" gradientUnits="objectBoundingBox" x="0" y="0">' +
43- '<stop stop-color="white" stop-opacity="0" offset="0"></stop>' +
44- '<stop stop-color="white" stop-opacity="1" offset="0.25"></stop>' +
45- '<stop stop-color="white" stop-opacity="1" offset="0.75"></stop>' +
46- '<stop stop-color="white" stop-opacity="0" offset="1"></stop>' +
47- '</linearGradient>' +
48- '<rect x="0" y="-1" width="1" height="1" transform="rotate(90)" fill="url(#slotMachineFadeGradient)"></rect>' +
49- '</mask>' +
50- '</svg>#slotMachineFadeMask' ;
51-
52- // CSS classes
53- $ ( 'body' ) . append ( '<style>' +
54- `.${ FX_NO_TRANSITION } {-webkit-transition: none !important;-moz-transition: none !important;-o-transition: none !important;-ms-transition: none !important;transition: none !important;}` +
55- `.${ FX_FAST } {${ getBlurStyle ( 5 ) } }` +
56- `.${ FX_NORMAL } {${ getBlurStyle ( 3 ) } }` +
57- `.${ FX_SLOW } {${ getBlurStyle ( 2 ) } }` +
58- `.${ FX_TURTLE } {${ getBlurStyle ( 1 ) } }` +
59- `.${ FX_GRADIENT } {` +
60- '-webkit-mask-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0,0,0,0)), color-stop(25%, rgba(0,0,0,1)), color-stop(75%, rgba(0,0,0,1)), color-stop(100%, rgba(0,0,0,0)) );' +
61- `mask: url("data:image/svg+xml;utf8,${ slotMachineFadeMaskString } ");` +
62- '}' +
63- '</style>' ) ;
64-
65- } ) ;
66-
6729class Timer {
6830 constructor ( cb , delay ) {
6931 this . cb = cb ;
0 commit comments