dist/pixi-graph.umd.js
/**
       * Recursively culls the subtree of {@code displayObject}.
       *
       * @param rect - the visiblity rectangle
       * @param displayObject - the root of the subtree to cull
       * @param skipUpdate - whether to skip bounds calculation. However, transforms are expected to be updated by the caller.
       */
Recursively culls the subtree of  displayObject.
@param rect - the visiblity rectangle
@param displayObject - the root of the subtree to cull
@param skipUpdate - whether to skip bounds calculation. However, transforms are expected to be updated by the caller.
Recursively culls the subtree of displayObject . @param rect - the visiblity rectangle @param displayObject - the root of the subtree to cull @param skipUpdate - whether to skip bounds calculation . However transforms are expected to be updated by the caller .
cullRecursive(rect, displayObject, skipUpdate)
      {
          const bounds = skipUpdate
              ? displayObject._bounds.getRectangle(tempRect)
              : displayObject.getBounds(true, tempRect);
          displayObject[this._toggle] = bounds.right > rect.left
              && bounds.left < rect.right
              && bounds.bottom > rect.top
              && bounds.top < rect.bottom;
          const fullyVisible = bounds.left >= rect.left
              && bounds.top >= rect.top
              && bounds.right <= rect.right
              && bounds.bottom <= rect.bottom;
          if (!fullyVisible
                  && displayObject[this._toggle]
                  && (displayObject ).children
                  && (displayObject ).children.length)
          {
              const children = (displayObject ).children;
              for (let i = 0, j = children.length; i < j; i++)
              {
                  this.cullRecursive(rect, children[i]);
              }
          }
      }
cullRecursive ( rect , displayObject , skipUpdate ) { const bounds = skipUpdate ? displayObject . _bounds . getRectangle ( tempRect ) : displayObject . getBounds ( true , tempRect ) ; displayObject [ this . _toggle ] = bounds . right > rect . left && bounds . left < rect . right && bounds . bottom > rect . top && bounds . top < rect . bottom ; const fullyVisible = bounds . left >= rect . left && bounds . top >= rect . top && bounds . right <= rect . right && bounds . bottom <= rect . bottom ; if ( ! fullyVisible && displayObject [ this . _toggle ] && ( displayObject ) . children && ( displayObject ) . children . length ) { const children = ( displayObject ) . children ; for ( let i = 0 , j = children . length ; i < j ; i ++ ) { this . cullRecursive ( rect , children [ i ] ) ; } } }
Recursively culls the subtree of {@code displayObject}.
Recursively culls the subtree of { @code displayObject } .
// NOTE: getBounds can skipUpdate because updateTransform is invoked before culling. // Only cull children if this display-object is *not* fully-visible. It is expected that the bounds // of children lie inside of its own. Hence, further culling is only required if the display-object // intersects with the boundaries of "rect". Otherwise, if the object is fully outside/inside the // screen, the children don't need to be evaluated as they are presumed to be unculled.