@adatechnology/game-urban-three 0.5.3 → 0.5.5
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/dist/{chunk-QS2K4DEO.js → chunk-IZH7YXT7.js} +6 -1
- package/dist/chunk-IZH7YXT7.js.map +1 -0
- package/dist/index.global.js +247 -69
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/testing.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-QS2K4DEO.js.map +0 -1
package/dist/index.global.js
CHANGED
|
@@ -135,6 +135,66 @@ var GameUrbanThree = (() => {
|
|
|
135
135
|
node.userData[KIT_ORIGIN_KEY] = { ...origin };
|
|
136
136
|
return object2;
|
|
137
137
|
}
|
|
138
|
+
var NO_COVER = -Infinity;
|
|
139
|
+
function createGridRainCover(options) {
|
|
140
|
+
const [x0, z0, x1, z1] = options.bounds;
|
|
141
|
+
const cell = options.cellSize ?? 0.25;
|
|
142
|
+
const columns = Math.max(1, Math.ceil((x1 - x0) / cell));
|
|
143
|
+
const rows = Math.max(1, Math.ceil((z1 - z0) / cell));
|
|
144
|
+
const cells = new Float32Array(columns * rows);
|
|
145
|
+
let revision = 0;
|
|
146
|
+
let isCut = false;
|
|
147
|
+
const cut = () => {
|
|
148
|
+
for (let row = 0; row < rows; row++) {
|
|
149
|
+
for (let column = 0; column < columns; column++) {
|
|
150
|
+
const top = options.coverTopAt(x0 + (column + 0.5) * cell, z0 + (row + 0.5) * cell);
|
|
151
|
+
cells[row * columns + column] = top === void 0 ? NO_COVER : top;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
isCut = true;
|
|
155
|
+
};
|
|
156
|
+
return {
|
|
157
|
+
bounds: () => options.bounds,
|
|
158
|
+
coverTopAt(x, z) {
|
|
159
|
+
if (!isCut) cut();
|
|
160
|
+
const column = Math.floor((x - x0) / cell);
|
|
161
|
+
const row = Math.floor((z - z0) / cell);
|
|
162
|
+
if (column < 0 || row < 0 || column >= columns || row >= rows) return void 0;
|
|
163
|
+
const top = cells[row * columns + column];
|
|
164
|
+
return top === NO_COVER ? void 0 : top;
|
|
165
|
+
},
|
|
166
|
+
version: () => revision,
|
|
167
|
+
invalidate() {
|
|
168
|
+
isCut = false;
|
|
169
|
+
revision++;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
var prepare = (f) => ({ x: f.x, z: f.z, halfX: f.halfX, halfZ: f.halfZ, cos: Math.cos(f.yaw), sin: Math.sin(f.yaw), top: f.top });
|
|
174
|
+
var insideTurned = (f, x, z) => {
|
|
175
|
+
const dx = x - f.x;
|
|
176
|
+
const dz = z - f.z;
|
|
177
|
+
return Math.abs(dx * f.cos + dz * f.sin) <= f.halfX && Math.abs(-dx * f.sin + dz * f.cos) <= f.halfZ;
|
|
178
|
+
};
|
|
179
|
+
var FIXED_COVER_MAX_CELLS = 1e6;
|
|
180
|
+
function createFixedFootprintRainCover(footprints, cellSize = 0.5) {
|
|
181
|
+
const roofs = footprints.map(prepare);
|
|
182
|
+
if (roofs.length === 0) return { bounds: () => [0, 0, 0, 0], coverTopAt: () => void 0, version: () => 0 };
|
|
183
|
+
const x0 = Math.min(...roofs.map((r) => r.x - Math.abs(r.halfX * r.cos) - Math.abs(r.halfZ * r.sin)));
|
|
184
|
+
const x1 = Math.max(...roofs.map((r) => r.x + Math.abs(r.halfX * r.cos) + Math.abs(r.halfZ * r.sin)));
|
|
185
|
+
const z0 = Math.min(...roofs.map((r) => r.z - Math.abs(r.halfX * r.sin) - Math.abs(r.halfZ * r.cos)));
|
|
186
|
+
const z1 = Math.max(...roofs.map((r) => r.z + Math.abs(r.halfX * r.sin) + Math.abs(r.halfZ * r.cos)));
|
|
187
|
+
const cell = Math.max(cellSize, Math.sqrt((x1 - x0) * (z1 - z0) / FIXED_COVER_MAX_CELLS));
|
|
188
|
+
return createGridRainCover({
|
|
189
|
+
bounds: [x0, z0, x1, z1],
|
|
190
|
+
cellSize: cell,
|
|
191
|
+
coverTopAt(x, z) {
|
|
192
|
+
let top;
|
|
193
|
+
for (const roof of roofs) if ((top === void 0 || roof.top > top) && insideTurned(roof, x, z)) top = roof.top;
|
|
194
|
+
return top;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
138
198
|
var SURFACE_IDS = ["concrete", "asphalt", "wood", "tile", "dirt", "grass", "gravel", "sand", "metal", "water", "glass", "carpet"];
|
|
139
199
|
var GAIT_IDS = ["walk", "run"];
|
|
140
200
|
var LANDING_IDS = ["light", "heavy"];
|
|
@@ -9811,8 +9871,9 @@ var GameUrbanThree = (() => {
|
|
|
9811
9871
|
c.rod(new V3(hx + 0.88, ih + 0.97, z - 0.05), new V3(hx + 0.78, ih + 1.12, z - 0.05), 0.012, MT.chrome);
|
|
9812
9872
|
c.sphere(0.025, MT.plastic, hx + 0.78, ih + 1.12, z - 0.05);
|
|
9813
9873
|
});
|
|
9814
|
-
kit.seat(c, hx + 0.05, ih, 0.45, { w: 0.52, h: 0.62, back: 0.6, lean: 0.12, mat: CM("#25282b", { roughness: 0.8 }) });
|
|
9815
|
-
kit.seat(c, hx + 0.05, ih, -0.45, { w: 0.52, h: 0.62, back: 0.6, lean: 0.12, mat: CM("#25282b", { roughness: 0.8 }) });
|
|
9874
|
+
kit.seat(c, hx + 0.05, ih, 0.45, { w: 0.52, h: 0.62, back: 0.6, lean: 0.12, mat: CM("#25282b", { roughness: 0.8 }), role: "front_passenger" });
|
|
9875
|
+
kit.seat(c, hx + 0.05, ih, -0.45, { w: 0.52, h: 0.62, back: 0.6, lean: 0.12, mat: CM("#25282b", { roughness: 0.8 }), id: "driver", role: "driver" });
|
|
9876
|
+
c.addDoor({ id: "cabin_door", widthMetres: 0.72, heightMetres: 1.65 });
|
|
9816
9877
|
c.roundBox(0.45, 0.42, 1.9, 0.04, CM("#25282b", { roughness: 0.8 }), hx - 1.35, ih + 0.21, 0.1);
|
|
9817
9878
|
c.seatTops.push({ x: hx - 1.35, y: ih + 0.44, z: 0.1, w: 1.8, l: 0.4 });
|
|
9818
9879
|
c.roundBox(3, 0.02, 2, 0.01, CM("#3a3f44", { roughness: 0.9 }), hx, hy0 + hh - 0.06, 0).castShadow = false;
|
|
@@ -10753,8 +10814,9 @@ var GameUrbanThree = (() => {
|
|
|
10753
10814
|
m.tumble = T;
|
|
10754
10815
|
m.frontQuad = qf;
|
|
10755
10816
|
if (intr && s.shelf) {
|
|
10756
|
-
const sx0 = gh.rb + 0.03, sx1 = gh.rb + s.shelf;
|
|
10757
|
-
|
|
10817
|
+
const sx0 = gh.rb + 0.03, sx1 = Math.min(gh.rb + s.shelf, gh.rb + 0.26);
|
|
10818
|
+
if (sx1 > sx0 + 0.04)
|
|
10819
|
+
c.roundBox(sx1 - sx0, 0.014, gh.Wg - 0.24, 6e-3, CM("#1b1c1e", { roughness: 0.92 }), (sx0 + sx1) / 2, gh.belt - 0.02, 0).castShadow = false;
|
|
10758
10820
|
}
|
|
10759
10821
|
if (intr)
|
|
10760
10822
|
kit.interior(
|
|
@@ -10765,11 +10827,17 @@ var GameUrbanThree = (() => {
|
|
|
10765
10827
|
ft: gh.ft,
|
|
10766
10828
|
rb: gh.rb,
|
|
10767
10829
|
rt: gh.rt,
|
|
10768
|
-
roof:
|
|
10830
|
+
roof: gh.roof + 0.02,
|
|
10769
10831
|
belt: gh.belt,
|
|
10770
|
-
floor: s.bottomY + 0.
|
|
10832
|
+
floor: s.bottomY + 0.02,
|
|
10833
|
+
seatH: 0.12,
|
|
10834
|
+
dashD: 0.32,
|
|
10835
|
+
dashH: 0.24,
|
|
10836
|
+
visorUp: true,
|
|
10771
10837
|
zIn: gh.Wg / 2 - 0.09,
|
|
10772
10838
|
zRoof: halfAt(gh.Wg, T, gh.roof) - 0.12,
|
|
10839
|
+
xFront: s.shelf ? gh.fb - 0.86 : void 0,
|
|
10840
|
+
rowPitch: s.shelf ? 0.72 : void 0,
|
|
10773
10841
|
xRear: gh.rb + 0.06
|
|
10774
10842
|
},
|
|
10775
10843
|
intr
|
|
@@ -11317,7 +11385,7 @@ var GameUrbanThree = (() => {
|
|
|
11317
11385
|
]);
|
|
11318
11386
|
c2.roundBox(0.03, 0.05, 0.16, 0.012, MT.trim, I.S.endX(-1, 0.84) - 0.01, 0.84, 0);
|
|
11319
11387
|
},
|
|
11320
|
-
interior: { rows: 2, col: "#4a4c52", trim: "#26272a" },
|
|
11388
|
+
interior: { rows: 2, col: "#4a4c52", trim: "#26272a", rowPitch: 0.72 },
|
|
11321
11389
|
hood: { motor: "gasoline" },
|
|
11322
11390
|
wheels: [
|
|
11323
11391
|
[1.17, 0.2875, 0.175, wheelOpts("hubcap")],
|
|
@@ -12817,7 +12885,7 @@ var GameUrbanThree = (() => {
|
|
|
12817
12885
|
const lip = K.grid(-1, 0, { z1: 0.7, y0: 0.88, y1: 0.97, du: 0.03, dv: 0.02 });
|
|
12818
12886
|
K.skin(lip, GLOSS, { u0: 0.05, u1: 0.95, yb: 0.925, yt: 0.955, off: 0.016, thick: 0.02, nv: 2 });
|
|
12819
12887
|
},
|
|
12820
|
-
interior: { rows: 2, col: "#1c1d20", trim: "#121316" },
|
|
12888
|
+
interior: { rows: 2, col: "#1c1d20", trim: "#121316", xFront: -0.46, rowPitch: 0.62 },
|
|
12821
12889
|
hood: { motor: "v8_na" },
|
|
12822
12890
|
wheels: [
|
|
12823
12891
|
[1.35, 0.3435, 0.255, { rim: ALLOYD, spokeMat: ALLOY, spokes: 10, rimR: 0.72 }],
|
|
@@ -13078,16 +13146,20 @@ var GameUrbanThree = (() => {
|
|
|
13078
13146
|
x: xd - 0.07,
|
|
13079
13147
|
y: belt + 0.02,
|
|
13080
13148
|
w: zi * 2,
|
|
13081
|
-
d: 0.
|
|
13082
|
-
h: Math.min(0.
|
|
13149
|
+
d: 0.34,
|
|
13150
|
+
h: Math.min(0.28, belt - fl - 0.16),
|
|
13083
13151
|
drv: -zi * 0.52,
|
|
13084
13152
|
mat: trim,
|
|
13085
13153
|
top: fab
|
|
13086
13154
|
});
|
|
13087
13155
|
kit.steeringWheel(c, xd - 0.66, belt + 0.06, -zi * 0.52, { r: 0.22, tilt: 1.12, col: 0.5, mat: trim });
|
|
13088
13156
|
const sx = Math.max(f - len2 + 0.62, xd - 1.08);
|
|
13089
|
-
kit.seat(c, sx, fl, -zi * 0.52, { w: 0.
|
|
13090
|
-
kit.seat(c, sx, fl, zi * 0.42, { w: zi * 0.98, n: 2, mat: fab, h: 0.
|
|
13157
|
+
kit.seat(c, sx, fl, -zi * 0.52, { w: 0.52, mat: fab, h: 0.24, back: 0.64, lean: 0.18, id: "driver", role: "driver" });
|
|
13158
|
+
kit.seat(c, sx, fl, zi * 0.42, { w: zi * 0.98, n: 2, mat: fab, h: 0.24, back: 0.6, lean: 0.18, role: "front_passenger" });
|
|
13159
|
+
const doorW = Math.max(0.75, f - 0.1 - (xr - 0.06));
|
|
13160
|
+
const doorH = Math.max(1.05, ry - fl - 0.1);
|
|
13161
|
+
c.addDoor({ id: "door_front_left", widthMetres: Math.round(doorW * 1e3) / 1e3, heightMetres: Math.round(doorH * 1e3) / 1e3 });
|
|
13162
|
+
c.addDoor({ id: "door_front_right", widthMetres: Math.round(doorW * 1e3) / 1e3, heightMetres: Math.round(doorH * 1e3) / 1e3 });
|
|
13091
13163
|
c.rod(new V3(sx + 0.55, fl, -0.05), new V3(sx + 0.5, fl + 0.48, -0.08), 0.014, MT.chrome);
|
|
13092
13164
|
c.sphere(0.035, MT.plastic, sx + 0.5, fl + 0.5, -0.08);
|
|
13093
13165
|
c.roundBox(0.03, ry - fl - 0.12, zi * 2, 0.01, trim, f - len2 + 0.07, (ry + fl) / 2, 0);
|
|
@@ -13864,7 +13936,8 @@ var GameUrbanThree = (() => {
|
|
|
13864
13936
|
kit.busRows(c, { x0: dx0 - 0.15, x1: -4.15, pitch: 0.64, floor: fl, zIn: zi, aisle: 0.46, col: "#355a7a", ceil: 2.95, seatH: 0.4 });
|
|
13865
13937
|
kit.dashboard(c, { x: f - 0.05, y: 1.42, w: zi * 2, d: 0.42, h: 0.4, drv: -0.7, mat: CM("#202124"), top: CM("#2a2b2e") });
|
|
13866
13938
|
kit.steeringWheel(c, f - 0.6, 1.48, -0.7, { r: 0.25, tilt: 1.1, col: 0.45 });
|
|
13867
|
-
kit.seat(c, f - 1.05, fl, -0.7, { w: 0.5, mat: CM("#2c2d30", { roughness: 0.85 }), h: 0.45 });
|
|
13939
|
+
kit.seat(c, f - 1.05, fl, -0.7, { w: 0.5, mat: CM("#2c2d30", { roughness: 0.85 }), h: 0.45, id: "driver", role: "driver" });
|
|
13940
|
+
c.addDoor({ id: "door_front_right", widthMetres: 0.85, heightMetres: 1.95 });
|
|
13868
13941
|
c.roundBox(0.9, 0.38, 0.5, 0.08, CM("#2a2b2d"), f - 0.6, fl + 0.19, -0.05);
|
|
13869
13942
|
c.rod(new V3(dx0 - 0.05, fl, zi - 0.35), new V3(dx0 - 0.05, 2.95, zi - 0.35), 0.02, MT.chrome);
|
|
13870
13943
|
c.roundBox(L - 0.5, 0.02, zi * 2, 0.01, MT.headliner, 0, 2.98, 0).castShadow = false;
|
|
@@ -14198,9 +14271,11 @@ var GameUrbanThree = (() => {
|
|
|
14198
14271
|
[1, 1.5, -2.2].forEach(function(x) {
|
|
14199
14272
|
c.rod(new V3(x, fl, 0), new V3(x, 2.95, 0), 0.018, pole);
|
|
14200
14273
|
});
|
|
14201
|
-
kit.dashboard(c, { x: fx2(1.3) - 0.08, y: 1.3, w: 1.2, d: 0.
|
|
14274
|
+
kit.dashboard(c, { x: fx2(1.3) - 0.08, y: 1.3, w: 1.2, d: 0.34, h: 0.28, drv: -0.68, mat: CM("#1d1e20"), top: CM("#2a2b2e") });
|
|
14202
14275
|
kit.steeringWheel(c, f - 0.62, 1.38, -0.68, { r: 0.25, tilt: 1.15, col: 0.4 });
|
|
14203
|
-
kit.seat(c, f - 1.15, 0.6, -0.68, { w: 0.5, mat: CM("#2c2d30", { roughness: 0.85 }), h: 0.46 });
|
|
14276
|
+
kit.seat(c, f - 1.15, 0.6, -0.68, { w: 0.5, mat: CM("#2c2d30", { roughness: 0.85 }), h: 0.46, id: "driver", role: "driver" });
|
|
14277
|
+
c.addDoor({ id: "door_front_right", widthMetres: 1, heightMetres: 2.05 });
|
|
14278
|
+
c.addDoor({ id: "door_rear_right", widthMetres: 1, heightMetres: 2.05 });
|
|
14204
14279
|
c.roundBox(0.4, 0.95, 0.32, 0.05, CM("#9aa0a4", { metalness: 0.5 }), 3.95, fl + 0.48, -0.55);
|
|
14205
14280
|
[0, 2.09, 4.19].forEach(function(a) {
|
|
14206
14281
|
c.rod(
|
|
@@ -14538,7 +14613,9 @@ var GameUrbanThree = (() => {
|
|
|
14538
14613
|
c.cylinder(0.05, 0.05, 0.012, MT.gauge, -0.165, 1.6, 0.1, "x");
|
|
14539
14614
|
kit.steeringWheel(c, -0.38, 1.66, 0, { r: 0.2, tilt: 1, col: 0.42, mat: MT.trim });
|
|
14540
14615
|
c.roundBox(1, 0.05, 0.94, 0.02, CM("#5c5f62", { metalness: 0.5 }), -0.7, 1.12, 0);
|
|
14541
|
-
kit.seat(c, -1, 1.35, 0, { w: 0.
|
|
14616
|
+
kit.seat(c, -1.08, 1.35, 0, { w: 0.54, h: 0.16, back: 0.44, lean: 0.12, mat: MT.seat, headrest: false, id: "driver", role: "driver" });
|
|
14617
|
+
c.addDoor({ id: "cab_entry_left", widthMetres: 0.85, heightMetres: 1.15 });
|
|
14618
|
+
c.addDoor({ id: "cab_entry_right", widthMetres: 0.85, heightMetres: 1.15 });
|
|
14542
14619
|
c.roundBox(0.3, 0.2, 0.3, 0.04, dgray, -1, 1.28, 0);
|
|
14543
14620
|
[
|
|
14544
14621
|
[0.25, 1],
|
|
@@ -14888,7 +14965,11 @@ var GameUrbanThree = (() => {
|
|
|
14888
14965
|
const fl = 0.6, fab = CM("#2f3136", { roughness: 0.9 });
|
|
14889
14966
|
GH.liner(c, ST, -0.3, 1, fl, MT.carpet, { h: 0.03, maxW: 0.98 });
|
|
14890
14967
|
[0.26, -0.26].forEach(function(z) {
|
|
14891
|
-
kit.seat(c, 0.05, fl, z, { w: 0.
|
|
14968
|
+
kit.seat(c, 0.05, fl, z, { w: 0.48, h: 0.12, back: 0.6, lean: 0.12, mat: fab, role: "pilot" });
|
|
14969
|
+
if (z < 0) {
|
|
14970
|
+
c.addDoor({ id: "door_front_left", widthMetres: 0.68, heightMetres: 0.95 });
|
|
14971
|
+
c.addDoor({ id: "door_front_right", widthMetres: 0.68, heightMetres: 0.95 });
|
|
14972
|
+
}
|
|
14892
14973
|
EA.pedals(c, 1.15, fl, z);
|
|
14893
14974
|
});
|
|
14894
14975
|
c.roundBox(0.35, 0.5, 0.24, 0.05, CM("#232427"), 0.95, fl + 0.28, 0, { rot: [0, 0, 0.35] });
|
|
@@ -15256,7 +15337,11 @@ var GameUrbanThree = (() => {
|
|
|
15256
15337
|
const fl = 0.68, fab = CM("#4b4339", { roughness: 0.9 });
|
|
15257
15338
|
GH.liner(c, ST, -0.6, 1.8, fl, MT.carpet, { h: 0.03, maxW: 1.15 });
|
|
15258
15339
|
[0.3, -0.3].forEach(function(z) {
|
|
15259
|
-
kit.seat(c, 1.05, fl, z, { w: 0.48, h: 0.
|
|
15340
|
+
kit.seat(c, 1.05, fl, z, { w: 0.48, h: 0.28, back: 0.64, lean: 0.12, mat: fab, role: "pilot" });
|
|
15341
|
+
if (z < 0) {
|
|
15342
|
+
c.addDoor({ id: "door_front_left", widthMetres: 0.75, heightMetres: 1.05 });
|
|
15343
|
+
c.addDoor({ id: "door_front_right", widthMetres: 0.75, heightMetres: 1.05 });
|
|
15344
|
+
}
|
|
15260
15345
|
EA.cyclic(c, 1.4, fl, z);
|
|
15261
15346
|
EA.pedals(c, 2.1, fl, z);
|
|
15262
15347
|
});
|
|
@@ -15660,7 +15745,11 @@ var GameUrbanThree = (() => {
|
|
|
15660
15745
|
const fl = 0.7, fab = CM("#2c3540", { roughness: 0.9 });
|
|
15661
15746
|
GH.liner(c, ST, -2.9, 2.5, fl, MT.carpet, { h: 0.03, maxW: 1.5 });
|
|
15662
15747
|
[0.42, -0.42].forEach(function(z) {
|
|
15663
|
-
kit.seat(c, 1.55, fl, z, { w: 0.5, h: 0.4, back: 0.7, lean: 0.12, mat: fab });
|
|
15748
|
+
kit.seat(c, 1.55, fl, z, { w: 0.5, h: 0.4, back: 0.7, lean: 0.12, mat: fab, role: "pilot" });
|
|
15749
|
+
if (z < 0) {
|
|
15750
|
+
c.addDoor({ id: "door_front_left", widthMetres: 0.78, heightMetres: 1.15 });
|
|
15751
|
+
c.addDoor({ id: "door_front_right", widthMetres: 0.78, heightMetres: 1.15 });
|
|
15752
|
+
}
|
|
15664
15753
|
EA.cyclic(c, 1.95, fl, z);
|
|
15665
15754
|
EA.pedals(c, 2.75, fl, z);
|
|
15666
15755
|
});
|
|
@@ -16093,10 +16182,12 @@ var GameUrbanThree = (() => {
|
|
|
16093
16182
|
kit.cutMesh(fus, [EA.sideCutP(tdP, 0.5)], 40, { sub: 0.12 });
|
|
16094
16183
|
EA.colorize(fus.geometry, col);
|
|
16095
16184
|
const fab = CM("#2e3328", { roughness: 0.85 });
|
|
16096
|
-
kit.seat(c, 4.75, 1.55, 0, { w: 0.5, h: 0.
|
|
16185
|
+
kit.seat(c, 4.75, 1.55, 0, { w: 0.5, h: 0.1, back: 0.7, lean: 0.15, mat: fab, role: "pilot" });
|
|
16097
16186
|
c.roundBox(0.2, 0.3, 0.6, 0.04, CM("#232427"), 5.35, 1.98, 0, { rot: [0, 0, 0.3] });
|
|
16098
16187
|
c.roundBox(0.2, 0.2, 0.15, 0.03, MT.plastic, 5.25, 2.15, 0);
|
|
16099
|
-
kit.seat(c, 3.2, 2.12, 0, { w: 0.5, h: 0.
|
|
16188
|
+
kit.seat(c, 3.2, 2.12, 0, { w: 0.5, h: 0.1, back: 0.72, lean: 0.15, mat: fab, role: "pilot" });
|
|
16189
|
+
c.addDoor({ id: "canopy_left", widthMetres: 0.72, heightMetres: 0.95 });
|
|
16190
|
+
c.addDoor({ id: "door_cargo_left", widthMetres: 0.9, heightMetres: 1.15 });
|
|
16100
16191
|
EA.instPanel(c, 3.85, 2.62, 0.8, { gauges: 6, z0: -0.25, tilt: 0.3, screens: [[0.05, 0.2, 0.14, 0.18]] });
|
|
16101
16192
|
EA.cyclic(c, 3.55, 2.12, 0);
|
|
16102
16193
|
EA.collective(c, 3.3, 2.12, -0.38);
|
|
@@ -16906,6 +16997,10 @@ var GameUrbanThree = (() => {
|
|
|
16906
16997
|
mirrorCol: "#22231d",
|
|
16907
16998
|
wheels: []
|
|
16908
16999
|
};
|
|
17000
|
+
s.interior = Object.assign(
|
|
17001
|
+
{ floor: s.bottomY + 0.02, roof: s.gh.roof + 0.02, seatH: 0.14, dashD: 0.32, dashH: 0.24, visorUp: true },
|
|
17002
|
+
s.interior || {}
|
|
17003
|
+
);
|
|
16909
17004
|
kit.car(c, s);
|
|
16910
17005
|
[xf, xr].forEach(function(x) {
|
|
16911
17006
|
;
|
|
@@ -17170,8 +17265,8 @@ var GameUrbanThree = (() => {
|
|
|
17170
17265
|
x: xd - 0.07,
|
|
17171
17266
|
y: belt + 0.02,
|
|
17172
17267
|
w: zi * 2,
|
|
17173
|
-
d: 0.
|
|
17174
|
-
h: Math.min(0.
|
|
17268
|
+
d: 0.34,
|
|
17269
|
+
h: Math.min(0.28, belt - fl - 0.16),
|
|
17175
17270
|
drv: -zi * 0.52,
|
|
17176
17271
|
mat: trim,
|
|
17177
17272
|
top: fab,
|
|
@@ -17179,8 +17274,12 @@ var GameUrbanThree = (() => {
|
|
|
17179
17274
|
});
|
|
17180
17275
|
kit.steeringWheel(c, xd - 0.66, belt + 0.06, -zi * 0.52, { r: 0.23, tilt: 1.12, col: 0.5, mat: trim });
|
|
17181
17276
|
const sx = Math.max(f - len2 + 0.62, xd - 1.08);
|
|
17182
|
-
kit.seat(c, sx, fl, -zi * 0.52, { w: 0.
|
|
17183
|
-
kit.seat(c, sx, fl, zi * 0.42, { w: zi * 0.98, n: 2, mat: fab, h: 0.
|
|
17277
|
+
kit.seat(c, sx, fl, -zi * 0.52, { w: 0.52, mat: fab, h: 0.24, back: 0.64, lean: 0.18, id: "driver", role: "driver" });
|
|
17278
|
+
kit.seat(c, sx, fl, zi * 0.42, { w: zi * 0.98, n: 2, mat: fab, h: 0.24, back: 0.6, lean: 0.18, role: "front_passenger" });
|
|
17279
|
+
const mDoorW = Math.max(0.75, f - 0.1 - (xr - 0.06));
|
|
17280
|
+
const mDoorH = Math.max(1.05, ry - fl - 0.1);
|
|
17281
|
+
c.addDoor({ id: "door_front_left", widthMetres: Math.round(mDoorW * 1e3) / 1e3, heightMetres: Math.round(mDoorH * 1e3) / 1e3 });
|
|
17282
|
+
c.addDoor({ id: "door_front_right", widthMetres: Math.round(mDoorW * 1e3) / 1e3, heightMetres: Math.round(mDoorH * 1e3) / 1e3 });
|
|
17184
17283
|
c.rod(new V3(sx + 0.55, fl, -0.05), new V3(sx + 0.5, fl + 0.48, -0.08), 0.014, OLIVE_STEEL);
|
|
17185
17284
|
c.sphere(0.035, BLACK, sx + 0.5, fl + 0.5, -0.08);
|
|
17186
17285
|
c.roundBox(0.25, 0.16, 0.34, 0.02, CM("#3b402d", { roughness: 0.7 }), xd - 0.35, belt + 0.12, 0.1);
|
|
@@ -17722,7 +17821,9 @@ var GameUrbanThree = (() => {
|
|
|
17722
17821
|
[-0.9, -2.2].forEach(function(x) {
|
|
17723
17822
|
c.roundBox(0.3, 0.04, 0.1, 0.02, RED_LIGHT, x, roofY - 0.1, 0).castShadow = false;
|
|
17724
17823
|
});
|
|
17725
|
-
kit.seat(c, 0.95, fl + 0.1, -0.62, { w: 0.5, h: 0.42, back: 0.62, lean: 0.12, mat: CM("#2f3226", { roughness: 0.9 }) });
|
|
17824
|
+
kit.seat(c, 0.95, fl + 0.1, -0.62, { w: 0.5, h: 0.42, back: 0.62, lean: 0.12, mat: CM("#2f3226", { roughness: 0.9 }), id: "driver", role: "driver" });
|
|
17825
|
+
c.addDoor({ id: "hatch_driver", widthMetres: 0.58, heightMetres: 0.6 });
|
|
17826
|
+
c.addDoor({ id: "ramp_rear", widthMetres: 1.4, heightMetres: 1.35 });
|
|
17726
17827
|
kit.steeringWheel(c, 1.5, 1.42, -0.62, { r: 0.2, tilt: 0.9, col: 0.35 });
|
|
17727
17828
|
c.roundBox(0.35, 0.3, 0.7, 0.04, CM("#25261f"), 1.85, 1.45, -0.6);
|
|
17728
17829
|
kit.seat(c, 0.15, fl, 0, { w: 0.5, h: 0.45, back: 0.62, lean: 0.12, mat: CM("#2f3226", { roughness: 0.9 }) });
|
|
@@ -18091,7 +18192,9 @@ var GameUrbanThree = (() => {
|
|
|
18091
18192
|
});
|
|
18092
18193
|
const fl = 0.72, fab = CM("#2f3226", { roughness: 0.9 });
|
|
18093
18194
|
c.roundBox(3, 0.04, 1.6, 0.01, MT.carpet, 0.2, fl, 0);
|
|
18094
|
-
kit.seat(c, 1, fl
|
|
18195
|
+
kit.seat(c, 1, fl, -0.55, { w: 0.46, h: 0.14, back: 0.5, lean: 0.25, mat: fab, id: "driver", role: "driver" });
|
|
18196
|
+
c.addDoor({ id: "hatch_driver", widthMetres: 0.54, heightMetres: 0.58 });
|
|
18197
|
+
c.addDoor({ id: "hatch_commander", widthMetres: 0.6, heightMetres: 0.6 });
|
|
18095
18198
|
kit.steeringWheel(c, 1.5, 1.38, -0.55, { r: 0.18, tilt: 0.9, col: 0.3 });
|
|
18096
18199
|
c.roundBox(0.3, 0.26, 0.6, 0.04, CM("#25261f"), 1.75, 1.35, -0.5);
|
|
18097
18200
|
const nT = c.vehicle.children.length;
|
|
@@ -18139,8 +18242,8 @@ var GameUrbanThree = (() => {
|
|
|
18139
18242
|
for (let k = 0; k < 4; k++)
|
|
18140
18243
|
c.rod(new V3(tx - 1.55, ty + 0.14, -0.6 + k * 0.4), new V3(tx - 1.55, ty + 0.4, -0.6 + k * 0.4), 0.015, OLIVE_STEEL);
|
|
18141
18244
|
c.rod(new V3(tx - 1.55, ty + 0.4, -0.65), new V3(tx - 1.55, ty + 0.4, 0.65), 0.015, OLIVE_STEEL);
|
|
18142
|
-
kit.seat(c, tx - 0.4, fl + 0.
|
|
18143
|
-
kit.seat(c, tx - 0.4, fl + 0.
|
|
18245
|
+
kit.seat(c, tx - 0.4, fl + 0.12, 0.42, { w: 0.46, h: 0.16, back: 0.45, lean: 0.1, mat: fab, role: "crew" });
|
|
18246
|
+
kit.seat(c, tx - 0.4, fl + 0.12, -0.42, { w: 0.46, h: 0.16, back: 0.45, lean: 0.1, mat: fab, role: "crew" });
|
|
18144
18247
|
c.roundBox(0.8, 0.3, 0.3, 0.05, BARREL, tx + 0.1, ty + 0.1, 0);
|
|
18145
18248
|
c.roundBox(1.6, 0.02, 1.2, 0.01, MT.headliner, tx - 0.2, ty + 0.66, 0).castShadow = false;
|
|
18146
18249
|
rigid(c, c.vehicle.children.slice(nT));
|
|
@@ -18333,7 +18436,18 @@ var GameUrbanThree = (() => {
|
|
|
18333
18436
|
{ rot: [0, 0, -0.18] }
|
|
18334
18437
|
);
|
|
18335
18438
|
hatch(c, 2.05, roofY - 0.1, -0.78, 0.28, 0, OLIVE_STEEL, { yaw: 0 });
|
|
18336
|
-
kit.seat(c, 1.
|
|
18439
|
+
kit.seat(c, 1.65, 0.3, -0.76, {
|
|
18440
|
+
w: 0.46,
|
|
18441
|
+
h: 0.14,
|
|
18442
|
+
back: 0.5,
|
|
18443
|
+
lean: 0.5,
|
|
18444
|
+
mat: CM("#2f3226", { roughness: 0.9 }),
|
|
18445
|
+
id: "driver",
|
|
18446
|
+
role: "driver",
|
|
18447
|
+
headroomMetres: 0.9
|
|
18448
|
+
});
|
|
18449
|
+
c.addDoor({ id: "hatch_driver", widthMetres: 0.56, heightMetres: 0.58 });
|
|
18450
|
+
c.addDoor({ id: "hatch_commander", widthMetres: 0.68, heightMetres: 0.68 });
|
|
18337
18451
|
[-0.95, -0.78, -0.61].forEach(function(z, i) {
|
|
18338
18452
|
periscope(c, 2.3, roofY - 0.08, z, 0.14, i === 1 ? lbl("driver_periscope") : null);
|
|
18339
18453
|
});
|
|
@@ -18410,9 +18524,9 @@ var GameUrbanThree = (() => {
|
|
|
18410
18524
|
});
|
|
18411
18525
|
c.roundBox(0.25, 0.3, 1.6, 0.06, CANVAS2, bx + 0.12, ty + 0.4, 0);
|
|
18412
18526
|
c.part("cargo", trl("labels.luggage_basket"), null, new V3(bx + 0.1, ty + 0.5, 0), 1);
|
|
18413
|
-
kit.seat(c, tx - 0.55, ty - 0.45, 0.6, { w: 0.
|
|
18414
|
-
kit.seat(c, tx + 0.2, ty - 0.55, 0.62, { w: 0.
|
|
18415
|
-
kit.seat(c, tx - 0.3, ty - 0.55, -0.62, { w: 0.
|
|
18527
|
+
kit.seat(c, tx - 0.55, ty - 0.45, 0.6, { w: 0.46, h: 0.16, back: 0.45, lean: 0.1, mat: fab, role: "crew" });
|
|
18528
|
+
kit.seat(c, tx + 0.2, ty - 0.55, 0.62, { w: 0.46, h: 0.16, back: 0.42, lean: 0.1, mat: fab, role: "crew" });
|
|
18529
|
+
kit.seat(c, tx - 0.3, ty - 0.55, -0.62, { w: 0.46, h: 0.16, back: 0.42, lean: 0.1, mat: fab, role: "crew" });
|
|
18416
18530
|
c.roundBox(1.1, 0.35, 0.4, 0.05, BARREL, tx + 0.6, ty + 0.35, 0.05);
|
|
18417
18531
|
c.roundBox(2.2, 0.02, 1.6, 0.01, MT.headliner, tx - 0.3, tTop - 0.08, 0).castShadow = false;
|
|
18418
18532
|
c.cylinder(0.05, 0.05, 0.03, RED_LIGHT, tx - 0.4, tTop - 0.1, 0.2);
|
|
@@ -18653,10 +18767,12 @@ var GameUrbanThree = (() => {
|
|
|
18653
18767
|
const fl = 0.86, fab = CM("#2f3226", { roughness: 0.9 });
|
|
18654
18768
|
c.roundBox(5.6, 0.04, 2.05, 0.01, MT.carpet, -0.4, fl, 0).castShadow = false;
|
|
18655
18769
|
[0.5, -0.5].forEach(function(z) {
|
|
18656
|
-
kit.seat(c, 1.55, fl, z, { w: 0.5, h: 0.42, back: 0.72, lean: 0.12, mat: fab });
|
|
18657
|
-
c.rod(new V3(2, fl, z), new V3(1.95, fl + 0.55, z), 0.016, BLACK);
|
|
18658
|
-
c.sphere(0.035, BLACK, 1.95, fl + 0.57, z);
|
|
18770
|
+
kit.seat(c, 1.55, fl, z, { w: 0.5, h: 0.42, back: 0.72, lean: 0.12, mat: fab, role: "pilot" });
|
|
18771
|
+
c.rod(new V3(2, fl, z), new V3(1.95, fl + 0.55, z), 0.016, BLACK).userData.noCabinRay = true;
|
|
18772
|
+
c.sphere(0.035, BLACK, 1.95, fl + 0.57, z).userData.noCabinRay = true;
|
|
18659
18773
|
});
|
|
18774
|
+
c.addDoor({ id: "door_front_left", widthMetres: 0.75, heightMetres: 1.15 });
|
|
18775
|
+
c.addDoor({ id: "door_front_right", widthMetres: 0.75, heightMetres: 1.15 });
|
|
18660
18776
|
c.roundBox(0.25, 0.45, 1.9, 0.05, CM("#232427"), 2.45, fl + 0.55, 0);
|
|
18661
18777
|
c.roundBox(0.4, 0.05, 1.95, 0.02, CM("#1a1b1d"), 2.4, fl + 0.8, 0, { rot: [0, 0, 0.25] });
|
|
18662
18778
|
[-0.75, -0.45, -0.15, 0.15, 0.45, 0.75].forEach(function(z) {
|
|
@@ -19791,9 +19907,13 @@ var GameUrbanThree = (() => {
|
|
|
19791
19907
|
ft: gh.ft,
|
|
19792
19908
|
rb: gh.rb,
|
|
19793
19909
|
rt: gh.rt,
|
|
19794
|
-
roof:
|
|
19910
|
+
roof: gh.roof + 0.02,
|
|
19795
19911
|
belt: gh.belt,
|
|
19796
|
-
floor: s.bottomY + 0.
|
|
19912
|
+
floor: s.bottomY + 0.02,
|
|
19913
|
+
seatH: 0.12,
|
|
19914
|
+
dashD: 0.32,
|
|
19915
|
+
dashH: 0.24,
|
|
19916
|
+
visorUp: true,
|
|
19797
19917
|
zIn: gh.Wg / 2 - 0.09,
|
|
19798
19918
|
zRoof: halfAt(gh.Wg, T, gh.roof) - 0.12,
|
|
19799
19919
|
xRear: gh.rb + 0.06
|
|
@@ -23266,7 +23386,7 @@ var GameUrbanThree = (() => {
|
|
|
23266
23386
|
c.cylinder(0.025, 0.025, 0.2, EXH, -1.98, 0.3, z, "x");
|
|
23267
23387
|
});
|
|
23268
23388
|
c.part("engine", trl("labels.air_cooled_engine_rear"), null, new V3(-1.6, 0.55, 0), 1);
|
|
23269
|
-
const fab = CM("#4b3a2e", { roughness: 0.85 }), fl = 0.
|
|
23389
|
+
const fab = CM("#4b3a2e", { roughness: 0.85 }), fl = 0.31;
|
|
23270
23390
|
c.roundBox(1.7, 0.03, 0.62, 0.01, MT.carpet, -0.15, fl, 0).castShadow = false;
|
|
23271
23391
|
c.roundBox(0.2, 0.24, 1.14, 0.04, col, 0.66, 0.92, 0);
|
|
23272
23392
|
c.roundBox(0.16, 0.05, 1.12, 0.02, CM("#1b1c1e"), 0.6, 1.03, 0);
|
|
@@ -23277,9 +23397,18 @@ var GameUrbanThree = (() => {
|
|
|
23277
23397
|
c.rod(new V3(0.12, fl, 0), new V3(0.02, fl + 0.42, 0), 0.01, MT.chrome);
|
|
23278
23398
|
c.sphere(0.025, MT.plastic, 0.02, fl + 0.44, 0);
|
|
23279
23399
|
[-1, 1].forEach(function(sd) {
|
|
23280
|
-
kit.seat(c, -0.
|
|
23400
|
+
kit.seat(c, -0.08, fl, sd * 0.27, {
|
|
23401
|
+
w: 0.44,
|
|
23402
|
+
mat: fab,
|
|
23403
|
+
back: 0.58,
|
|
23404
|
+
lean: 0.2,
|
|
23405
|
+
h: 0.14,
|
|
23406
|
+
headrest: false,
|
|
23407
|
+
id: sd < 0 ? "driver" : "front_right",
|
|
23408
|
+
role: sd < 0 ? "driver" : "front_passenger"
|
|
23409
|
+
});
|
|
23281
23410
|
});
|
|
23282
|
-
kit.seat(c, -0.
|
|
23411
|
+
kit.seat(c, -0.58, fl, 0, { w: 0.94, n: 3, mat: fab, back: 0.44, lean: 0.14, h: 0.11, len: 0.42, headrest: false, role: "rear" });
|
|
23283
23412
|
[1, -1].forEach(function(sd) {
|
|
23284
23413
|
for (let yk = 0.56; yk < 0.95; yk += 0.075) {
|
|
23285
23414
|
const zf = Math.min(loftHalf(stS, -0.3, yk - 0.04), loftHalf(stS, 0.5, yk - 0.04)) - 0.045;
|
|
@@ -25336,11 +25465,12 @@ var GameUrbanThree = (() => {
|
|
|
25336
25465
|
c.roundBox(0.012, 0.012, 0.06, 4e-3, MT.steel, 2.06, 0.62, 0, PG);
|
|
25337
25466
|
const fl = -0.4, fab = CM("#3c3a35", { roughness: 0.9 });
|
|
25338
25467
|
c.roundBox(2, 0.025, 0.6, 0.01, MT.carpet, 0.55, fl, 0, PG).castShadow = false;
|
|
25339
|
-
kit.seat(c, 0.62, fl, 0, { w: 0.48, h: 0.
|
|
25340
|
-
kit.seat(c, -0.22, fl + 0.04, 0, { w: 0.5, h: 0.
|
|
25468
|
+
kit.seat(c, 0.62, fl, 0, { w: 0.48, h: 0.16, back: 0.55, lean: 0.2, mat: fab, parent: grp, headrest: false, role: "pilot" });
|
|
25469
|
+
kit.seat(c, -0.22, fl + 0.04, 0, { w: 0.5, h: 0.16, back: 0.58, lean: 0.2, mat: fab, parent: grp, headrest: false, role: "crew" });
|
|
25470
|
+
c.addDoor({ id: "canopy_door", widthMetres: 0.7, heightMetres: 0.85 });
|
|
25341
25471
|
[1.12, 0.3].forEach(function(x) {
|
|
25342
|
-
c.rod(new V3(x, fl, 0), new V3(x - 0.05, fl + 0.5, 0), 0.012, MT.plastic, PG);
|
|
25343
|
-
c.sphere(0.025, MT.plastic, x - 0.055, fl + 0.52, 0, 1, 1.4, 1, PG);
|
|
25472
|
+
c.rod(new V3(x, fl, 0), new V3(x - 0.05, fl + 0.5, 0), 0.012, MT.plastic, PG).userData.noCabinRay = true;
|
|
25473
|
+
c.sphere(0.025, MT.plastic, x - 0.055, fl + 0.52, 0, 1, 1.4, 1, PG).userData.noCabinRay = true;
|
|
25344
25474
|
});
|
|
25345
25475
|
c.roundBox(0.05, 0.22, 0.6, 0.02, CM("#2a2b2d", { roughness: 0.8 }), 1.75, 0.3, 0, PG);
|
|
25346
25476
|
[-0.2, -0.08, 0.04, 0.16, -0.14].forEach(function(z, i) {
|
|
@@ -25694,7 +25824,8 @@ var GameUrbanThree = (() => {
|
|
|
25694
25824
|
const fl = 0.98, fab = CM("#3d4552", { roughness: 0.9 });
|
|
25695
25825
|
liner(c, ST, -4.6, 5.9, fl, MT.carpet, { h: 0.03 });
|
|
25696
25826
|
[0.38, -0.38].forEach(function(z) {
|
|
25697
|
-
kit.seat(c, 4.95, fl, z, { w: 0.5, h: 0.38, back: 0.7, lean: 0.14, mat: CM("#2a2c30", { roughness: 0.8 }) });
|
|
25827
|
+
kit.seat(c, 4.95, fl, z, { w: 0.5, h: 0.38, back: 0.7, lean: 0.14, mat: CM("#2a2c30", { roughness: 0.8 }), role: "pilot" });
|
|
25828
|
+
if (z < 0) c.addDoor({ id: "cabin_door_left", widthMetres: 0.78, heightMetres: 1.55 });
|
|
25698
25829
|
kit.yoke(c, 5.5, 1.75, z);
|
|
25699
25830
|
EA.pedals(c, 5.95, fl, z);
|
|
25700
25831
|
});
|
|
@@ -26088,7 +26219,8 @@ var GameUrbanThree = (() => {
|
|
|
26088
26219
|
const fl = 2.06, fab = CM("#4a4640", { roughness: 0.9 });
|
|
26089
26220
|
liner(c, ST, -3.2, 2, fl, MT.carpet, { h: 0.03 });
|
|
26090
26221
|
[0.38, -0.38].forEach(function(z) {
|
|
26091
|
-
kit.seat(c, 0.95, fl, z, { w: 0.5, h: 0.38, back: 0.7, lean: 0.14, mat: fab });
|
|
26222
|
+
kit.seat(c, 0.95, fl, z, { w: 0.5, h: 0.38, back: 0.7, lean: 0.14, mat: fab, role: "pilot" });
|
|
26223
|
+
if (z < 0) c.addDoor({ id: "cabin_door_left", widthMetres: 0.78, heightMetres: 1.4 });
|
|
26092
26224
|
kit.yoke(c, 1.5, 2.85, z);
|
|
26093
26225
|
EA.pedals(c, 1.95, fl, z);
|
|
26094
26226
|
});
|
|
@@ -26503,7 +26635,8 @@ var GameUrbanThree = (() => {
|
|
|
26503
26635
|
const fl = 0.8, fab = CM("#c9bda6", { roughness: 0.75 });
|
|
26504
26636
|
liner(c, ST, -2, 4, fl, MT.carpet, { h: 0.03 });
|
|
26505
26637
|
[0.36, -0.36].forEach(function(z) {
|
|
26506
|
-
kit.seat(c, 3.55, fl, z, { w: 0.48, h: 0.36, back: 0.66, lean: 0.14, mat: CM("#2a2c30") });
|
|
26638
|
+
kit.seat(c, 3.55, fl, z, { w: 0.48, h: 0.36, back: 0.66, lean: 0.14, mat: CM("#2a2c30"), role: "pilot" });
|
|
26639
|
+
if (z < 0) c.addDoor({ id: "cabin_door_left", widthMetres: 0.72, heightMetres: 1.35 });
|
|
26507
26640
|
kit.yoke(c, 4.05, 1.55, z);
|
|
26508
26641
|
});
|
|
26509
26642
|
EA.instPanel(c, 4.3, 1.68, 1.35, {
|
|
@@ -26871,11 +27004,12 @@ var GameUrbanThree = (() => {
|
|
|
26871
27004
|
[1.55, 1.24],
|
|
26872
27005
|
[0.2, 1.46]
|
|
26873
27006
|
].forEach(function(q, i) {
|
|
26874
|
-
kit.seat(c, q[0], q[1], 0, { w: 0.5, h: 0.32, back: 0.85, lean: 0.24, mat: fab, headrest: false });
|
|
27007
|
+
kit.seat(c, q[0], q[1], 0, { w: 0.5, h: 0.32, back: 0.85, lean: 0.24, mat: fab, headrest: false, role: i === 0 ? "pilot" : "crew" });
|
|
26875
27008
|
c.roundBox(0.14, 0.3, 0.44, 0.04, CM("#202224"), q[0] - 0.42, q[1] + 1.05, 0, { rot: [0, 0, 0.24] });
|
|
26876
27009
|
c.rod(new V3(q[0] - 0.38, q[1] + 1.25, -0.06), new V3(q[0] - 0.3, q[1] + 1.4, 0.06), 0.012, MT.yellow);
|
|
26877
|
-
c.rod(new V3(q[0] + 0.35, q[1], 0), new V3(q[0] + 0.32, q[1] + 0.45, 0), 0.016, blk);
|
|
26878
|
-
c.sphere(0.03, blk, q[0] + 0.31, q[1] + 0.48, 0, 1, 1.5, 1);
|
|
27010
|
+
c.rod(new V3(q[0] + 0.35, q[1], 0), new V3(q[0] + 0.32, q[1] + 0.45, 0), 0.016, blk).userData.noCabinRay = true;
|
|
27011
|
+
c.sphere(0.03, blk, q[0] + 0.31, q[1] + 0.48, 0, 1, 1.5, 1).userData.noCabinRay = true;
|
|
27012
|
+
if (i === 0) c.addDoor({ id: "canopy_door", widthMetres: 0.68, heightMetres: 0.85 });
|
|
26879
27013
|
const px = q[0] + 0.75;
|
|
26880
27014
|
c.roundBox(0.16, 0.3, 0.6, 0.04, CM("#232427"), px, q[1] + 0.65, 0, { rot: [0, 0, 0.2] });
|
|
26881
27015
|
[-0.15, 0.15].forEach(function(z) {
|
|
@@ -27709,10 +27843,26 @@ var GameUrbanThree = (() => {
|
|
|
27709
27843
|
roofLining(c, extra);
|
|
27710
27844
|
if (!c.meta.damage) c.meta.damage = crashDamage;
|
|
27711
27845
|
}
|
|
27846
|
+
function withCabinPackaging(s) {
|
|
27847
|
+
if (s.interior === false) return s;
|
|
27848
|
+
return Object.assign({}, s, {
|
|
27849
|
+
interior: Object.assign(
|
|
27850
|
+
{
|
|
27851
|
+
floor: s.bottomY + 0.02,
|
|
27852
|
+
roof: s.gh.roof + 0.02,
|
|
27853
|
+
seatH: 0.12,
|
|
27854
|
+
dashD: 0.32,
|
|
27855
|
+
dashH: 0.24,
|
|
27856
|
+
visorUp: true
|
|
27857
|
+
},
|
|
27858
|
+
s.interior || {}
|
|
27859
|
+
)
|
|
27860
|
+
});
|
|
27861
|
+
}
|
|
27712
27862
|
function suvBuild(c, s, o) {
|
|
27713
27863
|
o = o || {};
|
|
27714
27864
|
const n0 = c.deform.length;
|
|
27715
|
-
kit.car(c, s);
|
|
27865
|
+
kit.car(c, withCabinPackaging(s));
|
|
27716
27866
|
const low = c.deform[n0], m = c.meta;
|
|
27717
27867
|
let extra = [];
|
|
27718
27868
|
if (o.flares !== false) extra = extra.concat(fenderFlares(c, s.arches, s.W, s.bottomY, o.flare));
|
|
@@ -28199,7 +28349,7 @@ var GameUrbanThree = (() => {
|
|
|
28199
28349
|
);
|
|
28200
28350
|
function pickupBuild(c, s, o) {
|
|
28201
28351
|
const n0 = c.deform.length;
|
|
28202
|
-
kit.car(c, s);
|
|
28352
|
+
kit.car(c, withCabinPackaging(s));
|
|
28203
28353
|
const low = c.deform[n0], m = c.meta;
|
|
28204
28354
|
let extra = [];
|
|
28205
28355
|
cargoBed(c, { low, x0: m.rear + 0.06, x1: o.bedFront, floor: o.floor, top: s.gh.belt, W: s.W, arches: s.arches });
|
|
@@ -28595,7 +28745,7 @@ var GameUrbanThree = (() => {
|
|
|
28595
28745
|
wheels: []
|
|
28596
28746
|
};
|
|
28597
28747
|
const n0 = c.deform.length;
|
|
28598
|
-
kit.car(c, s);
|
|
28748
|
+
kit.car(c, withCabinPackaging(s));
|
|
28599
28749
|
const low = c.deform[n0], m = c.meta;
|
|
28600
28750
|
cargoBed(c, { low, x0: m.rear + 0.06, x1: -0.42, floor: 1.78, top: 2.25, W, arches: [] });
|
|
28601
28751
|
c.roundBox(0.08, 0.08, W + 0.1, 0.03, MT.chrome, m.front + 0.06, 1.72, 0);
|
|
@@ -28915,7 +29065,10 @@ var GameUrbanThree = (() => {
|
|
|
28915
29065
|
xRear: P.cabBack - 0.12,
|
|
28916
29066
|
xFront: P.cabBack + 0.42,
|
|
28917
29067
|
seatH: 0.42,
|
|
28918
|
-
front: "bench"
|
|
29068
|
+
front: "bench",
|
|
29069
|
+
dashD: 0.32,
|
|
29070
|
+
dashH: 0.24,
|
|
29071
|
+
visorUp: true
|
|
28919
29072
|
});
|
|
28920
29073
|
c.roundBox(
|
|
28921
29074
|
0.04,
|
|
@@ -29951,8 +30104,8 @@ var GameUrbanThree = (() => {
|
|
|
29951
30104
|
});
|
|
29952
30105
|
}
|
|
29953
30106
|
function cyclic(c, x, fl, z) {
|
|
29954
|
-
c.rod(new V3(x, fl, z), new V3(x - 0.04, fl + 0.55, z), 0.014, MT.plastic);
|
|
29955
|
-
c.roundBox(0.04, 0.12, 0.04, 0.015, MT.plastic, x - 0.05, fl + 0.6, z);
|
|
30107
|
+
c.rod(new V3(x, fl, z), new V3(x - 0.04, fl + 0.55, z), 0.014, MT.plastic).userData.noCabinRay = true;
|
|
30108
|
+
c.roundBox(0.04, 0.12, 0.04, 0.015, MT.plastic, x - 0.05, fl + 0.6, z).userData.noCabinRay = true;
|
|
29956
30109
|
}
|
|
29957
30110
|
function collective(c, x, fl, z) {
|
|
29958
30111
|
c.rod(new V3(x - 0.35, fl + 0.18, z), new V3(x + 0.05, fl + 0.32, z), 0.016, MT.plastic);
|
|
@@ -30483,8 +30636,8 @@ var GameUrbanThree = (() => {
|
|
|
30483
30636
|
c.rod(new V3(0.62, cy + 0.72, 0.62), new V3(0.55, cy + 0.82, 0.62), 0.02, MT.chrome);
|
|
30484
30637
|
c.rod(new V3(0.55, cy + 0.7, 0.98), new V3(0.42, cy + 0.88, 1), 0.015, MT.chrome);
|
|
30485
30638
|
c.sphere(0.035, MT.plastic, 0.42, cy + 0.9, 1);
|
|
30486
|
-
kit.seat(c, -0.1, cy + 2e-3, 0.72, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false });
|
|
30487
|
-
kit.seat(c, -0.1, cy + 2e-3, -0.74, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false });
|
|
30639
|
+
kit.seat(c, -0.1, cy + 2e-3, 0.72, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false, open: true, role: "front_passenger" });
|
|
30640
|
+
kit.seat(c, -0.1, cy + 2e-3, -0.74, { w: 0.55, h: 0.42, back: 0.48, lean: 0.12, mat: vinyl, headrest: false, open: true, id: "driver", role: "driver" });
|
|
30488
30641
|
[1, -1].forEach(function(s) {
|
|
30489
30642
|
const pts = [];
|
|
30490
30643
|
for (let i = 0; i <= 8; i++) {
|
|
@@ -30795,7 +30948,8 @@ var GameUrbanThree = (() => {
|
|
|
30795
30948
|
c.rod(new V3(0, 0, 0), new V3(0, Math.cos(a8) * 0.36, Math.sin(a8) * 0.36), 0.014, MT.wood, { parent: whl });
|
|
30796
30949
|
}
|
|
30797
30950
|
c.cylinder(0.05, 0.05, 0.14, MT.wood, 0.06, 0, 0, "x", { parent: whl });
|
|
30798
|
-
kit.seat(c, hx - 0.
|
|
30951
|
+
kit.seat(c, hx - 0.12, hy0 + 2e-3, 0, { w: 0.54, h: 0.55, back: 0.45, mat: inner2, headrest: false, id: "driver", role: "driver" });
|
|
30952
|
+
c.addDoor({ id: "cabin_door", widthMetres: 0.68, heightMetres: 1.55 });
|
|
30799
30953
|
c.roundBox(1.8, 0.12, 0.65, 0.04, CM("#7c5a3b"), hx - 0.2, hy0 + 0.5, -0.72);
|
|
30800
30954
|
c.roundBox(1.7, 0.08, 0.55, 0.04, CM("#6b7c8f", { roughness: 1 }), hx - 0.2, hy0 + 0.6, -0.72);
|
|
30801
30955
|
c.roundBox(1.9, 0.02, 2.1, 0.01, inner2, hx, hy0 + hh - 0.06, 0).castShadow = false;
|
|
@@ -31011,11 +31165,13 @@ var GameUrbanThree = (() => {
|
|
|
31011
31165
|
const fl = 0.74, fab = CM("#4a463f", { roughness: 0.9 });
|
|
31012
31166
|
c.roundBox(2.2, 0.03, 0.98, 0.01, MT.carpet, 0.2, fl, 0).castShadow = false;
|
|
31013
31167
|
[0.26, -0.26].forEach(function(z) {
|
|
31014
|
-
kit.seat(c, 0.38, fl, z, { w: 0.
|
|
31168
|
+
kit.seat(c, 0.38, fl, z, { w: 0.48, h: 0.24, back: 0.62, lean: 0.18, mat: fab, role: "pilot" });
|
|
31015
31169
|
EA.pedals(c, 1.18, fl, z);
|
|
31016
31170
|
kit.yoke(c, 0.98, 1.47, z);
|
|
31017
31171
|
});
|
|
31018
|
-
kit.seat(c, -0.52, fl, 0, { w: 0.96, n: 2, h: 0.
|
|
31172
|
+
kit.seat(c, -0.52, fl, 0, { w: 0.96, n: 2, h: 0.24, back: 0.58, lean: 0.2, mat: fab });
|
|
31173
|
+
c.addDoor({ id: "door_front_left", widthMetres: 0.75, heightMetres: 0.95 });
|
|
31174
|
+
c.addDoor({ id: "door_front_right", widthMetres: 0.75, heightMetres: 0.95 });
|
|
31019
31175
|
EA.instPanel(c, 1.1, 1.52, 1, { gauges: 6, z0: -0.38, screens: [[0, 0.12, 0.14, 0.22]] });
|
|
31020
31176
|
c.roundBox(0.1, 0.1, 0.1, 0.02, MT.plastic, 1, 1.32, 0);
|
|
31021
31177
|
c.cylinder(0.018, 0.018, 0.1, MT.chrome, 0.93, 1.34, 0.02, "x");
|
|
@@ -31290,9 +31446,10 @@ var GameUrbanThree = (() => {
|
|
|
31290
31446
|
);
|
|
31291
31447
|
const fl = -0.36;
|
|
31292
31448
|
c.roundBox(1.3, 0.03, 0.8, 0.01, MT.carpet, -0.4, fl, 0, { parent: grp }).castShadow = false;
|
|
31293
|
-
kit.seat(c, -0.55, fl, 0, { w: 0.5, h: 0.
|
|
31294
|
-
c.
|
|
31295
|
-
c.
|
|
31449
|
+
kit.seat(c, -0.55, fl, 0, { w: 0.5, h: 0.18, back: 0.66, lean: 0.12, mat: CM("#3a3530", { roughness: 0.9 }), parent: grp, role: "pilot" });
|
|
31450
|
+
c.addDoor({ id: "canopy_door", widthMetres: 0.7, heightMetres: 0.85 });
|
|
31451
|
+
c.rod(new V3(0, fl, 0), new V3(-0.06, fl + 0.55, 0), 0.016, MT.plastic, { parent: grp }).userData.noCabinRay = true;
|
|
31452
|
+
c.roundBox(0.04, 0.13, 0.05, 0.015, MT.plastic, -0.07, fl + 0.6, 0, { parent: grp }).userData.noCabinRay = true;
|
|
31296
31453
|
c.roundBox(0.16, 0.3, 0.8, 0.04, CM("#232427"), 0.36, 0.5, 0, { parent: grp, rot: [0, 0, 0.2] });
|
|
31297
31454
|
[-0.24, -0.12, 0, 0.12, 0.24].forEach(function(z, i) {
|
|
31298
31455
|
c.cylinder(0.036, 0.036, 0.012, MT.gauge, 0.27, 0.55 - i % 2 * 0.09, z, "x", { seg: 16, parent: grp }).castShadow = false;
|
|
@@ -31702,10 +31859,12 @@ var GameUrbanThree = (() => {
|
|
|
31702
31859
|
const fl = 0.72, fab = CM("#3b3a38", { roughness: 0.9 });
|
|
31703
31860
|
c.roundBox(1.9, 0.03, 1.16, 0.01, MT.carpet, 0.2, fl, 0).castShadow = false;
|
|
31704
31861
|
[0.3, -0.3].forEach(function(z) {
|
|
31705
|
-
kit.seat(c, 0.35, fl, z, { w: 0.48, h: 0.
|
|
31862
|
+
kit.seat(c, 0.35, fl, z, { w: 0.48, h: 0.2, back: 0.62, lean: 0.14, mat: fab, role: "pilot" });
|
|
31706
31863
|
EA.pedals(c, 1.35, fl, z);
|
|
31707
31864
|
});
|
|
31708
|
-
kit.seat(c, -0.55, fl + 0.06, 0, { w: 1.06, n: 2, h: 0.
|
|
31865
|
+
kit.seat(c, -0.55, fl + 0.06, 0, { w: 1.06, n: 2, h: 0.2, back: 0.6, lean: 0.12, mat: fab });
|
|
31866
|
+
c.addDoor({ id: "door_front_left", widthMetres: 0.72, heightMetres: 1.05 });
|
|
31867
|
+
c.addDoor({ id: "door_front_right", widthMetres: 0.72, heightMetres: 1.05 });
|
|
31709
31868
|
c.roundBox(0.42, 0.62, 0.3, 0.06, CM("#232427"), 1.15, fl + 0.32, 0, { rot: [0, 0, 0.35] });
|
|
31710
31869
|
c.roundBox(0.06, 0.3, 0.3, 0.02, CM("#1a1b1d"), 1.25, fl + 0.65, 0, { rot: [0, 0, 0.6] });
|
|
31711
31870
|
[-0.07, 0.07].forEach(function(z) {
|
|
@@ -32036,6 +32195,8 @@ var GameUrbanThree = (() => {
|
|
|
32036
32195
|
EA.collective(c, 1.3, fl, -0.72);
|
|
32037
32196
|
EA.collective(c, 1.3, fl, 0.12);
|
|
32038
32197
|
kit.seat(c, -0.35, fl + 0.04, 0, { w: 1.56, n: 4, h: 0.38, back: 0.62, lean: 0.1, mat: fab });
|
|
32198
|
+
c.addDoor({ id: "door_front_left", widthMetres: 0.78, heightMetres: 1.15 });
|
|
32199
|
+
c.addDoor({ id: "door_front_right", widthMetres: 0.78, heightMetres: 1.15 });
|
|
32039
32200
|
EA.instPanel(c, 2.25, 1.55, 1.2, { gauges: 8, z0: -0.45, tilt: 0.3, screens: [[0.05, 0.25, 0.14, 0.2]] });
|
|
32040
32201
|
c.roundBox(0.5, 0.45, 0.32, 0.06, CM("#232427"), 2.05, fl + 0.24, 0);
|
|
32041
32202
|
c.roundBox(2.3, 0.02, 1.4, 0.01, MT.headliner, 0.45, 2.24, 0).castShadow = false;
|
|
@@ -35087,8 +35248,12 @@ var GameUrbanThree = (() => {
|
|
|
35087
35248
|
for (const part of silhouette.parts) parts.push(part.parent < 0 ? part : { ...part, parent: part.parent + offset });
|
|
35088
35249
|
for (const window of silhouette.windows) (window.isLit ? windows.lit : windows.dark).push(window);
|
|
35089
35250
|
};
|
|
35251
|
+
const covers = [];
|
|
35252
|
+
const cover2 = (footprint) => {
|
|
35253
|
+
covers.push(footprint);
|
|
35254
|
+
};
|
|
35090
35255
|
const scene = () => ({ parts, items, windows });
|
|
35091
|
-
return { random, pick, lights, parts, items, windows, group, box: box2, cylinder: cylinder2, cone: cone2, prism, plane: plane2, vault, terrain, crown, line, label, light, spot, place, item, fence, add: add2, scene };
|
|
35256
|
+
return { random, pick, lights, parts, items, windows, covers, cover: cover2, group, box: box2, cylinder: cylinder2, cone: cone2, prism, plane: plane2, vault, terrain, crown, line, label, light, spot, place, item, fence, add: add2, scene };
|
|
35092
35257
|
}
|
|
35093
35258
|
var DEFAULT_POLE_SLOTS = {
|
|
35094
35259
|
height: 11,
|
|
@@ -35335,6 +35500,7 @@ var GameUrbanThree = (() => {
|
|
|
35335
35500
|
var DEFAULT_STOREY_PRESETS = { commercial: "office", residential: "residential" };
|
|
35336
35501
|
function drawBuilding(b, x, z, width, depth, height, color2, options = {}) {
|
|
35337
35502
|
b.add(createCityBuilding({ x, z, width, depth, height, color: color2, random: b.random, shopChance: options.shop, litChance: options.lit }));
|
|
35503
|
+
b.cover({ x, z, halfX: width / 2, halfZ: depth / 2, yaw: 0, top: height });
|
|
35338
35504
|
return { x, z, width, depth, height, color: color2 };
|
|
35339
35505
|
}
|
|
35340
35506
|
function pickUse(b, uses) {
|
|
@@ -35403,6 +35569,7 @@ var GameUrbanThree = (() => {
|
|
|
35403
35569
|
}
|
|
35404
35570
|
function drawTent(b, x, z, ry, w, d, color2, c) {
|
|
35405
35571
|
b.prism(x, 0, z, w, w * 0.7, d, color2 ?? colors(c).tent, -1, ry);
|
|
35572
|
+
b.cover({ x, z, halfX: w / 2, halfZ: d / 2, yaw: -ry, top: w * 0.7 });
|
|
35406
35573
|
}
|
|
35407
35574
|
function drawPine(b, x, z, scale = 1, y = 0, c) {
|
|
35408
35575
|
const palette2 = colors(c);
|
|
@@ -35420,12 +35587,14 @@ var GameUrbanThree = (() => {
|
|
|
35420
35587
|
const group = b.group(x, y, z, ry);
|
|
35421
35588
|
b.box(0, 0, 0, 2.44, 2.6, 6.06, color2, { parent: group, style: { roughness: 0.7, metalness: 0.3 } });
|
|
35422
35589
|
for (let k = -2; k <= 2; k++) b.box(k * 0.5, 0, 3.04, 0.06, 2.6, 0.04, 1710618, { parent: group });
|
|
35590
|
+
b.cover({ x, z, halfX: 1.22, halfZ: 3.03, yaw: -ry, top: y + 2.6 });
|
|
35423
35591
|
}
|
|
35424
35592
|
function drawWatchtower(b, x, z, searchlight = false, c) {
|
|
35425
35593
|
const palette2 = colors(c).watchtower;
|
|
35426
35594
|
for (const a of [-1, 1]) for (const d of [-1, 1]) b.box(x + a * 1.2, 0, z + d * 1.2, 0.25, 7, 0.25, palette2.leg);
|
|
35427
35595
|
b.box(x, 7, z, 3.2, 1.2, 3.2, palette2.cabin);
|
|
35428
35596
|
b.box(x, 8.2, z, 3.6, 0.15, 3.6, palette2.deck);
|
|
35597
|
+
b.cover({ x, z, halfX: 1.8, halfZ: 1.8, yaw: 0, top: 8.35 });
|
|
35429
35598
|
for (const side of [-1.5, 1.5]) b.box(x + side, 8.2, z, 0.15, 1.6, 0.15, palette2.deck);
|
|
35430
35599
|
if (searchlight) b.spot({ x, y: 9, z, color: 15134463, intensity: 2.4, distance: 70, decay: 1.2, angle: 0.35, penumbra: 0.5, target: { x: x + 20, y: 0, z: z + 20 }, sweep: { speed: 0.5, radius: 25 } });
|
|
35431
35600
|
}
|
|
@@ -36403,7 +36572,12 @@ var GameUrbanThree = (() => {
|
|
|
36403
36572
|
const propColors = { ...DEFAULT_PROP_COLORS, ...options.props };
|
|
36404
36573
|
const towers = options.towers ? options.towers === true ? {} : options.towers : null;
|
|
36405
36574
|
const building = (b, x, z, width, depth, height, color2, o) => drawBuilding(b, x, z, width, depth, height, color2, o);
|
|
36406
|
-
const
|
|
36575
|
+
const towerDrawer = towers ? createTowerDrawer(towers, building) : null;
|
|
36576
|
+
const drawBlockBuilding = towerDrawer ? (b, x, z, width, depth, height, color2, o) => {
|
|
36577
|
+
const built = towerDrawer(b, x, z, width, depth, height, color2, o);
|
|
36578
|
+
b.cover({ x, z, halfX: width / 2, halfZ: depth / 2, yaw: 0, top: built.height });
|
|
36579
|
+
return built;
|
|
36580
|
+
} : building;
|
|
36407
36581
|
const poles = {
|
|
36408
36582
|
ids: () => [...entries.keys()],
|
|
36409
36583
|
list: () => [...entries.values()],
|
|
@@ -42467,7 +42641,10 @@ gl_Position = projectionMatrix * mvPosition;
|
|
|
42467
42641
|
return { name: id, tags: ["structure"], parts: [{ id: "ground", material: "concrete", shape: { kind: "box", size: [Math.max(size.x, 0.1), Math.max(size.y, 0.1), Math.max(size.z, 0.1)] }, position: [centre.x, centre.y, centre.z], anchored: true }] };
|
|
42468
42642
|
}
|
|
42469
42643
|
});
|
|
42644
|
+
let removeBenchCover = null;
|
|
42470
42645
|
const clearBench = () => {
|
|
42646
|
+
removeBenchCover?.();
|
|
42647
|
+
removeBenchCover = null;
|
|
42471
42648
|
if (!bench) return;
|
|
42472
42649
|
bench.drawn.dispose();
|
|
42473
42650
|
bench = null;
|
|
@@ -42489,6 +42666,7 @@ gl_Position = projectionMatrix * mvPosition;
|
|
|
42489
42666
|
drawn.root.position.set(benchOrigin[0], FLOOR_Y, benchOrigin[1]);
|
|
42490
42667
|
host.scene.add(drawn.root);
|
|
42491
42668
|
bench = { root: drawn.root, drawn, plan: made };
|
|
42669
|
+
if (host.rainCover) removeBenchCover = host.rainCover.add(createFixedFootprintRainCover(b.covers.map((roof) => ({ ...roof, x: roof.x + benchOrigin[0], z: roof.z + benchOrigin[1], top: roof.top + FLOOR_Y }))));
|
|
42492
42670
|
lightsLeft = b.lights.left;
|
|
42493
42671
|
host.log(fill(text2.log.composed, settings.pattern, settings.seed, countObjects(drawn.root), drawn.lights.length), { pattern: settings.pattern, seed: settings.seed });
|
|
42494
42672
|
helpersShown = "";
|