Adding code enhancements from develop to master - #121
Merged
Conversation
[Event System](https://p5.readthedocs.io/en/latest/guides/for-processing-users.html#event-system) example was calling event.key() instead of referencing the attribute event.key.
Instead of using width and height of the sketch, text() now uses proper boundaries by making use of getsize() and getsize_multiline() methods of the font object.
Improved text()
Like this: self.acc = (mouse - self.pos).normalize()
The timing function in all cases when the loop is entered changes the value of looping to True This prevents outside control of the looping variable which is desirable when no_loop and loop functions are meant to be used.
The background() function is modified to change the background color permanently The function also returns the background color now, as expected
Further changed background() function to set image as the permanent renderer background image Removes inconsistency between color and image in background() function.
…vaishnavsm-fix-issue-60
Fixes #108 . In the previous code, the variables ` self.redraw` and ` self.looping` were assigned after the ` setup()` function is called. This prevented the ` loop()`, ` no_loop()` and ` redraw()` to function correctly inside the ` setup()` function. I have fixed the issue by defining the variables self.looping and self.redraw as ` None` in the beginning and assign them after setup() function is called if they are not assigned inside the setup() function (line 145 and 147)
Changes made: * included p5.min.js file in _static folder. * Used conf.py file to include p5.min.js in the html * Imported examples from p5js.org website
the code from renderer.py is imported to renderer2d.py file. This will help later on when 3d renderer will be seperate from the 2d renderer.
Changes made: 1. The rendering for individual shaps is done by calling the renderer multiple times. This will be improved in the future. 2. Created renderer for lines. Currently, it is not implemented efficiently. I will make it efficient with the use of vertex buffers.
Earlier, triangle library would give "segmentation fault" for certain shapes. I figured out that whenever a vertex is duplicated in the vertex list, the program crashes. Hence, I am making a check in the _sanitize_vertex_list function to prevent same vertex to be occour consecutively i the vertex list.
add missing install dependency as per #118
…ngle add triangle to requirements.txt, setup.py
Fixed #90 When rendering arc, the _draw_outline_vertices function returns the indexes of the edges and not the edges themselves. This leads to rendering of straight line from top left of the screen.
Fixes #91 Earlier, the last face of the shape, created an additional triangle which wasnt required.
Fixes #106.
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.
As part of latest p5.py release v0.6.0. I am merging the
developbranch intomaster.The
developbranch contain new APIs, documentation and bug fixes. Most of the APIs were added as part of Google Summer of Code (GSoC) 2019 project. The comprehensive list of APIs added through GSoC 2019 can be found at the GSoC 2019 milestone issue tracker.Thanks to @jeremydouglass, @1deadpixl, @danidask, @dbhavsar76, @jeremy886 and @vaishnavsm for your contribution.