Skip to content

Adding code enhancements from develop to master - #121

Merged
arihantparsoya merged 130 commits into
masterfrom
develop
Aug 26, 2019
Merged

Adding code enhancements from develop to master#121
arihantparsoya merged 130 commits into
masterfrom
develop

Conversation

@arihantparsoya

@arihantparsoya arihantparsoya commented Aug 26, 2019

Copy link
Copy Markdown
Member

As part of latest p5.py release v0.6.0. I am merging the develop branch into master.

The develop branch 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.

1deadpixl and others added 30 commits November 15, 2018 13:10
[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.
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.
… into vaishnavsm-fix-issue-60"

This reverts commit 4e0eb12, reversing
changes made to 29ff0bf.
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.
arihantparsoya and others added 29 commits August 14, 2019 22:03
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.
@arihantparsoya
arihantparsoya merged commit 66bf6c8 into master Aug 26, 2019
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

Successfully merging this pull request may close these issues.

8 participants