Skip to content

Commit 849fbe3

Browse files
save file
1 parent f8c01e2 commit 849fbe3

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

merry-christmas/2025/merry-christmas-2025.html

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,9 @@ <h3>
566566

567567
spiral = new THREE.Mesh(instancedGeometry,spiralMaterial);
568568

569-
spiral.position.set(0,-1,0);
570-
//spiral.rotation.y = Math.PI/4;
571-
spiral.scale.set(1,1,1);
569+
spiral.position.set(0,-1,0);
570+
//spiral.rotation.y = Math.PI/4;
571+
spiral.scale.set(1,1,1);
572572

573573
scene.add(spiral);
574574

@@ -916,22 +916,28 @@ <h3>
916916

917917
var value = new THREE.TextureLoader().load(spark);
918918
var pointTexture = {value};
919-
const shaderMaterial = new THREE.ShaderMaterial({
920-
vertexShader,
921-
fragmentShader,
922-
uniforms : {...uniforms,pointTexture},
923-
blending : THREE.AdditiveBlending,
924-
depthTest : false,
925-
transparent : true,
926-
vertexColors : true,
927-
});
928-
919+
var shaderMaterial = new THREE.ShaderMaterial({
920+
vertexShader,
921+
fragmentShader,
922+
uniforms : {...uniforms,pointTexture},
923+
blending : THREE.AdditiveBlending,
924+
depthTest : false,
925+
transparent : true,
926+
vertexColors : true,
927+
});
929928

930929
var totalPoints = 10000;
931-
const positions = [];
932-
const colors = [];
933-
const sizes = [];
934-
const color = new THREE.Color();
930+
var positions = [];
931+
var colors = [];
932+
var sizes = [];
933+
var color = new THREE.Color();
934+
935+
if(height<1200){
936+
totalPoints=5000;
937+
}
938+
if(width<800){
939+
}
940+
935941

936942
for(let i=0;i<totalPoints;i++){
937943

0 commit comments

Comments
 (0)