-
Notifications
You must be signed in to change notification settings - Fork 16
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
examples: Add a 3d example #46
Conversation
Signed-off-by: Ce Gao <ce.gao@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example is a really compelling visual demo -- I can see why you are using a gif of it to feature the project on the homepage and elsewhere.
Is this cube animation inspired by a sketch from somewhere else?
@@ -214,8 +214,9 @@ protected void wrapProcessingVariables() { | |||
this.renjinEngine.put("displayHeight", displayHeight); | |||
this.renjinEngine.put("focused", focused); | |||
this.renjinEngine.put("keyPressed", keyPressed); | |||
this.renjinEngine.put("frameCount", frameCount); | |||
this.renjinEngine.put("frameCount", (double) frameCount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cast-to-double issue occurs frequently throughout the code -- Processing Java developers are used to using floats for everything, so it is worth adding a note in the Wiki about why it is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, actually I'm trying to find another way to solve the problem. For example do casts from float to double in the language level by renjin. It will reduce the manual work in BuiltinApplet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Maybe open an issue for this (Approaches to float-double casting) if there isn't one already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion! I will file one now.
public void box(double w, double h, double d) { | ||
super.box((float) w, (float) h, (float) d); | ||
} | ||
|
||
// TODO: Blocked until pre-processor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good documentation of ongoing issues. Color issues you encounter in this project will often take two broad forms:
- the
color
data type in processing is actually pre-processor sugar for an int - specifics of the way colors are handled at a low level using ARGB bit-math, vs. control of how colors are specified or retrieved using colorMode().
Signed-off-by: Ce Gao ce.gao@outlook.com