Fix rendering issues for line, stamp, and geometry brushes#265
Merged
dmarcos merged 9 commits intoaframevr:masterfrom Mar 8, 2022
Merged
Fix rendering issues for line, stamp, and geometry brushes#265dmarcos merged 9 commits intoaframevr:masterfrom
dmarcos merged 9 commits intoaframevr:masterfrom
Conversation
This removes the remaining references to TriangleStripDrawMode. In its place is a vertex index buffer that seems to be working. Still currently an issue with strokes made after an undo action.
Undoing a stroke and then drawing again would cause it to read old data. Now vertex/index buffers are cleared back to the prevIdx on undo/clear.
For whatever reason they still aren't rendering though.
This modifies the way indices are sent to the index buffer. If the brush is strip-based, we know verts are being sent 2 at a time. If it's stamp based, we know verts are being sent 3 at a time. SharedBufferGeometry now has a strip flag and sets indices accordingly.
These brushes were not being added to the a-drawing entity. They were also missing an undo function, which is now implemented. Rainbow brush was adjusted to use indexed BufferGeometry. Increased index buffer size for sharedbuffergeometry.
dmarcos
reviewed
Mar 7, 2022
src/brushes/cubes.js
Outdated
| flatShading: true | ||
| }); | ||
| this.geometry = new THREE.BoxGeometry(1, 1, 1); | ||
| this.drawing = document.querySelector('.a-drawing'); |
Member
There was a problem hiding this comment.
this.drawingEl for style consistency
dmarcos
reviewed
Mar 7, 2022
src/brushes/single-sphere.js
Outdated
| this.object3D.add(this.mesh); | ||
| this.mesh.visible = false | ||
| this.mesh.visible = false; | ||
| this.drawing = document.querySelector('.a-drawing'); |
dmarcos
reviewed
Mar 7, 2022
src/brushes/spheres.js
Outdated
| flatShading: true | ||
| }); | ||
| this.geometry = new THREE.IcosahedronGeometry(1, 0); | ||
| this.drawing = document.querySelector('.a-drawing'); |
Member
|
Super appreciated! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.