Skip to content

Commit ba21b19

Browse files
committed
Added a Lot
I added some info about Draco in the README, started work on the main.js, added some fonts, monitor videos, and some more textures. Also added the necessary packages in package.json
1 parent 1e8d3b9 commit ba21b19

17 files changed

+2676
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ This is my custom personal Portfolio website designed using ThreeJS
1111
2. Start the development server
1212

1313
`npm run dev`
14+
15+
16+
17+
For this project, I decided to also use Draco. Draco is an open-source library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
18+
19+
[GitHub](https://github.com/google/draco)

main.js

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import './style.css';
2+
import * as THREE from 'three';
3+
import * as dat from 'dat.gui';
4+
import gsap from 'gsap';
5+
import Stats from 'three/addons/libs/stats.module.js';
6+
import { OrbitControls } from 'three/addons/controls/OrbitControls';
7+
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
8+
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader';
9+
import { FontLoader } from 'three/addons/loaders/FontLoader.js';
10+
import { TextGeometry } from 'three/addons/geometries/TextGeometry.js';
11+
12+
// VARIABLES
13+
let theme = 'light';
14+
let bookCover = null;
15+
let lightSwitch = null;
16+
let titleText = null;
17+
let subtitleText = null;
18+
let mixer;
19+
let isMobile = window.matchMedia('(max-width: 992px)').matches;
20+
let canvas = document.querySelector('.experience-canvas');
21+
const loaderWrapper = document.getElementById('loader-wrapper');
22+
let clipNames = [
23+
'fan_rotation',
24+
'fan_rotation.001',
25+
'fan_rotation.002',
26+
'fan_rotation.003',
27+
'fan_rotation.004',
28+
];
29+
let projects = [
30+
{
31+
image: 'textures/',
32+
url: 'https://',
33+
},
34+
{
35+
image: 'textures/',
36+
url: 'https://',
37+
},
38+
{
39+
image: 'textures/',
40+
url: 'https://',
41+
},
42+
{
43+
image: 'textures/',
44+
url: 'https://',
45+
},
46+
];
47+
let aboutCameraPos = {
48+
x: 0.12,
49+
y: 0.2,
50+
z: 0.55,
51+
};
52+
let aboutCameraRot = {
53+
x: -1.54,
54+
y: 0.13,
55+
z: 1.41,
56+
};
57+
let projectsCameraPos = {
58+
x: 1,
59+
y: 0.45,
60+
z: 0.01,
61+
};
62+
let projectsCameraRot = {
63+
x: 0.05,
64+
y: 0.05,
65+
z: 0,
66+
};
67+
68+
// SCENE & CAMERA
69+
const scene = new THREE.Scene();
70+
const camera = new THREE.PerspectiveCamera(
71+
75,
72+
window.innerWidth / window.innerHeight,
73+
0.01,
74+
1000
75+
);
76+
let defaultCameraPos = {
77+
x: 1.009028643133046,
78+
y: 0.5463638814987481,
79+
z: 0.4983449671971262,
80+
};
81+
let defaultCamerRot = {
82+
x: -0.8313297556598935,
83+
y: 0.9383399492446749,
84+
z: 0.7240714481613063,
85+
};
86+
camera.position.set(defaultCameraPos.x, defaultCameraPos.y, defaultCameraPos.z);

0 commit comments

Comments
 (0)