W icon indicating copy to clipboard operation
W copied to clipboard

How to adjust camera distance?

Open Lukenickerson opened this issue 10 months ago • 4 comments

The near and far values (the min and max values for the camera's frustrum?) are hard-coded to 1 and 1000. It would be useful to be able to adjust these. (Currently I'm working on a prototype of a solar system, and I'd like to use larger numbers for coordinates.)

I think this would involve adjusting the projection? https://github.com/xem/W/blob/gh-pages/w.js#L150 But I don't understand the math here. @xem I think this could be controlled via parameters on the camera method without adding too many bytes.

Lukenickerson avatar Apr 15 '24 18:04 Lukenickerson