awacke1 commited on
Commit
ecd05fd
1 Parent(s): 190a0eb

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +4 -4
index.html CHANGED
@@ -30,7 +30,7 @@
30
  AFRAME.registerComponent('snowflake', {
31
  schema: {
32
  size: { type: 'number', default: 0.1 },
33
- meltTime: { type: 'number', default: 10000 }
34
  },
35
  init: function() {
36
  let size = this.data.size;
@@ -47,10 +47,10 @@
47
  startMeltingLoop: function() {
48
  const resetAndStartAgain = () => {
49
  this.resetPosition();
50
- setTimeout(resetAndStartAgain, Math.random() * this.data.meltTime + 5000);
51
  };
52
 
53
- setTimeout(resetAndStartAgain, Math.random() * this.data.meltTime + 5000);
54
  },
55
  resetPosition: function() {
56
  this.el.object3D.position.set(
@@ -61,7 +61,7 @@
61
 
62
  this.velocity = new THREE.Vector3(
63
  (Math.random() - 0.5) * 0.01, // Random wind effect
64
- -0.01, // Falling speed
65
  (Math.random() - 0.5) * 0.01 // Random wind effect
66
  );
67
  },
 
30
  AFRAME.registerComponent('snowflake', {
31
  schema: {
32
  size: { type: 'number', default: 0.1 },
33
+ meltTime: { type: 'number', default: 15000 }
34
  },
35
  init: function() {
36
  let size = this.data.size;
 
47
  startMeltingLoop: function() {
48
  const resetAndStartAgain = () => {
49
  this.resetPosition();
50
+ setTimeout(resetAndStartAgain, Math.random() * this.data.meltTime + 15000);
51
  };
52
 
53
+ setTimeout(resetAndStartAgain, Math.random() * this.data.meltTime + 15000);
54
  },
55
  resetPosition: function() {
56
  this.el.object3D.position.set(
 
61
 
62
  this.velocity = new THREE.Vector3(
63
  (Math.random() - 0.5) * 0.01, // Random wind effect
64
+ -0.02, // Falling speed
65
  (Math.random() - 0.5) * 0.01 // Random wind effect
66
  );
67
  },