mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Scrolling Texts are now queued with a 600ms delay (#989)
This commit is contained in:
parent
8c84edddad
commit
5cd5de31aa
4 changed files with 43 additions and 25 deletions
|
|
@ -371,17 +371,15 @@ export function getScrollTextData(resources, resource, key) {
|
|||
return { text, stroke, fill, direction };
|
||||
}
|
||||
|
||||
export function createScrollText(actor, optionsData) {
|
||||
if (actor && optionsData?.length) {
|
||||
export function createScrollText(actor, data) {
|
||||
if (actor) {
|
||||
actor.getActiveTokens().forEach(token => {
|
||||
optionsData.forEach(data => {
|
||||
const { text, ...options } = data;
|
||||
canvas.interface.createScrollingText(token.getCenterPoint(), data.text, {
|
||||
duration: 2000,
|
||||
distance: token.h,
|
||||
jitter: 0,
|
||||
...options
|
||||
});
|
||||
const { text, ...options } = data;
|
||||
canvas.interface.createScrollingText(token.getCenterPoint(), data.text, {
|
||||
duration: 2000,
|
||||
distance: token.h,
|
||||
jitter: 0,
|
||||
...options
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue