We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在每一帧去用射线判断是否在视口内 来判定是否渲染 执行你这边的函数后 性能下降了2/3 建议不用那个addclass和removeclass 直接使用transform去控制显示和隐藏 这样性能有所提高 使用之后我这边从70fps上身到了200fps if (Math.abs(pos.x) > 1 || Math.abs(pos.y) > 1 || Math.abs(pos.z) > 1) { // 点在摄像机外面 不显示 console.log(point.title, '在视口外面') point.element.style.transform = scale(0, 0) continue }
scale(0, 0)
The text was updated successfully, but these errors were encountered:
确实是,性能影响很大
Sorry, something went wrong.
No branches or pull requests
在每一帧去用射线判断是否在视口内 来判定是否渲染 执行你这边的函数后 性能下降了2/3 建议不用那个addclass和removeclass 直接使用transform去控制显示和隐藏 这样性能有所提高 使用之后我这边从70fps上身到了200fps
if (Math.abs(pos.x) > 1 || Math.abs(pos.y) > 1 || Math.abs(pos.z) > 1) {
// 点在摄像机外面 不显示
console.log(point.title, '在视口外面')
point.element.style.transform =
scale(0, 0)
continue
}
The text was updated successfully, but these errors were encountered: