commit 1cbc5a25a6eec6e8459b3916139eb4b3e52539e1
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2018-04-28T13:57:27Z |
| subject | Removed parallax for Build, so laggy |
commit 1cbc5a25a6eec6e8459b3916139eb4b3e52539e1
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2018-04-28T13:57:27Z
Removed parallax for Build, so laggy
---
botanjs/src/Astro/Build/Layout/MainFrame.js | 52 -----------------------------
1 file changed, 52 deletions(-)
diff --git a/botanjs/src/Astro/Build/Layout/MainFrame.js b/botanjs/src/Astro/Build/Layout/MainFrame.js
index b4cf44f..61bec28 100644
--- a/botanjs/src/Astro/Build/Layout/MainFrame.js
+++ b/botanjs/src/Astro/Build/Layout/MainFrame.js
@@ -8,8 +8,6 @@
var IDOMElement = __import( "Dandelion.IDOMElement" );
/** @type {Astro.Mechanism.CharacterCloud} */
var CharacterCloud = __import( "Astro.Mechanism.CharacterCloud" );
- /** @type {Astro.Mechanism.Parallax} */
- var Parallax = __import( "Astro.Mechanism.Parallax" );
/** @type {Dandelion.Window} */
var wsupp = __import( "Dandelion.Window" );
@@ -18,56 +16,6 @@
var init = function ()
{
- initBackgroundParallax();
- };
-
- var initBackgroundParallax = function ()
- {
- var bg = Dand.id("main_background")
- // far from observer
- , slide_1 = { lowerLimit: 70, upperLimit: 100 }
- // bottom cloud, concentrated
- , slide_2a = { lowerLimit: 0, upperLimit: 200 }
- , slide_2b = { lowerLimit: 0, upperLimit: 200 }
- , slide_2c = { lowerLimit: 0, upperLimit: 200 }
-
- , slide_3 = { lowerLimit: 20, upperLimit: 100 }
- , slide_4 = { lowerLimit: 70, upperLimit: 100 }
-
- , cloudRange_1 = { lowerLimit: 0, upperLimit: 100, leftLimit: -10, rightLimit: 110 }
- , cloudRange_2a = { lowerLimit: 0, upperLimit: 200, leftLimit: -10, rightLimit: 110 }
- , cloudRange_2b = { lowerLimit: 0, upperLimit: 300, leftLimit: -10, rightLimit: 110 }
- , cloudRange_2c = { lowerLimit: 0, upperLimit: 400, leftLimit: -10, rightLimit: 110 }
- , cloudRange_3 = { lowerLimit: 0, upperLimit: 300, leftLimit: -10, rightLimit: 110 }
- , cloudRange_4 = { lowerLimit: 80, upperLimit: 100, leftLimit: -10, rightLimit: 110 }
-
- , cCloudSymbol = ["\u25C6", "\u25C7", "\u25C8"]
- , cCloudSymbol2 = ["\u25C6", "\u25C7"]
-
- , colors = ["909396", "0C121B", "3A68B2", "48494A"]
- , i = new Date().getDay()
-
- , cCloud_1 = CharacterCloud.create( cCloudSymbol2, null, 20, cloudRange_1 )
- , cCloud_2a = CharacterCloud.create( cCloudSymbol, null, 20, cloudRange_2a )
- , cCloud_2b = CharacterCloud.create( cCloudSymbol, null, 30, cloudRange_2b, 10 )
- , cCloud_2c = CharacterCloud.create( cCloudSymbol, null, 80, cloudRange_2c, 5 )
- , cCloud_3 = CharacterCloud.create( cCloudSymbol2, null, 20, cloudRange_3 )
- , cCloud_4 = CharacterCloud.create( cCloudSymbol2, null, 20, cloudRange_4 );
-
- bg.appendChild( Parallax.cssSlide( cCloud_1, 0, slide_1 ) );
- bg.appendChild( Parallax.cssSlide( cCloud_2a, 1, slide_2a ) );
- bg.appendChild( Parallax.cssSlide( cCloud_2b, 1, slide_2b ) );
- bg.appendChild( Parallax.cssSlide( cCloud_2c, 1, slide_2c ) );
- bg.appendChild( Parallax.cssSlide( cCloud_3, 2, slide_3 ) );
- bg.appendChild( Parallax.cssSlide( cCloud_4, 3, slide_4 ) );
-
- IDOMElement( bg ).foreach( 1, function(e)
- {
- e.style.color = "#" + colors[i ++];
- if (colors.length < i) i = 0;
- });
-
- Parallax.attach( window, wsupp, 0.3 );
};
Bootstrap.regInit( init );