@turbowarp/types 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/tests/test-scratch-vm.ts
CHANGED
|
@@ -46,6 +46,16 @@ if (target) {
|
|
|
46
46
|
bubbleState.text.charAt(0);
|
|
47
47
|
target.setCustomState('Scratch.looks', bubbleState);
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
target.on('TARGET_MOVED', (target, fromX, fromY, forced) => {
|
|
51
|
+
const id: string = target.id;
|
|
52
|
+
const x: number = fromX;
|
|
53
|
+
const y: number = fromY;
|
|
54
|
+
const f: boolean | undefined = forced;
|
|
55
|
+
})
|
|
56
|
+
target.on('EVENT_TARGET_VISUAL_CHANGE', (target) => {
|
|
57
|
+
const id: string = target.id;
|
|
58
|
+
});
|
|
49
59
|
} else {
|
|
50
60
|
const doesNotExist: undefined = target;
|
|
51
61
|
}
|
package/types/scratch-audio.d.ts
CHANGED
package/types/scratch-vm.d.ts
CHANGED
|
@@ -289,7 +289,7 @@ declare namespace VM {
|
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
interface BaseTarget extends EventEmitter<
|
|
292
|
+
interface BaseTarget extends EventEmitter<RenderedTargetEventMap> {
|
|
293
293
|
runtime: Runtime;
|
|
294
294
|
|
|
295
295
|
id: string;
|
|
@@ -356,7 +356,9 @@ declare namespace VM {
|
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
interface RenderedTargetEventMap {
|
|
359
|
-
|
|
359
|
+
TARGET_MOVED: [RenderedTarget, number, number, boolean?];
|
|
360
|
+
|
|
361
|
+
EVENT_TARGET_VISUAL_CHANGE: [RenderedTarget];
|
|
360
362
|
}
|
|
361
363
|
|
|
362
364
|
const enum Effect {
|
|
@@ -1574,7 +1576,7 @@ declare class VM extends EventEmitter<VM.VirtualMachineEventMap> {
|
|
|
1574
1576
|
* Emit a workspaceUpdate event.
|
|
1575
1577
|
*/
|
|
1576
1578
|
emitWorkspaceUpdate(): void;
|
|
1577
|
-
|
|
1579
|
+
|
|
1578
1580
|
/**
|
|
1579
1581
|
* Post sprite info to the target that's being dragged, otherwise the editing target.
|
|
1580
1582
|
* @see {VM.Target.postSpriteInfo}
|