Skip to content

Commit

Permalink
Derp
Browse files Browse the repository at this point in the history
  • Loading branch information
tentone committed Jan 3, 2024
1 parent be790ff commit f846323
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 32 deletions.
4 changes: 1 addition & 3 deletions examples/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -33935,14 +33935,12 @@
MapBoxProvider.MAP_ID = 101;

var canvas = document.getElementById('canvas');
ColorManagement.enabled = false;
var renderer = new WebGLRenderer({
canvas: canvas,
antialias: true
});
renderer.outputColorSpace = LinearSRGBColorSpace;
var scene = new Scene();
scene.background = new Color(0.4, 0.4, 0.4);
scene.background = new Color(0.4, 0.4, 0.4, LinearSRGBColorSpace);
var provider = new BingMapsProvider('', BingMapsProvider.AERIAL);
var map = new MapView(MapView.PLANAR, provider);
scene.add(map);
Expand Down
4 changes: 1 addition & 3 deletions examples/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -34493,14 +34493,12 @@
}

var canvas = document.getElementById('canvas');
ColorManagement.enabled = false;
var renderer = new WebGLRenderer({
canvas: canvas,
antialias: true
});
renderer.outputColorSpace = LinearSRGBColorSpace;
var scene = new Scene();
scene.background = new Color(0.4, 0.4, 0.4);
scene.background = new Color(0.4, 0.4, 0.4, LinearSRGBColorSpace);
var sky = createSky();
scene.add(sky);
var providers = createProviders();
Expand Down
9 changes: 3 additions & 6 deletions examples/transition.js
Original file line number Diff line number Diff line change
Expand Up @@ -34439,18 +34439,15 @@
var canvas = document.getElementById('canvas');
const SPHERE = 0;
const PLANE = 1;
ColorManagement.enabled = false;
const scenes = [createWorldScene(), createMapScene()];
let active = SPHERE;
let renderer = new WebGLRenderer({
canvas: canvas,
antialias: true
});
renderer.outputColorSpace = LinearSRGBColorSpace;
console.log(ColorManagement, renderer);
function createWorldScene() {
var scene = new Scene();
scene.background = new Color(0x000000);
scene.background = new Color(0x000000, LinearSRGBColorSpace);
var loader = new TextureLoader();
loader.load('2k_earth_daymap.jpg', function (texture) {
var sphere = new Mesh(new SphereGeometry(UnitsUtils.EARTH_RADIUS, 256, 256), new MeshBasicMaterial({ map: texture }));
Expand All @@ -34477,12 +34474,12 @@
controls.minDistance = 1.0;
controls.zoomSpeed = 1.0;
var scene = new Scene();
scene.background = new Color(0x444444);
scene.background = new Color(0x444444, LinearSRGBColorSpace);
var provider = new BingMapsProvider('', BingMapsProvider.AERIAL);
var map = new MapView(MapView.PLANAR, provider);
scene.add(map);
map.updateMatrixWorld(true);
scene.add(new AmbientLight(0x777777));
scene.add(new AmbientLight(0x777777, LinearSRGBColorSpace));
return { camera: camera, controls: controls, scene: scene };
}
var raycaster = new Raycaster();
Expand Down
8 changes: 2 additions & 6 deletions source/examples/basic.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
// @ts-nocheck

import {WebGLRenderer, Scene, Color, AmbientLight, PerspectiveCamera, LinearSRGBColorSpace, ColorManagement} from 'three';
import {WebGLRenderer, Scene, Color, AmbientLight, PerspectiveCamera, LinearSRGBColorSpace} from 'three';
import {MapControls} from 'three/examples/jsm/controls/MapControls.js';
import {MapView, BingMapsProvider, UnitsUtils} from '../Main';

var canvas = document.getElementById('canvas');

ColorManagement.enabled = false;

var renderer = new WebGLRenderer({
canvas: canvas,
antialias: true
});

renderer.outputColorSpace = LinearSRGBColorSpace;

var scene = new Scene();
scene.background = new Color(0.4, 0.4, 0.4);
scene.background = new Color(0.4, 0.4, 0.4, LinearSRGBColorSpace);

var provider = new BingMapsProvider('', BingMapsProvider.AERIAL);

Expand Down
6 changes: 1 addition & 5 deletions source/examples/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ import {HereMapsProvider, BingMapsProvider, MapTilerProvider, HeightDebugProvide

var canvas = document.getElementById('canvas');

ColorManagement.enabled = false;

var renderer = new WebGLRenderer({
canvas: canvas,
antialias: true
});

renderer.outputColorSpace = LinearSRGBColorSpace;

var scene = new Scene();
scene.background = new Color(0.4, 0.4, 0.4);
scene.background = new Color(0.4, 0.4, 0.4, LinearSRGBColorSpace);

var sky = createSky();
scene.add(sky);
Expand Down
12 changes: 3 additions & 9 deletions source/examples/transition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const SPHERE = 0;
// Planar earth scene
const PLANE = 1;

ColorManagement.enabled = false;

// List of scenes
const scenes = [createWorldScene(), createMapScene()];

Expand All @@ -24,15 +22,11 @@ let renderer = new WebGLRenderer({
antialias: true
});

renderer.outputColorSpace = LinearSRGBColorSpace;

console.log(ColorManagement, renderer);

// Create scene for spherical earth
function createWorldScene(): any
{
var scene = new Scene();
scene.background = new Color(0x000000);
scene.background = new Color(0x000000, LinearSRGBColorSpace);

// Globe
var loader = new TextureLoader();
Expand Down Expand Up @@ -72,15 +66,15 @@ function createMapScene(): any
controls.zoomSpeed = 1.0;

var scene = new Scene();
scene.background = new Color(0x444444);
scene.background = new Color(0x444444, LinearSRGBColorSpace);

var provider = new BingMapsProvider('', BingMapsProvider.AERIAL); // new OpenStreetMapsProvider()

var map = new MapView(MapView.PLANAR, provider);
scene.add(map);
map.updateMatrixWorld(true);

scene.add(new AmbientLight(0x777777));
scene.add(new AmbientLight(0x777777, LinearSRGBColorSpace));

return {camera: camera, controls: controls, scene: scene};
}
Expand Down

0 comments on commit f846323

Please sign in to comment.