#
luxiaotao1123
2024-02-29 fde2221d08d31f94bcd67367f53f480f57f09fa5
#
1个文件已修改
31 ■■■■■ 已修改文件
zy-asrs-flow/src/pages/map/index.jsx 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/index.jsx
@@ -3,23 +3,34 @@
import * as TWEEDLE from 'tweedle.js';
const Map = () => {
    const app = new PIXI.Application({
        width: window.innerWidth,
        height: window.innerHeight,
        antialias: true,
    })
    const map = React.useRef();
    React.useEffect(() => {
        const app = new PIXI.Application({
            width: window.innerWidth,
            height: window.innerHeight,
            background: '#1099bb',
            antialias: true,
        })
    app.stage.interactive = true;
    app.stage.hitArea = app.screen;
        app.stage.interactive = true;
        app.stage.hitArea = app.screen;
    globalThis.__PIXI_APP__ = app;
        globalThis.__PIXI_APP__ = app;
    document.body.appendChild(app.view);
        map.current.appendChild(app.view);
        return () => {
            app.destroy(true, true);
        }
    }, []);
    return (
        <>
            <h1>Map</h1>
            <div
                ref={map}
            >
            </div>
        </>
    )
}