Commit 6cc674d
committed
Fixed issues with rotate() in 3D
Adjusted PMatrix3D.prototype.rotate(angle, v0, v1, v2):
- added normalization for cases when <v0, v1, v2> was not a unit vector
- zero vector now does not cause rotation
- fixed an incorrect argument check
- changed unit tests (!) which reflected different assumptions than
standard Processing (weren't normalizing and were accepting zero
vector). Current tests now match output for Java mode.
Added above rotation functionality to Drawing3D.prototype.rotate (fixes
processing-js#89).1 parent 7c84583 commit 6cc674d
File tree
4 files changed
+323
-294
lines changed- src
- test/unit
4 files changed
+323
-294
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11319 | 11319 | | |
11320 | 11320 | | |
11321 | 11321 | | |
11322 | | - | |
| 11322 | + | |
11323 | 11323 | | |
11324 | 11324 | | |
11325 | | - | |
| 11325 | + | |
| 11326 | + | |
| 11327 | + | |
| 11328 | + | |
| 11329 | + | |
| 11330 | + | |
| 11331 | + | |
| 11332 | + | |
| 11333 | + | |
| 11334 | + | |
11326 | 11335 | | |
11327 | 11336 | | |
11328 | 11337 | | |
| |||
13136 | 13145 | | |
13137 | 13146 | | |
13138 | 13147 | | |
13139 | | - | |
| 13148 | + | |
| 13149 | + | |
| 13150 | + | |
| 13151 | + | |
| 13152 | + | |
| 13153 | + | |
13140 | 13154 | | |
13141 | 13155 | | |
13142 | 13156 | | |
| |||
0 commit comments