Add reference code for Lights, Camera#115
Conversation
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Lights, CameraLights, Camera
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
jeremydouglass
left a comment
There was a problem hiding this comment.
Excellent.
Things from this commit that could also be applied to all other examples/references in master:
- 0-indexed filenames/paths
PI <- pi
| @@ -0,0 +1,18 @@ | |||
| P3D <- "processing.opengl.PGraphics3D" | |||
| PI <- pi | |||
There was a problem hiding this comment.
Good -- PI <- pi is better than PI <- 3.141592 -- but still a placeholder until PConstants are defined and loaded outside the example sketches.
In the meantime perhaps all examples using PI, HALF_PI, TWO_PI etc. should be updated to be defined in terms of the R built-in pi.
There was a problem hiding this comment.
I think it is not what we need. In GSoC we will support the variables so it is only temporary. Both pi and 3.1415 are fine, IMO.
There was a problem hiding this comment.
And in August we will remove all this tricks from example code.
There was a problem hiding this comment.
As long as they are temporary and all get cleaned up later the inconsistency now is fine.
| @@ -0,0 +1,2 @@ | |||
| test: | |||
| reference: https://processing.org/reference/images/ambientLight_0.png | |||
There was a problem hiding this comment.
I notice that the original Processing reference example images are zero-indexed, so the reference directory names and .rpde files are zero-indexed. I believe that the first batch of examples were 1-indexed, like:
examples/reference/bezierTangent/bezierTangent1/bezierTangent1.rpde
examples/reference/bezierTangent/bezierTangent2/bezierTangent2.rpde
Should all these old files / paths be renamed to match the pattern?
There was a problem hiding this comment.
I think it doesn't matter since it works well now :)
There was a problem hiding this comment.
I took another look at the original Processing reference and it is not consistent either -- some end in _, some end in _0, and some have numbers in the middle of the name... some are 0-indexed and some are (implicitly) 1-indexed.
For example, the reference images for arc() are arc_.png, arc_2.png, arc_3.png etc....
Given that the original material isn't consistent we don't need to worry right now about the new material being consistent -- it won't help us automate. So let's leave things as they are.
There was a problem hiding this comment.
😄 Yeah, it can't be automated, so we need to write .test.yml manually.
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Lights, CameraLights, Camera
ref #80
Signed-off-by: Ce Gao ce.gao@outlook.com