mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-18 15:26:19 +08:00
Particle muting + improved molang performance
This commit is contained in:
parent
808c28e6ba
commit
b988681abb
@ -954,7 +954,6 @@ class EffectAnimator extends GeneralAnimator {
|
||||
}
|
||||
displayFrame() {
|
||||
if (!this.muted.sound) {
|
||||
// Sounds
|
||||
this.sound.forEach(kf => {
|
||||
var diff = kf.time - Timeline.time;
|
||||
if (diff >= 0 && diff < (1/60) * (Timeline.playback_speed/100)) {
|
||||
@ -974,7 +973,9 @@ class EffectAnimator extends GeneralAnimator {
|
||||
}
|
||||
}
|
||||
})
|
||||
// Particles
|
||||
}
|
||||
|
||||
if (!this.muted.particle) {
|
||||
this.particle.forEach(kf => {
|
||||
var diff = Timeline.time - kf.time;
|
||||
if (diff >= 0) {
|
||||
|
@ -23,8 +23,10 @@
|
||||
|
||||
// Util
|
||||
function trimInput(string) {
|
||||
string = string.toLowerCase();
|
||||
string = string.replace(/;\s+/g, ';').replace(/;\s*$/, '').trim();
|
||||
string = string.toLowerCase().trim();
|
||||
if (string.includes(';')) {
|
||||
string = string.replace(/;\s+/g, ';').replace(/;\s*$/, '');
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
||||
@ -44,7 +46,6 @@
|
||||
|
||||
// Tree Types
|
||||
function Expression(string) {
|
||||
this.original_input = string;
|
||||
this.lines = string.split(';').map(line => {
|
||||
return iterateString(line);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user