Files
Graphite/frontend/src/main.ts
0HyperCube f9d772070b Add some additional image effect nodes (#869)
* Move the Subpath type to graphene-std

* Add the transform subpath node

* Delete selected nodes

* Inserting node list on right click

* Add several bitmap manipulator nodes

* Convert add node to use f64

* Add posterize node

* Rename names randomly

* Fix naming

* Exposure node

* Fix typo

* Adjust exposure node range

* Comment out vector nodes

* Adjust exposure range again

* Posterise as ints

* Rename input

* Use >= in the to hsl function
2022-12-03 14:29:45 -08:00

37 lines
1.1 KiB
TypeScript

// This file is the browser's entry point for the JS bundle
// reflect-metadata allows for runtime reflection of types in JavaScript.
// It is needed for class-transformer to work and is imported as a side effect.
// The library replaces the Reflect API on the window to support more features.
import "reflect-metadata";
import { createApp } from "vue";
import { initWasm } from "@/wasm-communication/editor";
import App from "@/App.vue";
// This exported function is called in `index.html` after confirming that the browser supports all required JS standards
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any).graphiteAppInit = async (): Promise<void> => {
// Initialize the WASM module for the editor backend
await initWasm();
// Initialize the Vue application
createApp(App)
.directive("focus", {
// When the bound element is inserted into the DOM
mounted(el) {
let focus = el;
// Find actual relevant child
while (focus.children.length) focus = focus.children[0];
// Random timeout needed?
setTimeout(() => {
focus.focus(); // Focus the element
}, 0);
},
})
.mount("#app");
};