Skip to content

Commit e10f503

Browse files
committedApr 13, 2023
Remove unused CSS
1 parent 09b59b7 commit e10f503

File tree

6 files changed

+11
-137
lines changed

6 files changed

+11
-137
lines changed
 

‎index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Vite + React</title>
6+
<title>threejs-react-wrapper</title>
77
</head>
88
<body>
99
<div id="root"></div>

‎src/App.css

-42
This file was deleted.

‎src/App.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import './App.css';
21
import { useControls } from 'leva';
32
import { ThreeWrapper } from './components/threeWrapper/ThreeWrapper';
43

‎src/components/threeWrapper/js/main.js

+5-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
import * as THREE from 'three';
2-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
3-
import Stats from 'three/examples/jsm/libs/stats.module.js';
2+
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
3+
import Stats from 'three/addons/libs/stats.module.js';
44

55
import testcard from '../assets/testcard.jpg';
66

77
/*
8-
9-
Main Three.js code
10-
11-
A rotating cube with orbit controls and stats. This is a vanilla JS ES6 module,
12-
as used in the threejs examples. threejs loaded via NPM.
13-
14-
Assets can be loaded via imports (see testcard above), or directly from
15-
public folder by using something like: process.env.PUBLIC_URL + '/assets/testcard.jpg'
16-
https://create-react-app.dev/docs/using-the-public-folder/
17-
8+
Main Three.js code. A rotating cube with orbit controls and stats.
9+
This is a vanilla JS ES6 module, as used in the threejs examples.
10+
Assets can be loaded via imports (see testcard.jpg above).
1811
*/
1912

2013
console.log('THREE version', THREE.REVISION);
@@ -58,15 +51,9 @@ export function init(canvas) {
5851
}
5952

6053
function update() {
61-
//console.log('threejs update');
6254
raf = requestAnimationFrame(update);
63-
64-
//if (speed !== undefined) {
65-
//console.log(cube.rotation.x, props.props.speedX);
6655
cube.rotation.x += Number(props.speedX) / 20;
6756
cube.rotation.y += Number(props.speedY) / 20;
68-
//}
69-
// cube.rotation.y += speed / 10;
7057
renderer.render(scene, camera);
7158
stats.update();
7259
controls.update();

‎src/index.css

-69
This file was deleted.

‎src/main.jsx

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import React from 'react'
2-
import ReactDOM from 'react-dom/client'
3-
import App from './App'
4-
import './index.css'
1+
import React from 'react';
2+
import ReactDOM from 'react-dom/client';
3+
import App from './App';
54

65
ReactDOM.createRoot(document.getElementById('root')).render(
76
<React.StrictMode>
87
<App />
9-
</React.StrictMode>,
10-
)
8+
</React.StrictMode>
9+
);

0 commit comments

Comments
 (0)
Please sign in to comment.