lib/third_party/tracing/extras/rail/rail_ir_finder.js
function(sortedInputEvents) {
      var protoIRs = [];
      var currentPIR = undefined;
      var sawFirstUpdate = false;
      var modelBounds = this.model.bounds;
      forEventTypesIn(sortedInputEvents, PINCH_TYPE_NAMES, function(event) {
        switch (event.typeName) {
          case INPUT_TYPE.PINCH_BEGIN:
            if (currentPIR &&
                currentPIR.isNear(event, INPUT_MERGE_THRESHOLD_MS)) {
              currentPIR.pushEvent(event);
              break;
            }
            currentPIR = new ProtoIR(ProtoIR.RESPONSE_TYPE, PINCH_IR_NAME);
            currentPIR.pushEvent(event);
            protoIRs.push(currentPIR);
            sawFirstUpdate = false;
            break;

          case INPUT_TYPE.PINCH_UPDATE:
            // Like ScrollUpdates, the Begin and the first Update constitute a
            // Response, then the rest of the Updates constitute an Animation
            // that begins when the Response ends. If the user pauses in the
            // middle of an extended pinch gesture, then multiple Animations
            // will be created.
            if (!currentPIR ||
                ((currentPIR.irType === ProtoIR.RESPONSE_TYPE) &&
                 sawFirstUpdate) ||
                !currentPIR.isNear(event, INPUT_MERGE_THRESHOLD_MS)) {
              currentPIR = new ProtoIR(ProtoIR.ANIMATION_TYPE, PINCH_IR_NAME);
              currentPIR.pushEvent(event);
              protoIRs.push(currentPIR);
            } else {
              currentPIR.pushEvent(event);
              sawFirstUpdate = true;
            }
            break;

          case INPUT_TYPE.PINCH_END:
            if (currentPIR) {
              currentPIR.pushEvent(event);
            } else {
              var pir = new ProtoIR(ProtoIR.IGNORED_TYPE);
              pir.pushEvent(event);
              protoIRs.push(pir);
            }
            currentPIR = undefined;
            break;
        }
      });
      return protoIRs;
    }
function(sortedInputEvents) {
      var protoIRs = [];
      var currentPIR = undefined;
      var sawFirstUpdate = false;
      var modelBounds = this.model.bounds;
      forEventTypesIn(sortedInputEvents, PINCH_TYPE_NAMES, function(event) {
        switch (event.typeName) {
          case INPUT_TYPE.PINCH_BEGIN:
            if (currentPIR &&
                currentPIR.isNear(event, INPUT_MERGE_THRESHOLD_MS)) {
              currentPIR.pushEvent(event);
              break;
            }
            currentPIR = new ProtoIR(ProtoIR.RESPONSE_TYPE, PINCH_IR_NAME);
            currentPIR.pushEvent(event);
            protoIRs.push(currentPIR);
            sawFirstUpdate = false;
            break;

          case INPUT_TYPE.PINCH_UPDATE:
            // Like ScrollUpdates, the Begin and the first Update constitute a
            // Response, then the rest of the Updates constitute an Animation
            // that begins when the Response ends. If the user pauses in the
            // middle of an extended pinch gesture, then multiple Animations
            // will be created.
            if (!currentPIR ||
                ((currentPIR.irType === ProtoIR.RESPONSE_TYPE) &&
                 sawFirstUpdate) ||
                !currentPIR.isNear(event, INPUT_MERGE_THRESHOLD_MS)) {
              currentPIR = new ProtoIR(ProtoIR.ANIMATION_TYPE, PINCH_IR_NAME);
              currentPIR.pushEvent(event);
              protoIRs.push(currentPIR);
            } else {
              currentPIR.pushEvent(event);
              sawFirstUpdate = true;
            }
            break;

          case INPUT_TYPE.PINCH_END:
            if (currentPIR) {
              currentPIR.pushEvent(event);
            } else {
              var pir = new ProtoIR(ProtoIR.IGNORED_TYPE);
              pir.pushEvent(event);
              protoIRs.push(pir);
            }
            currentPIR = undefined;
            break;
        }
      });
      return protoIRs;
    }
function ( sortedInputEvents ) { var protoIRs = [ ] ; var currentPIR = undefined ; var sawFirstUpdate = false ; var modelBounds = this . model . bounds ; forEventTypesIn ( sortedInputEvents , PINCH_TYPE_NAMES , function ( event ) { switch ( event . typeName ) { case INPUT_TYPE . PINCH_BEGIN : if ( currentPIR && currentPIR . isNear ( event , INPUT_MERGE_THRESHOLD_MS ) ) { currentPIR . pushEvent ( event ) ; break ; } currentPIR = new ProtoIR ( ProtoIR . RESPONSE_TYPE , PINCH_IR_NAME ) ; currentPIR . pushEvent ( event ) ; protoIRs . push ( currentPIR ) ; sawFirstUpdate = false ; break ; case INPUT_TYPE . PINCH_UPDATE : // Like ScrollUpdates, the Begin and the first Update constitute a // Response, then the rest of the Updates constitute an Animation // that begins when the Response ends. If the user pauses in the // middle of an extended pinch gesture, then multiple Animations // will be created. if ( ! currentPIR || ( ( currentPIR . irType === ProtoIR . RESPONSE_TYPE ) && sawFirstUpdate ) || ! currentPIR . isNear ( event , INPUT_MERGE_THRESHOLD_MS ) ) { currentPIR = new ProtoIR ( ProtoIR . ANIMATION_TYPE , PINCH_IR_NAME ) ; currentPIR . pushEvent ( event ) ; protoIRs . push ( currentPIR ) ; } else { currentPIR . pushEvent ( event ) ; sawFirstUpdate = true ; } break ; case INPUT_TYPE . PINCH_END : if ( currentPIR ) { currentPIR . pushEvent ( event ) ; } else { var pir = new ProtoIR ( ProtoIR . IGNORED_TYPE ) ; pir . pushEvent ( event ) ; protoIRs . push ( pir ) ; } currentPIR = undefined ; break ; } } ) ; return protoIRs ; }
The PinchBegin and the first PinchUpdate comprise a Response, then the rest of the PinchUpdates comprise an Animation.  RRRRRRRAAAAAAAAAAAAAAAAAAAA BBB UUU UUU UUU UUU UUU EEE
The PinchBegin and the first PinchUpdate comprise a Response then the rest of the PinchUpdates comprise an Animation . RRRRRRRAAAAAAAAAAAAAAAAAAAA BBB UUU UUU UUU UUU UUU EEE