Mar. 17th, 2013

avva: (moose)
Красивый эффект "Матрицы" в минимальном Джаваскрипте, меньше 600 байт:


<body style=margin:0 onload="for(s=window.screen,w=q.width=s.width,h=q.height=s.height,m=Math.random,p=[],i=0;i<256;p[i++]=1);setInterval('9Style=\'rgba(0,0,0,.05)\'9Rect(0,0,w,h)9Style=\'#0F0\';p.map(function(v,i){9Text(String.fromCharCode(3e4+m()*33),i*10,v);p[i]=v>758+m()*1e4?0:v+10})'.split(9).join(';q.getContext(\'2d\').fill'),33)"><canvas id=q>


Чтобы разобраться в том, как это сделано, я немного развернул и и прокомментировал текст, не меняя основную логику.

(уже после того, как я это сделал, обнаружил другое объяснение, более подробное и развернутое).
avva: (moose)
"Most music in the western world imparts a sense of finality through the sequence V–I, or variations of it. It is not fully understood why V–I imparts such a feeling of finality, but it cannot be denied that it does."

-- Dave Benson, Music: A Mathematical Offering

January 2026

S M T W T F S
    1 2 3
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 5th, 2026 01:18 pm
Powered by Dreamwidth Studios