function projectTransformTo2D(
  transform,
  modelMatrix,
  nodeTransform,
  frameState,
  result,
) {
  let projectedTransform = Matrix4.multiplyTransformation(
    modelMatrix,
    transform,
    projectedTransformScratch,
  );

  projectedTransform = Matrix4.multiplyTransformation(
    projectedTransform,
    nodeTransform,
    projectedTransformScratch,
  );

  result = Transforms.basisTo2D(
    frameState.mapProjection,
    projectedTransform,
    result,
  );

  return result;
}
Process a node. This modifies the following parts of the render resources:
<ul>
 <li> creates buffers for the typed arrays of each attribute, if they do not yet exist
 <li> adds attribute declarations for the instancing vertex attributes in the vertex shader</li>
 <li> sets the instancing translation min and max to compute an accurate bounding volume</li>
</ul>

If the scene is in either 2D or CV mode, this stage also:
<ul>
 <li> adds additional attributes for the transformation attributes projected to 2D
 <li> adds a flag to the shader to use the 2D instanced attributes
 <li> adds a uniform for the view model matrix in 2D
</ul>

@param {NodeRenderResources} renderResources The render resources for this node.
@param {ModelComponents.Node} node The node.
@param {FrameState} frameState The frame state.