Skip to content

Commit

Permalink
finally almost doen with points sys
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmmed-binas committed Apr 5, 2024
1 parent 7655031 commit 876a4d8
Show file tree
Hide file tree
Showing 30 changed files with 571 additions and 18,720 deletions.
27 changes: 27 additions & 0 deletions Locations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//camera facing z dir
let setsz = [
[15,16,17],
[12,13,14],
[9,10,11],
[15,12,9],
[16,13,10],
[17,14,11],
[15,13,11],
[17,13,9],
//camera facing -z dir
[8,5,2],
[7,4,1],
[6,3,0],
[8,7,6],
[5,4,3],
[2,1,0],
[8,4,0],
[6,4,2]
//
];





export default setsz;
71 changes: 69 additions & 2 deletions grids.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,72 @@
const lineMaterial = new THREE.LineBasicMaterial({
color: '',
function hexToRgb(hex) {
return {
r: ((hex >> 16) & 255) / 255,
g: ((hex >> 8) & 255) / 255,
b: (hex & 255) / 255
};
}

const colorMap = {
"Celestial Crimson": [0x811453, 0xdd2f59, 0xffb98a],
"Starlight Silver": [0x414e6d, 0xaebdc7, 0xe9ecef],
"Galactic Teal": [0x034752, 0x0092a6, 0x23c5e0],
"Nebula Purple": [0x490092, 0x8700e8, 0xba80e8],
"Cosmic Blue": [0x00171f, 0x0a4f62, 0x00a4c4],
"original": [0xff0000, 0x00ff00, 0x0000ff]
};

let selectedColorPalette;
let color;

function setColorFromPalette(){
const selectedPalette=document.getElementById('colorSelect');
if (!selectedPalette) {
console.error("No color palette selected.");
return;
}
const paletteName = selectedPalette.value;
if (!(paletteName in colorMap)) {
console.error("Invalid color palette name:", paletteName);
return;
}
if (paletteName !== selectedColorPalette) {
selectedColorPalette = paletteName;
const colorHex = colorMap[paletteName][1];
const rgb = hexToRgb(colorHex);
color = new THREE.Color(rgb.r, rgb.g, rgb.b);
lineMaterial.color.set(color);

}
}

function applySettings() {
setColorFromPalette();
console.log("Settings applied.");
}

document.getElementById("applySettings").addEventListener("click", applySettings);


document.addEventListener("DOMContentLoaded", function() {
// Wait for the DOM content to be fully loaded
document.getElementById("applySettings").click(); // Programmatically trigger a click event on the button
console.log("Theme Activated..................")
});














let lineMaterial = new THREE.LineBasicMaterial({
linewidth: 10,
});

Expand Down
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function hello(){
console.log("woooooo")
}


hello();
Binary file added mixkit-negative.wav
Binary file not shown.
23 changes: 0 additions & 23 deletions my-react-app/.gitignore

This file was deleted.

70 changes: 0 additions & 70 deletions my-react-app/README.md

This file was deleted.

Loading

0 comments on commit 876a4d8

Please sign in to comment.