@@ -184,6 +184,7 @@ class Renderer {
184184
185185  beginShape ( ...args )  { 
186186    this . currentShape . reset ( ) ; 
187+     this . updateShapeVertexProperties ( ) ; 
187188    this . currentShape . beginShape ( ...args ) ; 
188189  } 
189190
@@ -224,13 +225,24 @@ class Renderer {
224225    return  this ; 
225226  } 
226227
227-   spline ( x1 ,  y1 ,  x2 ,  y2 ,  x3 ,  y3 ,  x4 ,  y4 )  { 
228-     this . _pInst . beginShape ( ) ; 
229-     this . _pInst . splineVertex ( x1 ,  y1 ) ; 
230-     this . _pInst . splineVertex ( x2 ,  y2 ) ; 
231-     this . _pInst . splineVertex ( x3 ,  y3 ) ; 
232-     this . _pInst . splineVertex ( x4 ,  y4 ) ; 
233-     this . _pInst . endShape ( ) ; 
228+   spline ( ...args )  { 
229+     if  ( args . length  ===  2  *  4 )  { 
230+       const  [ x1 ,  y1 ,  x2 ,  y2 ,  x3 ,  y3 ,  x4 ,  y4 ]  =  args ; 
231+       this . _pInst . beginShape ( ) ; 
232+       this . _pInst . splineVertex ( x1 ,  y1 ) ; 
233+       this . _pInst . splineVertex ( x2 ,  y2 ) ; 
234+       this . _pInst . splineVertex ( x3 ,  y3 ) ; 
235+       this . _pInst . splineVertex ( x4 ,  y4 ) ; 
236+       this . _pInst . endShape ( ) ; 
237+     }  else  if  ( args . length  ===  3  *  4 )  { 
238+       const  [ x1 ,  y1 ,  z1 ,  x2 ,  y2 ,  z2 ,  x3 ,  y3 ,  z3 ,  x4 ,  y4 ,  z4 ]  =  args ; 
239+       this . _pInst . beginShape ( ) ; 
240+       this . _pInst . splineVertex ( x1 ,  y1 ,  z1 ) ; 
241+       this . _pInst . splineVertex ( x2 ,  y2 ,  z2 ) ; 
242+       this . _pInst . splineVertex ( x3 ,  y3 ,  z3 ) ; 
243+       this . _pInst . splineVertex ( x4 ,  y4 ,  z4 ) ; 
244+       this . _pInst . endShape ( ) ; 
245+     } 
234246    return  this ; 
235247  } 
236248
0 commit comments