diff --git a/blenderTextureGen/CubeTexture/CubeTextureFullTransperent.blend b/blenderTextureGen/CubeTexture/CubeTextureFullTransperent.blend new file mode 100644 index 0000000..73ad133 Binary files /dev/null and b/blenderTextureGen/CubeTexture/CubeTextureFullTransperent.blend differ diff --git a/blenderTextureGen/CubeTexture/CubeTextureFullTransperent.blend1 b/blenderTextureGen/CubeTexture/CubeTextureFullTransperent.blend1 new file mode 100644 index 0000000..52426be Binary files /dev/null and b/blenderTextureGen/CubeTexture/CubeTextureFullTransperent.blend1 differ diff --git a/blenderTextureGen/CubeTexture/textures/Plane_d.001.png b/blenderTextureGen/CubeTexture/textures/Plane_d.001.png new file mode 100644 index 0000000..8560c76 Binary files /dev/null and b/blenderTextureGen/CubeTexture/textures/Plane_d.001.png differ diff --git a/src/App.svelte b/src/App.svelte index ee8657f..a020fee 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -6,13 +6,47 @@ import ZSpacer from './lib/Universal/ZSpacer.svelte'; import Cube3D from './lib/Cube3D.svelte'; import WeAreText from './lib/WeAreText.svelte'; + import Cube3DCosmetic from './lib/Cube3DCosmetic.svelte'; + import { onMount } from "svelte"; window.onload = function() { window.scrollTo(0, 100); // Real //window.scrollTo(0, 3000); // debug }; + function randomInt(min, max) { // min and max included + return Math.floor(Math.random() * (max - min + 1) + min) + } + + function progressToSection(prog: number): number{ + return sections * prog + } + + // Fields let scrollPos: number = 0; + let parallaxProgress: number = 0; + let cosCubesPositions: number[] = []; + + const handleProgress = (progress) => { + parallaxProgress = progress; + //console.log(progress); + }; + + // Hyperparams + let sections: number = 10; + let cosmeticCubesSpawnRange: number[] = [0.0049253257070225615, 0.4404724075839424]; // Range relative to parallax progress + let numCosCubes: number = 10; + + + //Spawns the cosCubes + for (let i = 0; i < numCosCubes; i++) { + cosCubesPositions.push(randomInt(progressToSection(cosmeticCubesSpawnRange[0]),(progressToSection(cosmeticCubesSpawnRange[1])))); + } + + function debugClick(){ + console.log(progressToSection(cosmeticCubesSpawnRange[0])); + console.log(progressToSection(cosmeticCubesSpawnRange[1])); + } @@ -25,13 +59,18 @@ About - + - +
{scrollPos}
+
@@ -50,6 +89,10 @@ The deprived devs + + {#each cosCubesPositions as cosCubePos} + + {/each}
diff --git a/src/lib/Cube3D.css b/src/lib/Cube3D.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/Cube3DCosmetic.svelte b/src/lib/Cube3DCosmetic.svelte new file mode 100644 index 0000000..be18582 --- /dev/null +++ b/src/lib/Cube3DCosmetic.svelte @@ -0,0 +1,117 @@ + + + + + + + +
+ +
+
+ cube side texture +
+ +
+ cube side texture +
+ + + +
+ cube side texture +
+ +
+ cube side texture +
+ +
+ cube side texture +
+ + +
+
+
\ No newline at end of file diff --git a/src/lib/images/CubeTextureTransparent.png b/src/lib/images/CubeTextureTransparent.png new file mode 100644 index 0000000..ddb190e Binary files /dev/null and b/src/lib/images/CubeTextureTransparent.png differ