Correct parsers
This commit is contained in:
parent
7fe5d03a09
commit
0d0190fd8e
9 changed files with 437 additions and 169 deletions
|
@ -2,15 +2,26 @@
|
|||
|
||||
import { useEffect, useRef } from "react";
|
||||
import { init } from "../three/utils/init";
|
||||
import { initSimple } from "../three/simple-example";
|
||||
|
||||
export function Map() {
|
||||
const divRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
let ignore = false;
|
||||
if (!divRef.current) return;
|
||||
init(divRef.current);
|
||||
//initSimple(divRef.current);
|
||||
|
||||
if (!ignore) {
|
||||
init(divRef.current);
|
||||
}
|
||||
|
||||
return () => {
|
||||
ignore = true;
|
||||
};
|
||||
}, [divRef]);
|
||||
|
||||
return <div className="w-full h-full" ref={divRef}></div>;
|
||||
return (
|
||||
<div className="w-full h-full flex flex-col justify-center">
|
||||
<div className="w-full h-full" ref={divRef}></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue