Various fixes

This commit is contained in:
barsdeveloper
2023-04-16 19:48:14 +02:00
parent c1bbbfef90
commit 6ef2225396
9 changed files with 188 additions and 18 deletions

View File

@@ -3,6 +3,7 @@ import Configuration from "./Configuration.js"
import UnionType from "./entity/UnionType.js"
/**
* @typedef {import("./Blueprint.js").default} Blueprint
* @typedef {import("./entity/IEntity.js").AnyValue} AnyValue
* @typedef {import("./entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
* @typedef {import("./entity/IEntity.js").AttributeInformation} TypeInformation
@@ -413,6 +414,16 @@ export default class Utility {
element.dispatchEvent(event)
}
/** @param {Blueprint} blueprint */
static async copy(blueprint) {
const event = new ClipboardEvent("copy", {
bubbles: true,
cancelable: true,
clipboardData: new DataTransfer(),
})
blueprint.dispatchEvent(event)
}
static animate(from, to, intervalSeconds, callback, timingFunction = x => {
const v = x ** 3.5
return v / (v + ((1 - x) ** 3.5))