@tileflow/maps 0.1.0-alpha.13 → 0.1.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -38
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/assets/streets/build-trees.mjs +163 -35
- package/assets/streets/fonts/DINish-Bold.ttf +0 -0
- package/assets/streets/fonts/DINish-Medium.ttf +0 -0
- package/assets/streets/fonts/LICENSE-DINish.txt +93 -0
- package/assets/streets/fonts/LICENSE-NotoSans.txt +94 -0
- package/assets/streets/fonts/LICENSE.txt +193 -0
- package/assets/streets/fonts/NotoSans-Bold.ttf +0 -0
- package/assets/streets/fonts/NotoSans-Italic.ttf +0 -0
- package/assets/streets/fonts/NotoSans-Regular.ttf +0 -0
- package/assets/streets/fonts/README.md +18 -0
- package/assets/streets/icons/streets-tree-conifer-dark.pattern.svg +200 -54
- package/assets/streets/icons/streets-tree-conifer.pattern.svg +200 -54
- package/assets/streets/icons/streets-tree-open-dark.pattern.svg +200 -105
- package/assets/streets/icons/streets-tree-open.pattern.svg +200 -105
- package/assets/streets/icons/streets-tree-round-dark.pattern.svg +158 -105
- package/assets/streets/icons/streets-tree-round.pattern.svg +158 -105
- package/assets/streets/icons/streets-tree-tall-dark.pattern.svg +156 -105
- package/assets/streets/icons/streets-tree-tall.pattern.svg +156 -105
- package/assets/streets/models/streets-tree-conifer.far.glb +0 -0
- package/assets/streets/models/streets-tree-conifer.glb +0 -0
- package/assets/streets/models/streets-tree-open.far.glb +0 -0
- package/assets/streets/models/streets-tree-open.glb +0 -0
- package/assets/streets/models/streets-tree-round.far.glb +0 -0
- package/assets/streets/models/streets-tree-round.glb +0 -0
- package/assets/streets/models/streets-tree-tall.far.glb +0 -0
- package/assets/streets/models/streets-tree-tall.glb +0 -0
- package/dist/index.d.ts +12 -6
- package/dist/index.js +107 -44
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ After installing and building this workspace, run from its root:
|
|
|
54
54
|
node packages/cli/dist/index.js preview --config packages/maps/tileflow.config.ts
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Open `http://127.0.0.1:3333`. Source edits reload in
|
|
57
|
+
Open `http://127.0.0.1:3333`. Source edits reload in Inspector without publishing.
|
|
58
58
|
Add `--scene nyc` for New York or `--against-theme dark --map streets-workbench` to compare themes.
|
|
59
59
|
The CLI owns the interface; compiler and runtime changes require rebuilding those packages.
|
|
60
60
|
|
|
@@ -77,7 +77,7 @@ to create an application-owned map.
|
|
|
77
77
|
### Streets appearance
|
|
78
78
|
|
|
79
79
|
Streets follows the visual direction of [Mapbox Standard](https://docs.mapbox.com/playground/standard-style/)
|
|
80
|
-
(twelve theme/time combinations), calibrated on 2026-10-18.
|
|
80
|
+
(twelve theme/time combinations), calibrated on 2026-10-18. Inspector offers **Default**, **Faded**, and
|
|
81
81
|
**Monochrome** in its Theme control, independently of the Time of day control's `day`, `dawn`,
|
|
82
82
|
`dusk`, and `night` presets. Each of the twelve combinations selects a complete theme, including
|
|
83
83
|
its map colors and artwork. Default retains the configuration key `light` for compatibility:
|
|
@@ -102,10 +102,9 @@ World's transport mode and POI type: metro, rail, tram, bus, ferry, cable-car, a
|
|
|
102
102
|
are distinct, as are bars, cafés, museums, galleries, car dealers, and places of worship by
|
|
103
103
|
religion.
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
road shields; water labels keep Italic. This is a visual approximation, not a bundled DIN face.
|
|
105
|
+
Streets packages DINish Medium for roads, house numbers and POIs, and Bold for shields, approximating
|
|
106
|
+
the reference's DIN Pro lettering. Other roles retain Noto Sans Regular, Bold and Italic. All
|
|
107
|
+
five faces ship with their licenses; DIN Pro is not bundled.
|
|
109
108
|
POI discs use vivid category colors, 20px containers, and fixed native icon scale at every zoom.
|
|
110
109
|
Maki's 15px artwork is composed into a centered 12px box, leaving room inside the 17px colored
|
|
111
110
|
interior. Their 1x and 2x atlases rasterize these SVG compositions separately; the map displays
|
|
@@ -150,9 +149,8 @@ closer views reuse that resolution, avoiding requests for coverage-dependent hig
|
|
|
150
149
|
it, set `terrain: 'none'` in a map extending `streets`. Hillshade does not change road geometry or
|
|
151
150
|
raise the terrain. Buildings appear automatically from zoom 15 with an opacity fade through 15.25;
|
|
152
151
|
the preview's **3D** control can hide them, and its **Trees** control enables vegetation.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
own colors.
|
|
152
|
+
Shields use 9 px DINish Bold and closer spacing at z11–13. Street names yield to destinations
|
|
153
|
+
and draw above flat footprints but below 3D buildings, with viewport-aligned letters.
|
|
156
154
|
3D lights use Standard's effective theme presets, retrieved on 2026-10-18: southern sun by day,
|
|
157
155
|
southeast at dawn, southwest at dusk and western moonlight at night. Monochrome has distinct
|
|
158
156
|
directions and strengths. Tileflow holds zoom 14+ values; Standard varies intensity below z14.
|
|
@@ -165,9 +163,13 @@ Street lights are opt-in: set `roads.streetLights.enabled: true`.
|
|
|
165
163
|
Core adds contact shade and rounded exterior corners. `buildings.threeDimensional.occlusion: false`
|
|
166
164
|
disables contact shade and model ambient occlusion; `buildings.contactShadow` styles the flat fallback.
|
|
167
165
|
Streets selects Core's `labels.roadPlacement: 'ground'`: street names follow the road plane below
|
|
168
|
-
buildings; POIs, transit names and shields remain above.
|
|
166
|
+
buildings; POIs, transit names and shields remain above.
|
|
167
|
+
Road names retain class zoom/size curves, favor major roads and add padding through z13.
|
|
168
|
+
Pedestrian paths group separately. Compact types preserve language;
|
|
169
|
+
`labels.roadNameFormat: 'full'` keeps source names.
|
|
170
|
+
Disabling roads omits their names.
|
|
169
171
|
Road rings, ramp and surface ordering use [Core's replaceable defaults](../core/docs/cartographic-defaults.md).
|
|
170
|
-
Streets owns
|
|
172
|
+
Streets owns colors, widths, typography and time-of-day themes.
|
|
171
173
|
Each theme paints a [street sky](../core/docs/street-sky.md) with night stars; `atmosphere: true`
|
|
172
174
|
on a globe map adds space around it. Mercator and native targets remain supported.
|
|
173
175
|
|
|
@@ -175,15 +177,14 @@ Streets enables model trees by default (`mode: '3d'`, `fallback: 'none'`). They
|
|
|
175
177
|
in overhead and tilted interactive browser views. Disabling vegetation removes all trees. Renderers
|
|
176
178
|
without model support omit them. Extensions can opt into the included flat crown artwork with
|
|
177
179
|
`vegetation: refine({mode: 'flat'})`, or switch it with explicit view mode using `mode: 'auto'`.
|
|
178
|
-
Seven
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
All
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
The models have 120–386 triangles nearby and 44–96 at distance. They reuse Core's instanced tree
|
|
180
|
+
Seven forms cover rounded, spreading and upright broadleaf trees, conifers, columns, feather and fan
|
|
181
|
+
palms. Light/dark crown images share their geometry. Rounded crowns have three large ovoid masses;
|
|
182
|
+
upright trees have an oval crown and two lower lobes. Open trees have curved, tapered leaves drooping
|
|
183
|
+
from branches; conifers are tiered. Broadleaf variants mix open and compact forms, smooth shading and
|
|
184
|
+
varied colors. An eight-metre visual minimum scales smaller trees and crowns proportionally without
|
|
185
|
+
changing source heights. All presets style bark and crowns independently.
|
|
186
|
+
|
|
187
|
+
The models have 222–386 triangles nearby and 44–78 at distance, using Core's instanced tree
|
|
187
188
|
renderer; flat crowns use the existing sprite atlas. Tree locations and attributes still come
|
|
188
189
|
from the source tiles. The artwork does not add trees to parks whose data has none. See
|
|
189
190
|
[3D trees](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/trees-3d.md) for
|
|
@@ -203,24 +204,22 @@ export default defineMap({
|
|
|
203
204
|
});
|
|
204
205
|
```
|
|
205
206
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
important ranks
|
|
209
|
-
|
|
210
|
-
Ordinary POI
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
candidates share one anchor to prevent duplicate names at world scale. Districts retain an overview
|
|
217
|
-
rank gate below z12; from z12 onward, source availability and collisions control their appearance
|
|
218
|
-
because World ranks can change between tile zooms. Street names use 0.15 em letter spacing and
|
|
207
|
+
POIs use World ranks with category density: parks and transport retain more detail than
|
|
208
|
+
businesses, hotels and religious sites. All categories share importance order; the two most
|
|
209
|
+
important ranks precede streets. Discs need names except parking and toilets. Native perspective and collisions select labels. See
|
|
210
|
+
[label placement](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/cartographic-defaults.md#label-density-and-perspective).
|
|
211
|
+
Ordinary POI/transit names use 13 px, major destinations 18 px. World size rank zero alone does
|
|
212
|
+
not enlarge small parks. Text padding falls from 6 px to 4 px between z16 and z17; collision
|
|
213
|
+
determines which names fit.
|
|
214
|
+
|
|
215
|
+
Cities and districts hand over at z15, smaller settlements at z13. Co-located cities share one
|
|
216
|
+
anchor. Districts use rank gates below z12, then source availability and collisions. Street names use 0.15 em letter spacing and
|
|
219
217
|
a 1 px halo; administrative regions use bold lettering and water names use italic lettering.
|
|
220
|
-
|
|
218
|
+
Road spacing grows from 250 px at z13 to 300 at z15, 400 at z17 and 450 at z19 to curb repetition.
|
|
219
|
+
House numbers start at z17 with wide padding. Labels default to the local language.
|
|
221
220
|
|
|
222
|
-
The map uses Tileflow data and assets, including
|
|
223
|
-
reference
|
|
221
|
+
The map uses Tileflow data and assets, including packaged DINish and Noto Sans fonts. The
|
|
222
|
+
reference uses DIN Pro Medium, so font shapes and stroke weight
|
|
224
223
|
remain an approximation. Available POIs, abbreviated names,
|
|
225
224
|
proprietary landmark models, transit branding, and building detail can differ from the reference.
|
|
226
225
|
See [map design and asset provenance](https://github.com/tileflow/tileflow-sdk/blob/main/packages/maps/docs/design-and-assets.md).
|
|
@@ -272,7 +271,8 @@ The CLI and build integrations compile the selected directories into runtime ass
|
|
|
272
271
|
Baedeker, 1777 and Siegfried export `baedekerFonts`, `map1777Fonts` and `siegfriedFonts` for
|
|
273
272
|
their packaged Cormorant Garamond faces.
|
|
274
273
|
Cívica exports `civicaFonts` for DM Serif Text, Barlow Semi Condensed, and Noto Sans fallback.
|
|
275
|
-
Streets
|
|
274
|
+
Streets exports `streetsFonts` for its packaged navigation lettering and Noto Sans fallback.
|
|
275
|
+
Soundings and Blueprint declare Noto Sans URL glyph providers
|
|
276
276
|
from one immutable Hosted base-asset set, versioned independently of World data.
|
|
277
277
|
|
|
278
278
|
Omitting `icons` inherits the parent's directory list. Declaring a list replaces it; `[]` removes
|
|
@@ -326,7 +326,7 @@ The [design and asset notes](https://github.com/tileflow/tileflow-sdk/blob/main/
|
|
|
326
326
|
|
|
327
327
|
Streets offers three time-of-day families: `light` (displayed as Default), `faded`, and `monochrome`, each with
|
|
328
328
|
`day`, `dawn`, `dusk`, and `night`. For example, `theme="faded" timeOfDay="night"` resolves to
|
|
329
|
-
`dark-faded`.
|
|
329
|
+
`dark-faded`. Inspector shows these as separate Theme and Time of day controls. All twelve
|
|
330
330
|
concrete theme names remain available for existing applications and captures. This catalog
|
|
331
331
|
is inherited when extending Streets without overriding it.
|
|
332
332
|
See the [time-of-day contract](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/README.md#style-with-themes-and-semantic-modules).
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -136,6 +136,16 @@ catalog of its constituent open terrain sources and their individual attribution
|
|
|
136
136
|
at <https://mapterhorn.com/attribution/>. The compiled Style carries that link as source
|
|
137
137
|
attribution.
|
|
138
138
|
|
|
139
|
+
## Streets lettering
|
|
140
|
+
|
|
141
|
+
Streets includes unmodified DINish Medium and Bold TTF files from
|
|
142
|
+
[playbeing/dinish](https://github.com/playbeing/dinish/tree/a5f3b2a3b932336225815bf9005e3b72cc3de71c),
|
|
143
|
+
and unmodified Noto Sans Regular, Bold and Italic TTF files from
|
|
144
|
+
[notofonts/noto-fonts](https://github.com/notofonts/noto-fonts/tree/c971829a87e7920f960e7277c3dafd9bedd3c601).
|
|
145
|
+
Both families use the SIL Open Font License 1.1. Complete copyright and license notices are
|
|
146
|
+
included in `assets/streets/fonts/LICENSE-DINish.txt`, `LICENSE-NotoSans.txt`, and the combined
|
|
147
|
+
`LICENSE.txt`. DINish is an independent DIN-inspired font; DIN Pro is not redistributed.
|
|
148
|
+
|
|
139
149
|
## Cormorant Garamond
|
|
140
150
|
|
|
141
151
|
Baedeker, 1777 and Siegfried each include their own unmodified Cormorant Garamond Regular,
|
|
@@ -76,6 +76,101 @@ function crown(m, centre, radii, seed, far, farSides = 6) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
// Open foliage is a curved, two-sided blade with a raised midrib and drooping
|
|
80
|
+
// flanks. An ovate outline tapers to its tips, without a vertical, coin-like bevel.
|
|
81
|
+
function leafBlade(m, centre, radii, seed, far, tilt, shade) {
|
|
82
|
+
const yaw = Math.atan2(centre[0], centre[2]) + Math.sin(seed * golden) * 0.22;
|
|
83
|
+
const turn = ([x, y, z]) => {
|
|
84
|
+
const yy = y * Math.cos(tilt) - z * Math.sin(tilt);
|
|
85
|
+
const zz = y * Math.sin(tilt) + z * Math.cos(tilt);
|
|
86
|
+
return [x * Math.cos(yaw) + zz * Math.sin(yaw), yy, -x * Math.sin(yaw) + zz * Math.cos(yaw)];
|
|
87
|
+
};
|
|
88
|
+
const stations = far ? [-1, 0, 1] : [-1, -0.8, -0.45, 0, 0.45, 0.8, 1];
|
|
89
|
+
const width = radii[2],
|
|
90
|
+
length = radii[0];
|
|
91
|
+
const rows = stations.map((t) => {
|
|
92
|
+
const reach = Math.sqrt(1 - t * t) * (1 - t * 0.18);
|
|
93
|
+
return (Math.abs(t) === 1 ? [0] : [-1, 0, 1]).map((s) => {
|
|
94
|
+
const x = width * (s * reach + 0.08 * (1 - t * t));
|
|
95
|
+
const z = length * t;
|
|
96
|
+
const y =
|
|
97
|
+
radii[1] * (1 - t * t) -
|
|
98
|
+
length * (0.28 * t * t - 0.08 * t) -
|
|
99
|
+
width * (0.28 * s * s * reach - 0.1 * s * t);
|
|
100
|
+
return vertex(
|
|
101
|
+
m,
|
|
102
|
+
add(centre, turn([x, y, z])),
|
|
103
|
+
turn([0.56 * s - 0.1 * t, 1, 0.65 * t - 0.08 - 0.1 * s]),
|
|
104
|
+
shade * (1.02 - Math.abs(s) * 0.025),
|
|
105
|
+
);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
const outward = turn([0, 1, 0]);
|
|
109
|
+
for (let row = 0; row + 1 < rows.length; row++) {
|
|
110
|
+
const a = rows[row],
|
|
111
|
+
b = rows[row + 1];
|
|
112
|
+
for (let flank = 0; flank < 2; flank++) {
|
|
113
|
+
if (a.length === 1) face(m, a[0], b[flank], b[flank + 1], outward);
|
|
114
|
+
else if (b.length === 1) face(m, a[flank], b[0], a[flank + 1], outward);
|
|
115
|
+
else {
|
|
116
|
+
face(m, a[flank], b[flank], b[flank + 1], outward);
|
|
117
|
+
face(m, a[flank], b[flank + 1], a[flank + 1], outward);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Rounded ovoid crowns have smooth normals and an irregular low-poly silhouette.
|
|
124
|
+
function foliage(m, centre, radii, seed, far, {thin = false, tilt = 0, shade = 1} = {}) {
|
|
125
|
+
if (thin) return leafBlade(m, centre, radii, seed, far, tilt, shade);
|
|
126
|
+
const sides = far ? 8 : 10;
|
|
127
|
+
const rings = far ? 2 : 6;
|
|
128
|
+
const yaw = seed * golden;
|
|
129
|
+
const turn = ([x, y, z]) => {
|
|
130
|
+
const yy = y * Math.cos(tilt) - z * Math.sin(tilt);
|
|
131
|
+
const zz = y * Math.sin(tilt) + z * Math.cos(tilt);
|
|
132
|
+
return [x * Math.cos(yaw) + zz * Math.sin(yaw), yy, -x * Math.sin(yaw) + zz * Math.cos(yaw)];
|
|
133
|
+
};
|
|
134
|
+
const point = (n) => add(centre, turn(n.map((v, axis) => v * radii[axis])));
|
|
135
|
+
const top = vertex(m, point([0.08, 1, 0]), turn([0, 1, 0]), shade * 1.04);
|
|
136
|
+
const bottom = vertex(m, point([-0.06, -1, 0.04]), turn([0, -1, 0]), shade * 0.94);
|
|
137
|
+
const rows = [];
|
|
138
|
+
for (let row = 1; row < rings; row++) {
|
|
139
|
+
const latitude = (row * Math.PI) / rings;
|
|
140
|
+
const y = Math.cos(latitude);
|
|
141
|
+
const reach = Math.pow(Math.sin(latitude), 0.78);
|
|
142
|
+
rows.push(
|
|
143
|
+
Array.from({length: sides}, (_, side) => {
|
|
144
|
+
const angle = (side * tau) / sides + seed * 0.32;
|
|
145
|
+
const ripple = 1 + 0.07 * Math.sin(angle * 3 + seed) + 0.035 * Math.cos(angle * 5 - seed);
|
|
146
|
+
const width = reach * ripple * (1 - y * 0.08);
|
|
147
|
+
const x = Math.cos(angle) * width + y * 0.08;
|
|
148
|
+
const z = Math.sin(angle) * width;
|
|
149
|
+
const n = [
|
|
150
|
+
(Math.cos(angle) * reach) / radii[0],
|
|
151
|
+
y / radii[1],
|
|
152
|
+
(Math.sin(angle) * reach) / radii[2],
|
|
153
|
+
];
|
|
154
|
+
return vertex(m, point([x, y, z]), turn(n), shade * (0.98 + y * 0.04));
|
|
155
|
+
}),
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
for (let side = 0; side < sides; side++) {
|
|
159
|
+
const next = (side + 1) % sides;
|
|
160
|
+
face(m, top, rows[0][side], rows[0][next], turn([0, 1, 0]));
|
|
161
|
+
for (let row = 0; row + 1 < rows.length; row++) {
|
|
162
|
+
const outward = turn([
|
|
163
|
+
Math.cos((side * tau) / sides + seed * 0.32),
|
|
164
|
+
0,
|
|
165
|
+
Math.sin((side * tau) / sides + seed * 0.32),
|
|
166
|
+
]);
|
|
167
|
+
face(m, rows[row][side], rows[row + 1][side], rows[row + 1][next], outward);
|
|
168
|
+
face(m, rows[row][side], rows[row + 1][next], rows[row][next], outward);
|
|
169
|
+
}
|
|
170
|
+
face(m, bottom, rows.at(-1)[next], rows.at(-1)[side], turn([0, -1, 0]));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
79
174
|
function branch(m, from, to, base, tip, sides) {
|
|
80
175
|
const axis = unit(sub(to, from));
|
|
81
176
|
const u = unit(cross(axis, Math.abs(axis[1]) > 0.9 ? [1, 0, 0] : [0, 1, 0]));
|
|
@@ -99,54 +194,87 @@ function branch(m, from, to, base, tip, sides) {
|
|
|
99
194
|
}
|
|
100
195
|
}
|
|
101
196
|
|
|
197
|
+
// Compact, upright and open trees have different branching architectures, not the
|
|
198
|
+
// same set of spheres stretched along an axis. Lobes carry a stable material shade.
|
|
102
199
|
const broadleaf = {
|
|
103
200
|
round: [
|
|
104
|
-
[-1.
|
|
105
|
-
[1.
|
|
106
|
-
[0.
|
|
107
|
-
|
|
108
|
-
|
|
201
|
+
[-1.5, 6.9, 0.45, 2.25, 2.5, 2.0, -0.22, 1.05],
|
|
202
|
+
[1.8, 6.15, 0.45, 2.05, 2.15, 1.8, 0.25, 0.82],
|
|
203
|
+
[0.1, 7.7, -1.0, 2.0, 2.55, 1.85, 0.12, 1.13],
|
|
204
|
+
],
|
|
205
|
+
tall: [
|
|
206
|
+
[-0.55, 9.15, -0.25, 2.15, 3.3, 2.0, -0.1, 1.14],
|
|
207
|
+
[1.8, 6.05, 0.5, 1.6, 1.75, 1.45, 0.32, 0.78],
|
|
208
|
+
[-1.7, 5.45, 0.8, 1.45, 1.65, 1.4, -0.32, 0.91],
|
|
109
209
|
],
|
|
110
210
|
open: [
|
|
111
|
-
[-
|
|
112
|
-
[
|
|
113
|
-
[0.
|
|
114
|
-
[
|
|
115
|
-
[
|
|
211
|
+
[-0.7, 8.1, -0.4, 1.3, 0.23, 1.05, 0.12, 1.13],
|
|
212
|
+
[0.95, 7.9, -0.65, 1.45, 0.22, 1.15, 0.25, 1.08],
|
|
213
|
+
[-2.0, 7.0, 0.65, 1.5, 0.22, 1.1, 0.55, 0.95],
|
|
214
|
+
[0.1, 7.7, 1.15, 1.5, 0.24, 1.2, 0.38, 1.18],
|
|
215
|
+
[2.0, 7.1, 0.3, 1.45, 0.2, 1.05, 0.6, 1.04],
|
|
216
|
+
[-0.35, 7.3, -1.65, 1.35, 0.23, 1.15, 0.42, 1.0],
|
|
217
|
+
[-1.85, 6.0, -0.65, 1.25, 0.24, 1.0, 0.85, 0.79],
|
|
218
|
+
[1.65, 6.1, 1.0, 1.35, 0.22, 1.1, 0.9, 0.86],
|
|
219
|
+
[-0.4, 6.6, 1.8, 1.2, 0.2, 1.0, 0.75, 0.93],
|
|
220
|
+
[0.6, 6.2, -1.5, 1.3, 0.24, 1.0, 0.8, 0.75],
|
|
116
221
|
],
|
|
117
|
-
|
|
118
|
-
[-
|
|
119
|
-
[1.
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[0,
|
|
222
|
+
conifer: [
|
|
223
|
+
[-0.25, 10.1, 0.05, 1.05, 0.4, 0.95, 0.2, 1.14],
|
|
224
|
+
[1.1, 8.8, -0.4, 1.5, 0.35, 1.15, -0.35, 1.06],
|
|
225
|
+
[-1.35, 8.4, 0.25, 1.55, 0.35, 1.2, 0.45, 1.1],
|
|
226
|
+
[0.1, 7.75, 1.4, 1.5, 0.3, 1.25, -0.3, 1.0],
|
|
227
|
+
[-0.55, 7.35, -1.4, 1.55, 0.35, 1.25, 0.35, 0.98],
|
|
228
|
+
[1.75, 6.4, 0.25, 1.65, 0.35, 1.25, -0.5, 0.88],
|
|
229
|
+
[-1.85, 5.9, -0.25, 1.65, 0.35, 1.3, 0.45, 0.91],
|
|
230
|
+
[0.35, 5.2, 1.65, 1.75, 0.3, 1.3, -0.6, 0.82],
|
|
231
|
+
[-0.25, 4.8, -1.4, 1.65, 0.35, 1.2, 0.5, 0.8],
|
|
232
|
+
[0, 6.7, 0.05, 1.25, 0.35, 1.1, -0.2, 0.95],
|
|
123
233
|
],
|
|
124
234
|
};
|
|
125
235
|
|
|
126
236
|
function deciduous(form, far) {
|
|
127
237
|
const bark = mesh('bark');
|
|
128
|
-
const
|
|
129
|
-
const
|
|
238
|
+
const thin = form === 'open' || form === 'conifer';
|
|
239
|
+
const leaves = mesh(thin ? 'fronds' : 'leaves');
|
|
240
|
+
const upright = form === 'tall' || form === 'conifer';
|
|
130
241
|
const foot = [0, 0, 0];
|
|
131
|
-
const waist = [0.
|
|
132
|
-
const fork = [0.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
branch(bark,
|
|
136
|
-
|
|
242
|
+
const waist = [0.08, 0.9, -0.02];
|
|
243
|
+
const fork = [upright ? -0.18 : 0.16, upright ? 3.5 : 3.2, -0.08];
|
|
244
|
+
const trunkSides = far ? 3 : 6;
|
|
245
|
+
branch(bark, foot, waist, upright ? 0.47 : 0.55, 0.33, trunkSides);
|
|
246
|
+
branch(bark, waist, fork, 0.33, 0.26, trunkSides);
|
|
247
|
+
const limbs = thin
|
|
248
|
+
? [
|
|
249
|
+
[-1.0, 7.3, 0.15],
|
|
250
|
+
[1.1, 6.65, -0.25],
|
|
251
|
+
[0.25, 5.0, 0.7],
|
|
252
|
+
]
|
|
253
|
+
: broadleaf[form].map((lobe) => lobe.slice(0, 3));
|
|
254
|
+
for (const [i, end] of limbs.entries()) {
|
|
255
|
+
const elbow = add(fork, mul(sub(end, fork), 0.52));
|
|
256
|
+
elbow[0] += i === 1 ? 0.18 : -0.15;
|
|
257
|
+
if (far) branch(bark, fork, end, 0.21, 0.055, 3);
|
|
258
|
+
else {
|
|
259
|
+
branch(bark, fork, elbow, 0.24 - i * 0.035, 0.14, 4);
|
|
260
|
+
branch(bark, elbow, end, 0.14, 0.045, 4);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
137
263
|
for (const [i, lobe] of broadleaf[form].entries()) {
|
|
138
264
|
const centre = lobe.slice(0, 3);
|
|
139
|
-
if (far) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
branch(bark,
|
|
265
|
+
if (thin && !far) {
|
|
266
|
+
const limb = limbs[i % limbs.length];
|
|
267
|
+
const start = add(
|
|
268
|
+
fork,
|
|
269
|
+
mul(sub(limb, fork), Math.min(1, (centre[1] - fork[1]) / (limb[1] - fork[1]))),
|
|
270
|
+
);
|
|
271
|
+
branch(bark, start, centre, 0.1, 0.025, 3);
|
|
146
272
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
273
|
+
foliage(leaves, centre, lobe.slice(3, 6), i + form.length, far, {
|
|
274
|
+
thin,
|
|
275
|
+
tilt: lobe[6],
|
|
276
|
+
shade: lobe[7],
|
|
277
|
+
});
|
|
150
278
|
}
|
|
151
279
|
return [bark, leaves];
|
|
152
280
|
}
|
|
@@ -396,7 +524,7 @@ export function buildStreetsTrees() {
|
|
|
396
524
|
['far', far],
|
|
397
525
|
]) {
|
|
398
526
|
const triangles = parts.reduce((n, m) => n + m.indices.length / 3, 0);
|
|
399
|
-
if (triangles > (level === 'near' ? 700 :
|
|
527
|
+
if (triangles > (level === 'near' ? 700 : 120))
|
|
400
528
|
throw new Error(`${id} ${level}: ${triangles} triangles exceeds the Streets budget`);
|
|
401
529
|
files.set(`models/${id}${level === 'far' ? '.far' : ''}.glb`, glb(parts, id));
|
|
402
530
|
catalogue.push({id, level, triangles});
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2021 The DINish Project Authors (https://github.com/playbeing/dinish)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Copyright 2018 The Noto Project Authors (github.com/googlei18n/noto-fonts)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License,
|
|
4
|
+
Version 1.1.
|
|
5
|
+
|
|
6
|
+
This license is copied below, and is also available with a FAQ at:
|
|
7
|
+
http://scripts.sil.org/OFL
|
|
8
|
+
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
PREAMBLE
|
|
14
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
15
|
+
development of collaborative font projects, to support the font
|
|
16
|
+
creation efforts of academic and linguistic communities, and to
|
|
17
|
+
provide a free and open framework in which fonts may be shared and
|
|
18
|
+
improved in partnership with others.
|
|
19
|
+
|
|
20
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
22
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
+
redistributed and/or sold with any software provided that any reserved
|
|
24
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
+
however, cannot be released under any other type of license. The
|
|
26
|
+
requirement for fonts to remain under this license does not apply to
|
|
27
|
+
any document created using the fonts or their derivatives.
|
|
28
|
+
|
|
29
|
+
DEFINITIONS
|
|
30
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
31
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
32
|
+
include source files, build scripts and documentation.
|
|
33
|
+
|
|
34
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
35
|
+
copyright statement(s).
|
|
36
|
+
|
|
37
|
+
"Original Version" refers to the collection of Font Software
|
|
38
|
+
components as distributed by the Copyright Holder(s).
|
|
39
|
+
|
|
40
|
+
"Modified Version" refers to any derivative made by adding to,
|
|
41
|
+
deleting, or substituting -- in part or in whole -- any of the
|
|
42
|
+
components of the Original Version, by changing formats or by porting
|
|
43
|
+
the Font Software to a new environment.
|
|
44
|
+
|
|
45
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
46
|
+
writer or other person who contributed to the Font Software.
|
|
47
|
+
|
|
48
|
+
PERMISSION & CONDITIONS
|
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
50
|
+
a copy of the Font Software, to use, study, copy, merge, embed,
|
|
51
|
+
modify, redistribute, and sell modified and unmodified copies of the
|
|
52
|
+
Font Software, subject to the following conditions:
|
|
53
|
+
|
|
54
|
+
1) Neither the Font Software nor any of its individual components, in
|
|
55
|
+
Original or Modified Versions, may be sold by itself.
|
|
56
|
+
|
|
57
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
58
|
+
redistributed and/or sold with any software, provided that each copy
|
|
59
|
+
contains the above copyright notice and this license. These can be
|
|
60
|
+
included either as stand-alone text files, human-readable headers or
|
|
61
|
+
in the appropriate machine-readable metadata fields within text or
|
|
62
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
63
|
+
|
|
64
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
65
|
+
Name(s) unless explicit written permission is granted by the
|
|
66
|
+
corresponding Copyright Holder. This restriction only applies to the
|
|
67
|
+
primary font name as presented to the users.
|
|
68
|
+
|
|
69
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
70
|
+
Software shall not be used to promote, endorse or advertise any
|
|
71
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
72
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
73
|
+
permission.
|
|
74
|
+
|
|
75
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
76
|
+
must be distributed entirely under this license, and must not be
|
|
77
|
+
distributed under any other license. The requirement for fonts to
|
|
78
|
+
remain under this license does not apply to any document created using
|
|
79
|
+
the Font Software.
|
|
80
|
+
|
|
81
|
+
TERMINATION
|
|
82
|
+
This license becomes null and void if any of the above conditions are
|
|
83
|
+
not met.
|
|
84
|
+
|
|
85
|
+
DISCLAIMER
|
|
86
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
87
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
88
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
89
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
90
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
91
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
92
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
94
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|