lingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
27 lines • 958 B
JavaScript
import { jsx as _jsx } from "preact/jsx-runtime";
import { useEffect, useRef } from "preact/hooks";
import { Cancellable } from "@lincode/promiselikes";
import { PANELS_HEIGHT } from "../../globals";
import { loadTerminal } from "./loadTerminal";
const Terminal = () => {
const elRef = useRef(null);
useEffect(() => {
const el = elRef.current;
if (!el)
return;
const handle = new Cancellable();
loadTerminal(el, handle);
return () => {
handle.cancel();
};
}, []);
return (_jsx("div", { className: "lingo3d-ui lingo3d-bg", style: { height: PANELS_HEIGHT }, children: _jsx("div", { ref: elRef, style: {
position: "absolute",
width: "100%",
height: "calc(100% - 10px)",
paddingLeft: "10px",
paddingTop: "10px"
} }) }));
};
export default Terminal;
//# sourceMappingURL=index.js.map