Skip to content

Commit f78f3cd

Browse files
authored
Merge pull request #4353 from plotly/mesh3d-missing-color
Handle missing vertexcolor and facecolor in mesh3d
2 parents ebd5668 + 3066f32 commit f78f3cd

File tree

4 files changed

+60
-4
lines changed

4 files changed

+60
-4
lines changed

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"gl-heatmap2d": "^1.0.5",
8080
"gl-line3d": "^1.1.11",
8181
"gl-mat4": "^1.2.0",
82-
"gl-mesh3d": "^2.1.1",
82+
"gl-mesh3d": "^2.1.3",
8383
"gl-plot2d": "^1.4.2",
8484
"gl-plot3d": "^2.3.0",
8585
"gl-pointcloud2d": "^1.0.2",
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"data": [{
3+
"x": [0, 1, 0, 1, 0, 1, 0, 1],
4+
"y": [0, 0, 1, 1, 0, 0, 1, 1],
5+
"z": [0, 0, 0, 0, 1, 1, 1, 1],
6+
"i": [0, 3, 4, 7, 0, 6, 1, 7, 0, 5, 2, 7],
7+
"j": [1, 2, 5, 6, 2, 4, 3, 5, 4, 1, 6, 3],
8+
"k": [3, 0, 7, 4, 6, 0, 7, 1, 5, 0, 7, 2],
9+
"flatshading": true,
10+
"lightposition": { "x": 1000, "y": 1000, "z": 0 },
11+
"opacity": 1,
12+
"vertexcolor": ["#F00", "#FF0", "#0F0", "#0FF", "#00F", "#F0F"],
13+
"type": "mesh3d",
14+
"name": "mesh3d",
15+
"scene": "scene1"
16+
}, {
17+
"x": [0, 1, 0, 1, 0, 1, 0, 1],
18+
"y": [0, 0, 1, 1, 0, 0, 1, 1],
19+
"z": [0, 0, 0, 0, 1, 1, 1, 1],
20+
"i": [0, 3, 4, 7, 0, 6, 1, 7, 0, 5, 2, 7],
21+
"j": [1, 2, 5, 6, 2, 4, 3, 5, 4, 1, 6, 3],
22+
"k": [3, 0, 7, 4, 6, 0, 7, 1, 5, 0, 7, 2],
23+
"flatshading": true,
24+
"lightposition": { "x": 1000, "y": 1000, "z": 0 },
25+
"opacity": 1,
26+
"facecolor": ["#F00", "#FF0", "#0F0", "#0FF", "#00F", "#F0F"],
27+
"type": "mesh3d",
28+
"name": "mesh3d",
29+
"scene": "scene2"
30+
}],
31+
"layout": {
32+
"paper_bgcolor": "#ddd",
33+
"margin": {
34+
"t": 0,
35+
"b": 0,
36+
"l": 0,
37+
"r": 0
38+
},
39+
"width": 250,
40+
"height": 500,
41+
"scene1": {
42+
"domain": {
43+
"x": [0, 1],
44+
"y": [0, 0.5]
45+
},
46+
"camera": { "eye": { "x": 1.5, "y": 3, "z": 1 } }
47+
},
48+
"scene2": {
49+
"domain": {
50+
"x": [0, 1],
51+
"y": [0.5, 1]
52+
},
53+
"camera": { "eye": { "x": 1.5, "y": 3, "z": 1 } }
54+
}
55+
}
56+
}

0 commit comments

Comments
 (0)