maptalks / maptalks.js

A light and plugable JavaScript library for integrated 2D/3D maps.
https://maptalks.org
BSD 3-Clause "New" or "Revised" License
4.29k stars 502 forks source link

Set Up Zero-point Perspective #1647

Open arthurtalkgoal opened 2 years ago

arthurtalkgoal commented 2 years ago

maptalks's version and what browser you use?

My Version:

Issue description

The client need to set up "Zero-point perspective", but we find not setting upon perspective in Maptalks.

We develop the geojson 2D map which is good everything but the parallel lines is vanishing in a far point.

image

It did not meet the 0 perspective requirements from them. An example they quoted is like SimCity game:

image

Is there any way that we can workaround the zero perspective in Maptalks

Please provide a reproduction URL (on any jsfiddle like site)

reference: https://www.artistsnetwork.com/art-techniques/perspective/zero-point-perspective-ever-hear-of-it/

fuzhenn commented 2 years ago

Did some research, if my understanding of zero-point perspective was right, maybe this can be implemented by changing camera's projection matrix from perspective to Orthographic, just like blender doc shows: https://docs.blender.org/manual/en/3.2/editors/3dview/navigate/projections.html