Skip to content
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

Graphics3d breaking changes #1492

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Graphics3d breaking changes #1492

wants to merge 4 commits into from

Conversation

TiagoCavalcante
Copy link
Contributor

image

@@ -384,14 +375,6 @@ def boxes_to_json(self, leaves=None, **options):
"ticks": ticks,
"ticks_style": js_ticks_style,
},
"extent": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just ignore it in the other side?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but why keep it there?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. It will change and should. But not before the Mathics-Django release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a good way to approach this is to start going over the API doc in mathics-threejs-backend review that and then come back here to make it match that specification.

But all of this is major API upheaval. I'd like to have at least one more stable release before that.

@@ -63,40 +63,40 @@ def _prepare_elements(self, leaves, options, max_width=None):

if lighting == "System`Automatic":
self.lighting = [
{"type": "Ambient", "color": [0.3, 0.2, 0.4]},
{"type": "ambient", "color": [0.3, 0.2, 0.4]},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this handled by the transformation layer in mathics-graphics3d-backend ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but is weird to have primitive names lower-case and light names capital-case.

Copy link
Member

@rocky rocky Jul 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't saying this is wrong - just that mathics-threejs-backend also needs to be able to handle things like this.

The current plan is to release Mathics Django as is. And then after that settles we will have a slew of API breaking changes.

In general things, have breaking way too much recently. We need more control everywhere on limiting breakage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so just remove the viewpoint scaling by now as it isn't a breaking change?

Copy link
Member

@rocky rocky Jul 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With all of the changes it is hard to follow this PR. It feels like after things settle down we should plan on a major Graphics3D in compact JSON design.

Personally, I think that all of the design work and implementation in mathics-threejs-backend could go on now if you are so disposed. Nothing prevents creating whatever API is best and converting what we have now to that.

In the PRs here in the short term we should separate breaking API from non-breaking.

Adding fields to existing JSON is fine that isn't going to break older Mathics-Django that happen use Mathics inore dev. changing existing values would. And having mathics-threejs-backend ignore existing fields is fine too.

@rocky rocky marked this pull request as draft July 21, 2021 01:15
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.

2 participants