Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
408 changes: 102 additions & 306 deletions public/auth.js

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions public/city.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const City = (() => {
let scene;
let sky;
let sun;
let lastSunAnchor = null;
let sunMoved = true;
let hemisphere;
let stars;
let moon;
Expand Down Expand Up @@ -190,6 +192,8 @@ const City = (() => {
scene.add(instanced);
});
edging = { spots: grassSpots, edges, corners, edgeMatrices: edges.instanceMatrix.array.slice(), cornerMatrices: corners.instanceMatrix.array.slice() };
edges.userData.noChunk = true; // updated when land owners change
corners.userData.noChunk = true;
updateEstateEdging(); buildSeas();
}

Expand Down Expand Up @@ -1347,6 +1351,7 @@ const City = (() => {
sun.shadow.bias = -0.0004;
sun.shadow.normalBias = 0.06;
scene.add(sun, sun.target);
lastSunAnchor = new THREE.Vector3(Infinity, 0, Infinity);

const starPositions = [];
const random = seededRandom(7);
Expand Down Expand Up @@ -1424,6 +1429,9 @@ const City = (() => {
scene.fog.color.copy(colors.bottom);
scene.fog.near = weather === 'clear' ? 140 : 60;
scene.fog.far = weather === 'clear' ? 900 : 380;
// Lighter quality levels see less far (the fog closes in, and everything
// behind it is not drawn at all): the biggest saving per frame
if (window.MULTIVERSE_VIEW_CAP) scene.fog.far = Math.min(scene.fog.far, window.MULTIVERSE_VIEW_CAP);
// The higher you fly, the hazier the view; inside the cloud layer it turns white
if (!cloudLayer) buildCloudLayer();
updateCloudLayer(camera, time);
Expand Down Expand Up @@ -1451,8 +1459,14 @@ const City = (() => {
sun.intensity = isDay ? daylight * 0.85 : 0.12;
sun.color.set(isDay ? '#fff4e0' : '#9db4ff');
const lightDirection = new THREE.Vector3(Math.cos(sunAngle) * 120, Math.abs(Math.sin(sunAngle)) * 160 + 30, 60);
sun.position.copy(focus).add(lightDirection);
sun.target.position.copy(focus);
// The sun follows the player in 10 m steps, so its shadow map only needs
// redrawing when that step changes (or every few frames for moving things)
const anchorX = Math.round(focus.x / 10) * 10;
const anchorZ = Math.round(focus.z / 10) * 10;
sunMoved = anchorX !== lastSunAnchor.x || anchorZ !== lastSunAnchor.z || Math.abs(focus.y - lastSunAnchor.y) > 3;
if (sunMoved) lastSunAnchor.set(anchorX, focus.y, anchorZ);
sun.position.copy(lastSunAnchor).add(lightDirection);
sun.target.position.copy(lastSunAnchor);

const night = 1 - Math.min(1, colors.light / 0.5);
stars.material.opacity = weather === 'clear' ? Math.max(0, night) : 0;
Expand Down Expand Up @@ -1480,7 +1494,7 @@ const City = (() => {
positions.needsUpdate = true;
});
animatedCity.forEach((update) => update(time));
return { flash: weather === 'thunder' && Math.random() < 0.004, haze, inCloud };
return { flash: weather === 'thunder' && Math.random() < 0.004, haze, inCloud, sunMoved };
}

function init(targetScene) {
Expand Down
2 changes: 1 addition & 1 deletion public/games.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ const GameSystems = (() => {
const screenMesh = box(w, h, 0.05, new THREE.MeshBasicMaterial({ map: screen.texture }), 0, 0, d / 2 + 0.03);
group.add(screenMesh);
// The keynotes autoplay (muted) right on the big screen when you are close
keynoteVideo = VideoScreens.register(screenMesh, w, h, VideoScreens.youtubeEmbed(KEYNOTE_PLAYLIST.map((entry) => entry.videoId)), { distance: 160 });
keynoteVideo = VideoScreens.register(screenMesh, w, h, VideoScreens.youtubeEmbed(KEYNOTE_PLAYLIST.map((entry) => entry.videoId)), { distance: 230, spatial: { full: 85, fade: 220 } });
[-1, 1].forEach((side) => group.add(box(1.2, h + 4, 1.2, material('#2b2d42'), side * (w / 2 + 1), -2, 0)));
keynoteScreen = { screen, group };
group.userData.isKeynoteScreen = true;
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
var version = params.get('v');
if (!version || !/^[0-9a-f]{7,40}$/.test(version)) return;
var local = /^(localhost|127\.0\.0\.1)$/.test(location.hostname);
var base = ((local && params.get('cdn')) || 'https://cdn.jsdelivr.net/gh/FavoriteDevX/Github-Universe@') + version + '/public/';
var base = ((local && params.get('cdn')) || 'https://cdn.jsdelivr.net/gh/FavoriteDevX/Github-Multiverse@') + version + '/public/';
var origin = location.origin;
function shim(cfg) {
var fix = function (url) { return typeof url === 'string' && url.charAt(0) === '/' && url.charAt(1) !== '/' ? cfg.origin + url : url; };
Expand Down
297 changes: 274 additions & 23 deletions public/landmarks.js

Large diffs are not rendered by default.

212 changes: 208 additions & 4 deletions public/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/maps/districts.json

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions public/maps/github_events.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,15 @@
"end": 0
}
]
},
"appleReel": {
"_how_to": "Apple animation videos played back to back on the Tech Square reel screen. 'start' and 'end' are seconds into each official video (end 0 = until the video ends). Only animation segments: add clips of jGztGfRujSE here with the start and end of each part that has no people talking.",
"clips": [
{
"video": "https://youtu.be/z0v8BRC1664",
"start": 0,
"end": 0
}
]
}
}
14 changes: 14 additions & 0 deletions public/maps/map_decentraland.json
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,20 @@
],
"color": "#e9ecf2",
"label": "Genesis spawn hub"
},
{
"type": "community_portals",
"position": [
-62,
0,
42
],
"scale": [
44,
4,
44
],
"label": "Community Portals"
}
]
}
Loading
Loading