iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.1k stars 298 forks source link

Factorize examples and tests shared code #1019

Closed jailln closed 5 years ago

jailln commented 5 years ago

I am writing an example which has code shared with already existing examples and with its tests. Where would be a good place to put shared functions between examples and tests ?

More generally, there already is code shared among existing examples that could be factorized in this to-be defined place.

zarov commented 5 years ago

This has always been a hot topic of discussion: what can we regroup between examples ? I think beside some helpers, we need to keep examples a minimum independent, to make them understandable without having to look everywhere, especially for someone that begins to have a look at itowns.

For your case, I would say that you can put it inside examples/js.

jailln commented 5 years ago

Ok, thanks for your response.

In my case, I factorized the helpers not directly related to iTowns use and left the rest as is (i.e. duplicated). I'll close the issue and I suppose we will discuss it further on a case to case basis directly in the PR if needed.