Fandom

Scratchpad

Example

224,662pages on
this wiki
Add New Page
Discuss this page0 Share

This is an example of a beat. When the page body loads, the beat will cause the page to emit a one second beep every three seconds.


Example.<3

   //<3 Beat
   
   //In general, every beat will define what hearts are called in the HTML body.
    
   <body3
   
       //It's good practice to not redefine global methods in the body, just in case
       //you want to use the default values in another heart. That's why we're def-
       //ining our beep and tick inside a nested heart, called threeBeep.
   
       <threeBeep3
   
           //We define the beep method's properties by putting it in a heart.
   
           <beep3
   
               //Set frequency and time
   
               440. => freq;
               1::second => time;
           </3
   
           //Set up the three second ticker.
   
           <tick3
   
               //Time is three seconds.
   
               3::second => rate;
   
               //Every tick, we need it to beep, so...
   
               ^beep;
           </3
   
           //Lastly, set up the ticker...
   
           ^tick;
       </3
   </3

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.