@@ -154,6 +154,13 @@ class PenSkin extends Skin {
154154 return true ;
155155 }
156156
157+ /**
158+ * @returns {boolean } true if alpha is premultiplied, false otherwise
159+ */
160+ get hasPremultipliedAlpha ( ) {
161+ return true ;
162+ }
163+
157164 /**
158165 * @return {Array<number> } the "native" size, in texels, of this skin. [width, height]
159166 */
@@ -181,8 +188,9 @@ class PenSkin extends Skin {
181188 clear ( ) {
182189 const gl = this . _renderer . gl ;
183190 twgl . bindFramebufferInfo ( gl , this . _framebuffer ) ;
184-
185- gl . clearColor ( 1 , 1 , 1 , 0 ) ;
191+
192+ /* Reset framebuffer to transparent black */
193+ gl . clearColor ( 0 , 0 , 0 , 0 ) ;
186194 gl . clear ( gl . COLOR_BUFFER_BIT ) ;
187195
188196 const ctx = this . _canvas . getContext ( '2d' ) ;
@@ -598,7 +606,7 @@ class PenSkin extends Skin {
598606 this . _silhouetteBuffer = twgl . createFramebufferInfo ( gl , [ { format : gl . RGBA } ] , width , height ) ;
599607 }
600608
601- gl . clearColor ( 1 , 1 , 1 , 0 ) ;
609+ gl . clearColor ( 0 , 0 , 0 , 0 ) ;
602610 gl . clear ( gl . COLOR_BUFFER_BIT ) ;
603611
604612 this . _silhouetteDirty = true ;
0 commit comments