开发者

adding html5 attribute to my website

开发者 https://www.devze.com 2023-04-09 08:51 出处:网络
As some of you may have seen arcade fire released a special music video alon开发者_JAVA百科g with google that showcased the power of HTML5, if not its here: http://thewildernessdowntown.com/

As some of you may have seen arcade fire released a special music video alon开发者_JAVA百科g with google that showcased the power of HTML5, if not its here: http://thewildernessdowntown.com/ My question is I'm redesigning my home page and would really like to add those birds but when i went through the websites source code i couldnt find the script anywhere and when i just took the entire html source file, saved it locally and opened it, the page opened perfectly, but no birds. Can anyone show or help me pinpoint the birds on the website so i can use them. THANKS


Viewing the source, I came across this linked javascript file - http://www.thewildernessdowntown.com/js/main-compressed.js

There is A LOT of stuff going on in there, but I found a function that might be somewhat helpful (though it seems a bit obfuscated.)

addBirds1: function() {
    for (var e = 0; e < 100; e++) {
        var c = -1 - Math.random() * 0.5;
        var h = 1 - Math.random() * 2;
        var b = 1 + Math.random() * 0.5;
        var f = 1 - Math.random() * 2 - Math.random() * 0.5;
        var k = 1.5 * (0.025 + Math.random() * 0.05);
        var m = (b - c) / k;
        var l = (f - h) / k;
        var g = Math.atan2(l, m);
        this.birds_array.push({
            start: {
                x: c,
                y: h
            },
            end: {
                x: b,
                y: f
            },
            d: {
                x: m,
                y: l
            },
            a: g,
            t: k,
            o: Math.random(),
            scale: 0.4 + 0.4 * Math.random()
        })
    }
},

There are 3 versions of that function... so I'd imagine they are just ways to simulate random flying activity. It seems that what you're looking for is javascript, and not HTML5


HTML5 doesn't do that, sorry. It's still a markup language. You'll still have to use good ol' Javascript for that. You can see that on the website if you turn Javascript off.


The birds feature is not HTML5. It's javascript. Turn off your javascript and check it out.

http://cdn.thewildernessdowntown.com/js/main-compressed.js

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号