uxebu / bonsai

BonsaiJS is a graphics library and renderer
http://bonsaijs.org
Other
1.96k stars 189 forks source link

Mask/Clip optimization #159

Open davidaurelio opened 11 years ago

davidaurelio commented 11 years ago

The svg renderer should use <clipPath> instead of <mask> if the mask is simple (i.e. does not contain any transparencies).

<clipPath> is much faster than <mask> and allows for much better frame rates, especially on mobile devices.