So, I figured a few things out about wade.getSpritesInArea. It actually works great! To make sure I grab all the terrain Sprites, I have to cast a wider net, since the Camera Bounds ultimately refer to the limits of where I can move the *center* of the screen.
The real bizarre behavior is with Sprite.drawToImage. Here's my understanding of what to do.
The first thing to do is to make a transparent sprite with a no-op draw function, set its size to the desired image size (about), and then draw the transparent sprite.
Then, for each sprite you got back from wade.getSpritesInArea, call sprite.drawToImage(path, false, position, transform).
The keys here are the position and transform parameters.
The sprites are big, and if you are drawing them to a small image, you need to make the sprites smaller. For example, you can quarter the size of the sprite using the transform
var transform = { horizontalScale: 0.5, verticalScale: 0.5 }
To position the multiple sprites as they are in your game, you want to use
position = sprite.getPosition(),
but this fails because of the transform, which throws off the sprite position in the resulting image. To fix this (in this example), you have to then call
position.x *= 2; position.y *= 2;
to "undo" the effects of the transform on the position.
Once you do that, it will seem like it worked! For me, I was I able to draw a tiny minimap with my fog of war right on top of it.
But this all broke down when I tried to batch the Sprite.drawToImage operations using setTimeout (and wade.setTimeout). All the sprites will still draw to the correct positions, but somewhere around 1/4 of the way through my sprites array, the Sprite.drawToImage breaks, and each sprite drawn to the virtual image is much smaller than it should be, although it is positioned correctly.
All that suggests that the virtual image must be drawn to all at once, uninterrupted, or else the process breaks down somewhere.
It's weird behavior. But for my use case, I've found that Sprite.drawToImage takes too long to draw, so even batching doesn't improve performance enough to stop my game from stuttering.