weekend 发表于 2014-5-19 18:30:06

魔方发明40周年的google logo

https://gstatic.com/logos/2014/rubiks/iframe/index.html
就是这个程序。
源代码:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="styles/cube.css">
    <link rel="stylesheet" type="text/css" href="styles/doodle.css">
    <link rel="stylesheet" type="text/css" href="styles/certificate.css">
    <!-- Script font -->
    <link href="//fonts.googleapis.com/css?family=Rubik+One&subset=all" rel="stylesheet" type="text/css">
    <!-- compiled & minified cube code -->
    <script charset="utf-8" src="//www.gstatic.com/external_hosted/tweenjs-r12/tween.js"></script>
    <script charset="utf-8" src="//www.gstatic.com/external_hosted/threejs-r66/Three.noStrict.js"></script>
    <script charset="utf-8" src="scripts/cuber.min.js"></script>
  </head>
  <body>
    <div id="bg"></div>
    <div id="container"></div>
    <div id="fail">
      <img src="media/static-cube.png"/>
      <div id="upgradeText" class="bubble fadeTransition">
        <div class="upgradetext">To play, please use the latest version of one of the following browsers</div>
        <br><br>
        <a class="upgradetext" href="https://www.google.com/chrome/browser/" target="_blank">Chrome</a><br>
        <a class="upgradetext" href="https://www.mozilla.org/firefox" target="_blank">Firefox</a><br>
        <a class="upgradetext" href="https://www.apple.com/safari" target="_blank">Safari</a><br>
        <span class="pointerleft SPRITE_carrot_down_2x"></span>
      </div>
    </div>
    <div id="uipanel" class="fadeTransition">
      <div id="movecounter">0</div>
      <div id="buttonpanel">
        <div id="sharebubble" class="fadeTransition" style="opacity:0">
          <input id="shareshortlink" type="text" value="google.com/doodles" readonly="readonly"/>
          <div id="sharegplus" class="bubbleicon SPRITE_google_plus_64_2x"></div>
          <div id="sharefacebook" class="bubbleicon SPRITE_facebook_64_2x"></div>
          <div id="sharetwitter" class="bubbleicon SPRITE_twitter_64_2x"></div>
          <div id="shareemail" class="bubbleicon SPRITE_email_64_2x"></div>
        </div>
        <div id="uibuttons">
          <div id="sharebutton" class="bubbleicon SPRITE_share_64_2x"></div>
          <div id="helpbutton" class="bubbleicon SPRITE_help_64_2x"></div>
          <div id="searchbutton" class="bubbleicon SPRITE_search_64_2x"></div>
        </div>
      </div>
      <div id="helpbubble" class="bubble" style="display:none">
        <span class="pointerup SPRITE_carrot_grey_up_2x"></span>
        <div id="helpimage" class="one"></div>
        <div id="helptext" class="helptext"></div>
        <div id="helpnext" class="helptext"></div>
        <span class="pointerdown SPRITE_carrot_down_2x"></span><br>
      </div>
    </div>
    <script charset="utf-8" src="scripts/iecss3d.js"></script>
    <script charset="utf-8" src="scripts/ierenderer.js"></script>
    <script charset="utf-8" src="scripts/deviceMotion.js"></script>
    <script charset="utf-8" src="scripts/locked.js"></script>
    <!-- Certificate js -->
    <script charset="utf-8" src="scripts/textBox.js"></script>
    <script charset="utf-8" src="scripts/ResizeableTextBox.js"></script>
    <script charset="utf-8" src="scripts/divBox.js"></script>
    <script charset="utf-8" src="scripts/frames.js"></script>
    <script charset="utf-8" src="scripts/certificate.js"></script>
    <script charset="utf-8" src="scripts/main.js"></script>
  </body>
</html>

对应的快捷键
f前面逆时针转90度
F前面顺时针转90度
l左面逆时针转90度
L左面顺时针转90度
r右面逆时针转90度
R右面顺时针转90度
b后面逆时针转90度
B后面顺时针转90度
u顶面逆时针转90度
U顶面顺时针转90度
d底面逆时针转90度
D底面顺时针转90度
m左右的中间层逆时针转90度
M左右的中间层顺时针转90度
e上下的中间层逆时针转90度
E上下的中间层顺时针转90度
s前后的中间层逆时针转90度
S前后的中间层顺时针转90度
x x轴方向整体逆时针转90度
X x轴方向整体顺时针转90度
y y轴方向整体逆时针转90度
Y y轴方向整体逆时针转90度
z z轴方向整体逆时针转90度
Z z轴方向整体逆时针转90度

weekend 发表于 2014-5-19 18:31:34

本帖最后由 weekend 于 2014-5-19 18:32 编辑

不会分析javascript代码

张小乐 发表于 2014-5-19 19:08:01

牛人,厉害。

天方魔 发表于 2014-5-19 19:18:30

给大神跪了mf20

张yao 发表于 2014-5-19 19:56:19

感谢分享!!!

xianfenglee 发表于 2014-5-19 22:44:27

想起了学过的web。。。

ursace 发表于 2014-5-20 00:19:29

:lol强:lol

晕晕、、 发表于 2014-5-20 19:39:06

好腻害~~~~

魔度小屋 发表于 2014-9-17 15:16:51

楼主强大,这是c语言编程吗 ?完全看不懂啊:L

weekend 发表于 2014-9-19 14:28:16

魔度小屋 发表于 2014-9-17 15:16 static/image/common/back.gif
楼主强大,这是c语言编程吗 ?完全看不懂啊

HTML5~~~~~~
页: [1] 2
查看完整版本: 魔方发明40周年的google logo