-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
setAttribute() function for defining custom shader attributes #7276
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
Merged
Merged
Changes from all commits
Commits
Show all changes
98 commits
Select commit
Hold shift + click to select a range
b305b1b
immediate mode geometry properties are fully deleted
lukeplowden 4dcf0d9
updated renderer.setAttribute() call to reflect new method name
lukeplowden 9d7ab37
removed debugging log
lukeplowden 9b3909a
updated to take array or single value
lukeplowden 913131e
removed empty lines
lukeplowden 88c7fbc
beginShape updated for tesselated shapes and to reset new attributes …
lukeplowden 19a3d70
set more than one custom attribute per shape/geometry. back fill with…
lukeplowden ae52039
refactor setAttribute method to update a userAttributes object and in…
lukeplowden 72cf3bc
_tesselateShape works with custom attributes
lukeplowden 03d2e5e
changed references to prototype.tessyvertexSize to this.tessyVertexSi…
lukeplowden 616d7ca
free user buffers
lukeplowden 8d2656f
moved user attributes section to the bottom of createBuffers()
lukeplowden 859ac70
ignore my dev folder
lukeplowden cafdc1b
fixed a bug in _tesselateShape miscounting memory offset for custom a…
lukeplowden 0e35884
define user attributes array upfront
lukeplowden d842f05
prepare immediate user buffers
lukeplowden 33259c0
bool for immediate user attributes, arrays for user attributes p5.Ren…
lukeplowden b5c3213
used const reference to geometry which was already defined but unused
lukeplowden e038c9c
prepare user attribute buffers
lukeplowden f7d2b99
handled differences in custom attributes between geometries in the bu…
lukeplowden 55a37af
user attributes is now a single Object instead of an array of them
lukeplowden dd08014
reflect the change of geometry custom attributes from objects in an a…
lukeplowden e2220e7
Merge pull request #3 from lukeplowden/p5-attributes
lukeplowden a801e49
Remove Object.keys intermediate array and loop directly on user attri…
lukeplowden 6ec85c1
Added an optional size parameter to setAttribute so that bigger chunk…
lukeplowden 59ed53b
Remove object.entries iteration for 'in' loop and changed to use the …
lukeplowden 3d19521
remove old implementation with extra loop
lukeplowden 04201c5
Early return if the does not have a custom attribute required by the …
lukeplowden 68d9132
Replaced Object.keys/entries arrays with 'for in' loops and use new s…
lukeplowden 504cf5a
simplify for loop and remove unnecessary check
lukeplowden e64b3f0
Fixed a bug where if an attribute was set but not applied to any vert…
lukeplowden f38819b
Changed <code> block to backticks in normal documentation
lukeplowden f30e3ee
Initial draft of setAttribute() function documentation
lukeplowden fc09ce1
added old documentation files back for compatibility & preview
lukeplowden d308bd8
add custom vertex attributes to the 'TESS preserves vertex data' test
lukeplowden cf03836
delete custom attributes on reset, change Object.keys to 'for in' loop
lukeplowden 9f91d51
Add check in case there is an incorrect number of attributes on a geo…
lukeplowden fc47dcb
remove redundant checks
lukeplowden 874c363
preparing to add immediate buffer strides re:custom attributes
lukeplowden 27610ec
comment to remind me to convert custom attributes edgesToVertices
lukeplowden 103d6eb
update the libtess combineCallback to handle custom attributes/ verte…
lukeplowden e004a8d
rebuild the tesselator in case tessyvertexsize changes (custom attrib…
lukeplowden 7bae702
Added a function to update the libtess tesselator's combine callback …
lukeplowden c3ad1fc
update the tesselators combine callback instead of reinitializing the…
lukeplowden 744141f
Correct bugs related to overlapping vertices
lukeplowden 5bb41b5
remove old scripts
lukeplowden 1a03229
Merge pull request #5 from lukeplowden/docs
lukeplowden 3ffe8cc
convert tessy combinecallback to arrow function so that custom attrib…
lukeplowden afdf29d
remove redundant function calls to update tessy combine callback
lukeplowden 383fe8e
Changed user attributes source array on geometry to include 'Src' on …
lukeplowden c2fd8b7
interpolate custom attributes on quadratic curves
lukeplowden 7107d7c
Update custom attribute test as geometrie's source attribute names no…
lukeplowden bb5ac02
Interpolate user attributes across bezierVertex
lukeplowden 233ed4b
updated setAttribute documentation
lukeplowden 9f24576
Added a second example for setAttribute()
lukeplowden b41b013
add custom attributes to buffer strides for quad strip/ quad
lukeplowden ebce73e
added visual tests for setAttribute()
lukeplowden e46c2d7
improved error message for when working directly with geometry.setatt…
lukeplowden d8318e1
reset userattributes object instead of deleting (its likely to be use…
lukeplowden 968a05e
remove old user defined render buffers when model is called
lukeplowden a66af69
Added a bunch of tests for setAttribute()
lukeplowden 62a4afa
fixed some bugs in examples for setAttribute
lukeplowden 01c2d3b
scaled down the example canvas size to correct (100,100) size
lukeplowden d8db76e
Added explanation to the setAttribute method in geometry.
lukeplowden 8d97dc1
added initial docs for Geometry.setAttribute
lukeplowden 65f8a08
added a reference to the geometry method at the end of setAttribute i…
lukeplowden eb18e6f
added an example to set geometry method
lukeplowden 6b0ad95
fixed syntax error in set attribute example
lukeplowden 70d64c7
changed some tests from assert.deepEqual() to expect().to.containSubset
lukeplowden 9d1cd6e
add some comments to the example
lukeplowden 656d37f
change x * x to pow(x, x)
lukeplowden 5c967dc
Updated setAttribute Documentation.
lukeplowden a2dd8e4
Changed 'grey' to 'gray'
lukeplowden 86cabd4
fix some bugs in one example
lukeplowden 7539a7b
change cellSize in example
lukeplowden 3b7d8f9
add a custom attribute helper type and refactor to use it
lukeplowden 3bcce8b
Refactor to use the geometry user attributes helper object
lukeplowden 0d6b6c9
added getName to user attributes
lukeplowden 1b9e569
use new user Attribute Helper implementation of setAttribute
lukeplowden 69e3f08
use new implementation for setAttribute with helper
lukeplowden 0ccfb5d
fix silling in missing values for custom attribs
lukeplowden f5c667f
fix custom attributes geom building
lukeplowden 550f666
add size parameter for geometry.setattribute
lukeplowden 5fc8502
Typo
lukeplowden 2fc7567
Fixed documentation
lukeplowden 1244d80
remove auto current data setting
lukeplowden daf9cf0
changed method call for more direct version
lukeplowden 4ad4770
Fixed bug where geometry custom src array was not reset properly
lukeplowden a91088f
moved this.tessyVertexSize declaration into _initTessy()
lukeplowden cdf7300
quadraticVertex working again.
lukeplowden 5565023
custom attributes also on 6 vertices quadratic vertex
lukeplowden 6b183b4
bezier vertex interpolates custom attributes
lukeplowden cff4074
updated tests for new custom attribute helper object
lukeplowden b086fea
updated documentation
lukeplowden 9ab620f
Put quote marks in error message
lukeplowden 38ae74b
Merge branch 'attribute-helpers'
lukeplowden 0da4073
changed 'setAttribute()' to 'vertexProperty()' and all references, va…
lukeplowden 22cad2b
remove my temporary gitignore for dev folder
lukeplowden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
*.DS_Store | ||
.project | ||
node_modules/* | ||
experiments/* | ||
lib_old/* | ||
lib/p5.* | ||
lib/modules | ||
docs/reference/* | ||
!*.gitkeep | ||
examples/3d/ | ||
.idea | ||
dist/ | ||
p5.zip | ||
bower-repo/ | ||
p5-website/ | ||
.vscode/settings.json | ||
.nyc_output/* | ||
coverage/ | ||
lib/p5-test.js | ||
release/ | ||
yarn.lock | ||
docs/data.json | ||
analyzer/ | ||
preview/ | ||
*.DS_Store | ||
.project | ||
node_modules/* | ||
experiments/* | ||
lib_old/* | ||
lib/p5.* | ||
lib/modules | ||
docs/reference/* | ||
!*.gitkeep | ||
examples/3d/ | ||
.idea | ||
dist/ | ||
p5.zip | ||
bower-repo/ | ||
p5-website/ | ||
.vscode/settings.json | ||
.nyc_output/* | ||
coverage/ | ||
lib/p5-test.js | ||
release/ | ||
yarn.lock | ||
docs/data.json | ||
analyzer/ | ||
preview/ | ||
__screenshots__/ |
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
Oops, something went wrong.
Oops, something went wrong.
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.