// Copyright 2014-2020, University of Colorado Boulder

/**
 * The paper airplane that is part of the PhET logo.
 *
 * @author John Blanco
 */

import Shape from '../../kite/js/Shape.js';
import inherit from '../../phet-core/js/inherit.js';
import merge from '../../phet-core/js/merge.js';
import Path from '../../scenery/js/nodes/Path.js';
import PhetColorScheme from './PhetColorScheme.js';
import sceneryPhet from './sceneryPhet.js';

/**
 * @param {Object} [options]
 * @constructor
 */
function PaperAirplaneNode( options ) {
  options = merge( {
    fill: PhetColorScheme.PHET_LOGO_YELLOW
  }, options );

  // Define the shape, from the points in the PhET Logo AI file, see https://github.com/phetsims/scenery-phet/issues/75
  // The bounds offset were determined by getting bodyShape.bounds.minX, bodyShape.bounds.minY, and the shape
  // is adjusted to have top/left at (0,0)
  const dx = 221.92;
  const dy = 114.975;
  const bodyShape = new Shape()
    .moveTo( 221.92 - dx, 131.225 - dy )
    .lineTo( 234.307 - dx, 135.705 - dy )
    .lineTo( 250.253 - dx, 122.428 - dy )
    .lineTo( 237.983 - dx, 136.955 - dy )
    .lineTo( 251.236 - dx, 141.627 - dy )
    .lineTo( 256.021 - dx, 114.975 - dy )
    .close()

    // Lower part
    .moveTo( 238.004 - dx, 139.547 - dy )
    .lineTo( 238.312 - dx, 146.48 - dy )
    .lineTo( 243.254 - dx, 141.54 - dy )
    .close();

  Path.call( this, bodyShape, options );
}

sceneryPhet.register( 'PaperAirplaneNode', PaperAirplaneNode );

inherit( Path, PaperAirplaneNode );
export default PaperAirplaneNode;
@@ -56,17 +56,41 @@
 %0A/**%0A * 
-T
+PaperAirplaneNode draws t
 he paper
@@ -209,61 +209,8 @@
 s';%0A
-import inherit from '../../phet-core/js/inherit.js';%0A
 impo
@@ -402,20 +402,64 @@
 t.js';%0A%0A
+class PaperAirplaneNode extends Path %7B%0A%0A  
 /**%0A
+  
  * @para
@@ -480,19 +480,23 @@
 tions%5D%0A 
-* @
+  */%0A  
 construc
@@ -502,39 +502,8 @@
 ctor
-%0A */%0Afunction PaperAirplaneNode
 ( op
@@ -512,16 +512,19 @@
 ons ) %7B%0A
+%0A
+  
   option
@@ -536,16 +536,18 @@
 erge( %7B%0A
+  
     fill
@@ -581,16 +581,18 @@
 _YELLOW%0A
+  
   %7D, opt
@@ -600,16 +600,18 @@
 ons );%0A%0A
+  
   // Def
@@ -722,16 +722,18 @@
 sues/75%0A
+  
   // The
@@ -836,16 +836,18 @@
 shape%0A  
+ 
+ 
 // is ad
@@ -879,16 +879,18 @@
 t (0,0)%0A
+  
   const 
@@ -902,16 +902,18 @@
 221.92;%0A
+  
   const 
@@ -928,16 +928,18 @@
 .975;%0A  
+ 
+ 
 const bo
@@ -960,16 +960,18 @@
 Shape()%0A
+  
     .mov
@@ -999,32 +999,34 @@
 .225 - dy )%0A    
+  
 .lineTo( 234.307
@@ -1043,32 +1043,34 @@
 .705 - dy )%0A    
+ 
+ 
 .lineTo( 250.253
@@ -1083,32 +1083,34 @@
  122.428 - dy )%0A
+  
     .lineTo( 237
@@ -1131,32 +1131,34 @@
 .955 - dy )%0A    
+  
 .lineTo( 251.236
@@ -1175,32 +1175,34 @@
 .627 - dy )%0A    
+ 
+ 
 .lineTo( 256.021
@@ -1219,32 +1219,34 @@
 .975 - dy )%0A    
+  
 .close()%0A%0A    //
@@ -1239,16 +1239,18 @@
 lose()%0A%0A
+  
     // L
@@ -1259,24 +1259,26 @@
 er part%0A    
+  
 .moveTo( 238
@@ -1299,32 +1299,34 @@
 .547 - dy )%0A    
+ 
+ 
 .lineTo( 238.312
@@ -1342,24 +1342,26 @@
 6.48 - dy )%0A
+  
     .lineTo(
@@ -1389,24 +1389,26 @@
  - dy )%0A    
+  
 .close();%0A%0A 
@@ -1412,24 +1412,16 @@
 %0A%0A  
-Path.call( this,
+  super(
  bod
@@ -1439,16 +1439,20 @@
 ions );%0A
+  %7D%0A
 %7D%0A%0Ascene
@@ -1513,45 +1513,8 @@
 e );
-%0A%0Ainherit( Path, PaperAirplaneNode );
 %0Aexp

convert PaperAirplaneNode to ES6, https://github.com/phetsims/tasks/issues/1044