Update src/extensions/scratchLab_animatedText/index.js
Browse files
src/extensions/scratchLab_animatedText/index.js
CHANGED
@@ -891,8 +891,12 @@ class Scratch3TextBlocks {
|
|
891 |
|
892 |
if (!textState.visible) return; // Resetting to costume is done in clear block, early return here is for clones
|
893 |
|
|
|
894 |
textState.skinId = this.runtime.renderer.updateTextCostumeSkin(textState);
|
895 |
this.runtime.renderer.updateDrawableSkinId(target.drawableID, textState.skinId);
|
|
|
|
|
|
|
896 |
}
|
897 |
|
898 |
/**
|
@@ -948,6 +952,23 @@ class Scratch3TextBlocks {
|
|
948 |
textState.skinId = null;
|
949 |
}
|
950 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
951 |
}
|
952 |
|
953 |
module.exports = Scratch3TextBlocks;
|
|
|
891 |
|
892 |
if (!textState.visible) return; // Resetting to costume is done in clear block, early return here is for clones
|
893 |
|
894 |
+
const needsInit = textState.skinId === null;
|
895 |
textState.skinId = this.runtime.renderer.updateTextCostumeSkin(textState);
|
896 |
this.runtime.renderer.updateDrawableSkinId(target.drawableID, textState.skinId);
|
897 |
+
if (needsInit) queueMicrotask(() => {
|
898 |
+
this.runtime.renderer._allSkins[textState.skinId]?.setTextAndStyle(textState);
|
899 |
+
});
|
900 |
}
|
901 |
|
902 |
/**
|
|
|
952 |
textState.skinId = null;
|
953 |
}
|
954 |
}
|
955 |
+
|
956 |
+
/* These Need Functionality, ported for Turbowarp Support */
|
957 |
+
setAlignment(_) {}
|
958 |
+
setWidthValue(_) {}
|
959 |
+
resetWidth(_) {}
|
960 |
+
getLines(_) {}
|
961 |
+
startAnimate(_) {}
|
962 |
+
animateUntilDone(_) {}
|
963 |
+
isAnimating(_) {}
|
964 |
+
setAnimateDuration(_) {}
|
965 |
+
resetAnimateDuration(_) {}
|
966 |
+
getAnimateDuration(_) {}
|
967 |
+
setTypeDelay(_) {}
|
968 |
+
resetTypeDelay(_) {}
|
969 |
+
getTypeDelay(_) {}
|
970 |
+
textActive(_) {}
|
971 |
+
getTextAttribute(_) {}
|
972 |
}
|
973 |
|
974 |
module.exports = Scratch3TextBlocks;
|