# three_stl_react **Repository Path**: wilmerxu/three_stl_react ## Basic Information - **Project Name**: three_stl_react - **Description**: react+typescript,基于three库加载stl文件。 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-06-19 - **Last Updated**: 2021-06-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # react+typescript项目,基于three库,加载stl模型文件。 ## 安装方法 npm i ## 启动调试 npm run start ## 编译打包 npm run build ### 如果启动报错: React App 启动报错: Cannot read property ‘forEach‘ of undefined ### 处理方法: 这个问题是因为安装了react-devtools扩展程序导致的 找到node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js,注释导致报错的那一行: RefreshRuntime.injectIntoGlobalHook(safeThis); ### 测试demo stl_files目录下有可测试的stl文件,选择上传即可。 ### 效果图 ![输入图片说明](https://images.gitee.com/uploads/images/2021/0620/215852_703c02e2_5673492.png "屏幕截图.png")