justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: Can you explain the algorithm to HTML5 canvas/javascript fun #1?
Asked by Will (24.234.85.x) on July 5 2013, 7:35pm
Reply on July 5 2013, 10:42pm:
    It has two things:

    The first is what it draws in the center, which is a classic super-basic effect which is to draw each pixel as a bitwise combination of their coordinates, i.e. xor/or/and. In that case, it does something a little different for each color plane (back in the day we'd have a palette so we'd just typically make the palette index bitwise x/y).

    The second effect is blitter feedback; this is implemented by creating a second canvas, blitting a copy of the main canvas to it, and then blitting a portion of that copied canvas to the main canvas, with scaling. The scale applied is usually slightly different (i.e. zooming 1.05x or so), which wouldn't mean much, except the zooming accumulates each frame. It's a very common technique for visualizers (going back to Geiss, AVS, G-Force, etc).

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2024 Justin Frankel. | RSS