RangeError: Maximum call stack size exceeded when exporting to gilt file using GLTFExporter
还没有人认领这个 Issue。
- #438 来自 @cpruijsen —— 已关闭,未合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- javascript, react, three.js
调研方向
从链接的复现项目开始,运行 npm install 和 npm run dev,然后点击 Download GLTF 按钮以复现 RangeError。跟踪 GLTFExporter.parse 经过 readAsDataURL 的调用流程,并将提供的实现与 FileReader 版本进行比较。当导出不再超出调用栈并生成 GLTF 文件时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
@react-three/dreiversion: ^10.0.4@react-three/fiberversion: ^9.1.0three-stdlibversion: 2.35.14
Problem description:
I get an error when exporting to a gltf file using the following function.
- Components used:
GLTFExporter - Functions used:
parse
Relevant code:
sample:
https://github.com/activeguild/gltfexporter-bug
npm install
npm run dev`
Download GLTFbutton clicked
Suggested solution:
before
async function readAsDataURL(blob) {
const buffer = await blob.arrayBuffer();
const data = btoa(String.fromCharCode(...new Uint8Array(buffer)));
return `data:${blob.type || ""};base64,${data}`;
}
after
async function readAsDataURL(blob) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onloadend = () => resolve(reader.result);
reader.onerror = reject;
reader.readAsDataURL(blob);
});
}
- 主要语言
- JavaScript
- 星标
- 863
- 派生
- 146
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pmndrs/three-stdlib 的其他 Issue
-
SSAOPass height type error,It's number not boolean可能已有人在做 @Techsynx 于 23 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 62/100
pmndrs/three-stdlib#423 ·
-
难度 4/5 3-5 天 新手友好度 58/100
pmndrs/three-stdlib#437 ·
-
bug
难度 4/5 3-5 天 新手友好度 42/100
pmndrs/three-stdlib#435 ·
-
OrbitControls touch crashes on Expo mobile app可能已有人在做 @adamistheanswer 于 164 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 68/100
pmndrs/three-stdlib#426 · 1 条评论 · 1 个 reaction ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 45/100
pmndrs/three-stdlib#425 ·
查看 pmndrs/three-stdlib 的全部 Issue
相似的 Issue
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 85/100
-
Add a language未关闭good first issue
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement frontend priority:P3
难度 2/5 1-3 小时 新手友好度 72/100
geolens-io/geolens#4153 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 66/100
xdelmo/Portfolio-minimal#667 ·
维护者通常 1 天内回复
-
enhancement javascript
难度 2/5 1-3 小时 新手友好度 88/100
tamadalab/welfare-time#165 ·
维护者通常 1 天内回复