You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.model.style.backgroundImage=`url("${TAPTAPIR_TEXTURES[name]}?${random_int(0,999)}")`// add random number so the gif restarts when setting .texture again
561
+
this.model.style.backgroundImage=`url("${TAPTAPIR_TEXTURES[name]}?${random.int(0,999)}")`// add random number so the gif restarts when setting .texture again
561
562
}
562
563
this.color=color.clear
563
564
return
@@ -582,7 +583,7 @@ class Entity {
582
583
}
583
584
584
585
elseif(name.endsWith('.gif')){// .gif (ensure animation replays on reuse)
585
-
this.model.style.backgroundImage=`url("${ASSETS_FOLDER}${name}?${random_int(0,999)}")`// add random number so the gif restarts when setting .texture again
586
+
this.model.style.backgroundImage=`url("${ASSETS_FOLDER}${name}?${random.int(0,999)}")`// add random number so the gif restarts when setting .texture again
586
587
this.color=color.clear
587
588
return
588
589
}
@@ -858,29 +859,33 @@ function lerp_angle(start_angle, end_angle, t) {
858
859
}
859
860
860
861
functionclamp(num,min,max){
861
-
returnnum<=min ? min : num>=max ? max : num;
862
+
returnnum<=min ? min : num>=max ? max : num;
862
863
}
863
-
random_value=Math.random;
864
864
865
-
functionrandom_int(min,max){
866
-
min=Math.ceil(min);
867
-
max=Math.floor(max);
868
-
returnMath.floor(Math.random()*(max-min+1))+min;
869
-
}
870
-
functionrandom_choice(list){
871
-
returnlist[random_int(0,len(list)-1)]
872
-
}
873
-
functionrandom_shuffle(array){
874
-
for(leti=array.length-1;i>0;i--){
875
-
constj=Math.floor(Math.random()*(i+1));
876
-
[array[i],array[j]]=[array[j],array[i]];// Swap elements
0 commit comments