Fix lints
This commit is contained in:
parent
6fc5e442ab
commit
55229a9a84
1 changed files with 0 additions and 34 deletions
|
@ -8,24 +8,12 @@ import {
|
||||||
Object3D,
|
Object3D,
|
||||||
AxesHelper,
|
AxesHelper,
|
||||||
OrthographicCamera,
|
OrthographicCamera,
|
||||||
Camera,
|
|
||||||
CanvasTexture,
|
|
||||||
SpriteMaterial,
|
|
||||||
Sprite,
|
|
||||||
Euler,
|
|
||||||
Color,
|
Color,
|
||||||
Matrix4,
|
|
||||||
Vector3,
|
Vector3,
|
||||||
Quaternion,
|
|
||||||
SphereGeometry,
|
|
||||||
MeshBasicMaterial,
|
|
||||||
Mesh,
|
|
||||||
} from "three";
|
} from "three";
|
||||||
|
|
||||||
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
|
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
|
||||||
import { getCenter3D, getMaxSize } from "./utils";
|
import { getCenter3D, getMaxSize } from "./utils";
|
||||||
import { createLines } from "./build-coordinate-grid";
|
|
||||||
import { max } from "d3";
|
|
||||||
|
|
||||||
export interface Extent {
|
export interface Extent {
|
||||||
xmin: number;
|
xmin: number;
|
||||||
|
@ -200,25 +188,3 @@ function buildDefaultLights(scene: Scene, extent: Extent) {
|
||||||
lightsGroup.add(...lights);
|
lightsGroup.add(...lights);
|
||||||
scene.add(lightsGroup);
|
scene.add(lightsGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
function createTextSprite(text: string, color = "white") {
|
|
||||||
const canvas = document.createElement("canvas");
|
|
||||||
const ctx = canvas.getContext("2d");
|
|
||||||
|
|
||||||
canvas.width = 256;
|
|
||||||
canvas.height = 128;
|
|
||||||
|
|
||||||
if (ctx) {
|
|
||||||
ctx.fillStyle = color;
|
|
||||||
ctx.font = "24px Arial";
|
|
||||||
ctx.textAlign = "center";
|
|
||||||
ctx.fillText(text, canvas.width / 2, canvas.height / 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
const texture = new CanvasTexture(canvas);
|
|
||||||
const material = new SpriteMaterial({ map: texture });
|
|
||||||
const sprite = new Sprite(material);
|
|
||||||
sprite.scale.set(0.3, 0.15, 1);
|
|
||||||
|
|
||||||
return sprite;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue