Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addons: Remove GPUStatsPanel. #1246

Merged
merged 5 commits into from
Sep 22, 2024
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
28 changes: 14 additions & 14 deletions examples-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6235,17 +6235,17 @@ index 4849e7c3..4bddc484 100644
object.rotation.y = 0.25 * time;
}
diff --git a/examples-testing/examples/webgl_lines_fat.ts b/examples-testing/examples/webgl_lines_fat.ts
index 34c2e2d5..5e03987e 100644
index 7c7fee65..ba63c722 100644
--- a/examples-testing/examples/webgl_lines_fat.ts
+++ b/examples-testing/examples/webgl_lines_fat.ts
@@ -10,15 +10,20 @@ import { LineMaterial } from 'three/addons/lines/LineMaterial.js';
@@ -9,15 +9,20 @@ import { LineMaterial } from 'three/addons/lines/LineMaterial.js';
import { LineGeometry } from 'three/addons/lines/LineGeometry.js';
import * as GeometryUtils from 'three/addons/utils/GeometryUtils.js';

-let line, renderer, scene, camera, camera2, controls;
-let line1;
-let matLine, matLineBasic, matLineDashed;
-let stats, gpuPanel;
-let stats;
-let gui;
+let line: Line2,
+ renderer: THREE.WebGLRenderer,
Expand All @@ -6255,7 +6255,7 @@ index 34c2e2d5..5e03987e 100644
+ controls: OrbitControls;
+let line1: THREE.Line;
+let matLine: LineMaterial, matLineBasic: THREE.LineBasicMaterial, matLineDashed: THREE.LineDashedMaterial;
+let stats: Stats, gpuPanel: GPUStatsPanel;
+let stats: Stats;
+let gui: GUI;

// viewport
Expand All @@ -6267,30 +6267,30 @@ index 34c2e2d5..5e03987e 100644
init();

diff --git a/examples-testing/examples/webgl_lines_fat_raycasting.ts b/examples-testing/examples/webgl_lines_fat_raycasting.ts
index 75cef620..e72b18a5 100644
index 872058e0..fb622394 100644
--- a/examples-testing/examples/webgl_lines_fat_raycasting.ts
+++ b/examples-testing/examples/webgl_lines_fat_raycasting.ts
@@ -11,12 +11,13 @@ import { LineSegmentsGeometry } from 'three/addons/lines/LineSegmentsGeometry.js
@@ -10,12 +10,13 @@ import { LineSegmentsGeometry } from 'three/addons/lines/LineSegmentsGeometry.js
import { Line2 } from 'three/addons/lines/Line2.js';
import { LineGeometry } from 'three/addons/lines/LineGeometry.js';

-let line, thresholdLine, segments, thresholdSegments;
-let renderer, scene, camera, controls;
-let sphereInter, sphereOnLine;
-let stats, gpuPanel;
-let stats;
-let gui;
-let clock;
+let line: Line2, thresholdLine: Line2, segments: LineSegments2, thresholdSegments: LineSegments2;
+let renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.PerspectiveCamera, controls: OrbitControls;
+let sphereInter: THREE.Mesh<THREE.SphereGeometry, THREE.MeshBasicMaterial>,
+ sphereOnLine: THREE.Mesh<THREE.SphereGeometry, THREE.MeshBasicMaterial>;
+let stats: Stats, gpuPanel: GPUStatsPanel;
+let stats: Stats;
+let gui: GUI;
+let clock: THREE.Clock;

const color = new THREE.Color();

@@ -24,8 +25,7 @@ const pointer = new THREE.Vector2(Infinity, Infinity);
@@ -23,8 +24,7 @@ const pointer = new THREE.Vector2(Infinity, Infinity);

const raycaster = new THREE.Raycaster();

Expand All @@ -6300,7 +6300,7 @@ index 75cef620..e72b18a5 100644

const matLine = new LineMaterial({
color: 0xffffff,
@@ -173,7 +173,7 @@ function onWindowResize() {
@@ -170,7 +170,7 @@ function onWindowResize() {
renderer.setSize(window.innerWidth, window.innerHeight);
}

Expand All @@ -6309,7 +6309,7 @@ index 75cef620..e72b18a5 100644
pointer.x = (event.clientX / window.innerWidth) * 2 - 1;
pointer.y = -(event.clientY / window.innerHeight) * 2 + 1;
}
@@ -202,9 +202,9 @@ function animate() {
@@ -199,9 +199,9 @@ function animate() {
sphereOnLine.visible = true;

sphereInter.position.copy(intersects[0].point);
Expand All @@ -6321,7 +6321,7 @@ index 75cef620..e72b18a5 100644
const colors = obj.geometry.getAttribute('instanceColorStart');

color.fromBufferAttribute(colors, index);
@@ -228,7 +228,7 @@ function animate() {
@@ -223,7 +223,7 @@ function animate() {

//

Expand All @@ -6330,7 +6330,7 @@ index 75cef620..e72b18a5 100644
switch (val) {
case 0:
line.visible = true;
@@ -273,7 +273,7 @@ function initGui() {
@@ -268,7 +268,7 @@ function initGui() {

gui.add(params, 'width', 1, 10).onChange(function (val) {
matLine.linewidth = val;
Expand All @@ -6339,7 +6339,7 @@ index 75cef620..e72b18a5 100644
});

gui.add(params, 'alphaToCoverage').onChange(function (val) {
@@ -281,8 +281,8 @@ function initGui() {
@@ -276,8 +276,8 @@ function initGui() {
});

gui.add(params, 'threshold', 0, 10).onChange(function (val) {
Expand Down
1 change: 1 addition & 0 deletions examples-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"dependencies": {
"@types/three": "file:../types/three",
"prettier": "^3.3.3",
"stats-gl": "^2.2.8",
"typescript": "latest"
}
}
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion types/three/examples/jsm/Addons.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ export * as BufferGeometryUtils from "./utils/BufferGeometryUtils.js";
export * as CameraUtils from "./utils/CameraUtils.js";
export * as GeometryCompressionUtils from "./utils/GeometryCompressionUtils.js";
export * as GeometryUtils from "./utils/GeometryUtils.js";
export * from "./utils/GPUStatsPanel.js";
export * from "./utils/LDrawUtils.js";
export * from "./utils/PackedPhongMaterial.js";
export * as SceneUtils from "./utils/SceneUtils.js";
Expand Down
12 changes: 0 additions & 12 deletions types/three/examples/jsm/utils/GPUStatsPanel.d.ts

This file was deleted.

Loading