Skip to content

Orthographic projection for 3D plots #3331

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

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b908ba3
ortho zoom
archmoj Nov 25, 2018
7c8e830
prep for ortho camera
archmoj Nov 26, 2018
99bc241
test if we could remove 3d-view dep here
archmoj Nov 26, 2018
c81cc73
ortho camera
archmoj Dec 10, 2018
6832bc2
working prototype
archmoj Dec 10, 2018
03c4125
correct ortho scale
archmoj Dec 10, 2018
4439cfa
increase field of view for wide viewports
archmoj Dec 10, 2018
586b109
prep for orthographic camera
archmoj Dec 11, 2018
5ffc0c5
removed kind of duplicate code for camera controls now pointing to la…
archmoj Dec 11, 2018
190a9c7
using new gl-plot3d interface to set ortho
archmoj Dec 12, 2018
205670e
pass camera info at gl3d init func
archmoj Dec 12, 2018
ebc90ea
using camera ortho and other attributes at scene init time
archmoj Dec 12, 2018
dd37502
resolved merge conflict in gl-plot3d
archmoj Dec 12, 2018
94c7404
fixed jasmine test to include camera ortho attribute
archmoj Dec 13, 2018
c44a9d0
fetched master and resolved conflicts
archmoj Jan 1, 2019
8bb107f
resolved conflicts
archmoj Jan 22, 2019
a0a524f
added enableWheel attribute to 3d-view-controls
archmoj Jan 22, 2019
660e4da
Merge remote-tracking branch 'origin/master' into ortho-view
archmoj Jan 22, 2019
6ccadf4
updated modules
archmoj Jan 22, 2019
c14fc66
fixup gl-plot3d and 3d-view-controls
archmoj Jan 22, 2019
3aebb99
updated 3d-view
archmoj Jan 22, 2019
cec2aa0
resolved conflicts in gl-axes3d and gl-plot3d
archmoj Feb 12, 2019
ad3186b
removed unused dependencies
archmoj Feb 15, 2019
6c0724c
modules fixes
archmoj Feb 18, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
]
},
"dependencies": {
"3d-view": "^2.0.0",
"3d-view-controls": "git://github.com/archmoj/3d-view-controls.git#fe3c77b807618c0d51f4c50a691e2af0486bfda9",
"@plotly/d3-sankey": "^0.5.1",
"alpha-shape": "^1.0.0",
"array-range": "^1.0.1",
Expand All @@ -79,7 +79,7 @@
"gl-mat4": "^1.2.0",
"gl-mesh3d": "^2.0.7",
"gl-plot2d": "^1.4.2",
"gl-plot3d": "^1.6.3",
"gl-plot3d": "git://github.com/gl-vis/gl-plot3d.git#b040fcb93647eeb7f08b0ec631bccbf1cf836620",
"gl-pointcloud2d": "^1.0.2",
"gl-scatter3d": "^1.1.6",
"gl-select-box": "^1.0.3",
Expand All @@ -91,7 +91,6 @@
"has-hover": "^1.0.1",
"has-passive-events": "^1.0.0",
"mapbox-gl": "0.45.0",
"matrix-camera-controller": "^2.1.3",
"mouse-change": "^1.4.0",
"mouse-event-offset": "^3.0.2",
"mouse-wheel": "^1.0.2",
Expand All @@ -105,7 +104,6 @@
"regl-line2d": "3.0.13",
"regl-scatter2d": "^3.1.3",
"regl-splom": "^1.0.6",
"right-now": "^1.0.0",
"robust-orientation": "^1.1.3",
"sane-topojson": "^2.0.0",
"strongly-connected-components": "^1.0.1",
Expand Down
277 changes: 0 additions & 277 deletions src/plots/gl3d/camera.js

This file was deleted.

4 changes: 3 additions & 1 deletion src/plots/gl3d/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ exports.plot = function plotGl3d(gd) {
var sceneId = sceneIds[i];
var fullSceneData = getSubplotData(fullData, GL3D, sceneId);
var sceneLayout = fullLayout[sceneId];
var camera = sceneLayout.camera;
var scene = sceneLayout._scene;

if(!scene) {
Expand All @@ -56,7 +57,8 @@ exports.plot = function plotGl3d(gd) {
graphDiv: gd,
container: gd.querySelector('.gl-container'),
staticPlot: gd._context.staticPlot,
plotGlPixelRatio: gd._context.plotGlPixelRatio
plotGlPixelRatio: gd._context.plotGlPixelRatio,
camera: camera
},
fullLayout
);
Expand Down
1 change: 1 addition & 0 deletions src/plots/gl3d/layout/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) {
coerce('camera.' + cameraKeys[j] + '.y');
coerce('camera.' + cameraKeys[j] + '.z');
}
coerce('camera.ortho');

/*
* coerce to positive number (min 0) but also do not accept 0 (>0 not >=0)
Expand Down
Loading