Skip to content
New issue

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

viewer/abstractbufferset.js error code #110

Open
CHENJIAMIAN opened this issue Jan 5, 2023 · 1 comment
Open

viewer/abstractbufferset.js error code #110

CHENJIAMIAN opened this issue Jan 5, 2023 · 1 comment

Comments

@CHENJIAMIAN
Copy link

			for (let e of s) {
				let A, B;
				if (use_positions) {
					let [a_, b_] = e.split(";");
					AA.set(a_.split(",")[0].split(' '));
					BB.set(b_.split(",")[0].split(' '));
					A = AA;
					B = BB;
				} else {
					const a = Math.floor(e / 67108864);
					const b = e - a * 67108864;
					const as = vertexOffset + a * 3;
					const bs = vertexOffset + b * 3;
					let A = gpu_data.subarray(as, as + 3);
					let B = gpu_data.subarray(bs, bs + 3);
				}
				lineRenderer.pushVertices(A, B);
			}

correct(delete scoped let):

			for (let e of s) {
				let A, B;
				if (use_positions) {
					let [a_, b_] = e.split(";");
					AA.set(a_.split(",")[0].split(' '));
					BB.set(b_.split(",")[0].split(' '));
					A = AA;
					B = BB;
				} else {
					const a = Math.floor(e / 67108864);
					const b = e - a * 67108864;
					const as = vertexOffset + a * 3;
					const bs = vertexOffset + b * 3;
					A = gpu_data.subarray(as, as + 3);
					B = gpu_data.subarray(bs, bs + 3);
				}
				lineRenderer.pushVertices(A, B);
			}
@aothms
Copy link
Member

aothms commented Jan 7, 2023

Your suggestion is correct. Can you send in a Pull Request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants