-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5077 from AnalyticalGraphicsInc/url-with-query
3D Tiles - Use tileset version when querying external uris
- Loading branch information
Showing
17 changed files
with
373 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+4.11 KB
Specs/Data/Cesium3DTiles/Tilesets/TilesetWithExternalResources/embed.i3dm
Binary file not shown.
Binary file added
BIN
+4.03 KB
Specs/Data/Cesium3DTiles/Tilesets/TilesetWithExternalResources/external.b3dm
Binary file not shown.
Binary file added
BIN
+142 Bytes
Specs/Data/Cesium3DTiles/Tilesets/TilesetWithExternalResources/external.i3dm
Binary file not shown.
Binary file added
BIN
+7.49 KB
...ilesets/TilesetWithExternalResources/textured_box_separate/Cesium_Logo_Flat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions
33
...m3DTiles/Tilesets/TilesetWithExternalResources/textured_box_separate/fragmentShader0.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
precision highp float; | ||
uniform vec4 u_ambient; | ||
uniform sampler2D u_diffuse; | ||
uniform vec4 u_emission; | ||
uniform vec4 u_specular; | ||
uniform float u_shininess; | ||
uniform float u_transparency; | ||
varying vec3 v_positionEC; | ||
varying vec3 v_normal; | ||
varying vec2 v_texcoord_0; | ||
void main(void) { | ||
vec3 normal = normalize(v_normal); | ||
vec4 diffuse = texture2D(u_diffuse, v_texcoord_0); | ||
vec3 diffuseLight = vec3(0.0, 0.0, 0.0); | ||
vec3 specular = u_specular.rgb; | ||
vec3 specularLight = vec3(0.0, 0.0, 0.0); | ||
vec3 emission = u_emission.rgb; | ||
vec3 ambient = u_ambient.rgb; | ||
vec3 viewDir = -normalize(v_positionEC); | ||
vec3 ambientLight = vec3(0.0, 0.0, 0.0); | ||
ambientLight += vec3(0.2, 0.2, 0.2); | ||
vec3 l = vec3(0.0, 0.0, 1.0); | ||
diffuseLight += vec3(1.0, 1.0, 1.0) * max(dot(normal,l), 0.); | ||
vec3 reflectDir = reflect(-l, normal); | ||
float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)); | ||
specularLight += vec3(1.0, 1.0, 1.0) * specularIntensity; | ||
vec3 color = vec3(0.0, 0.0, 0.0); | ||
color += diffuse.rgb * diffuseLight; | ||
color += specular * specularLight; | ||
color += emission; | ||
color += ambient * ambientLight; | ||
gl_FragColor = vec4(color * diffuse.a * u_transparency, diffuse.a * u_transparency); | ||
} |
Binary file added
BIN
+3.95 KB
...esium3DTiles/Tilesets/TilesetWithExternalResources/textured_box_separate/textured_box.glb
Binary file not shown.
17 changes: 17 additions & 0 deletions
17
...ium3DTiles/Tilesets/TilesetWithExternalResources/textured_box_separate/vertexShader0.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
precision highp float; | ||
uniform mat4 u_modelViewMatrix; | ||
uniform mat4 u_projectionMatrix; | ||
uniform mat3 u_normalMatrix; | ||
attribute vec3 a_position; | ||
varying vec3 v_positionEC; | ||
attribute vec3 a_normal; | ||
varying vec3 v_normal; | ||
attribute vec2 a_texcoord_0; | ||
varying vec2 v_texcoord_0; | ||
void main(void) { | ||
vec4 pos = u_modelViewMatrix * vec4(a_position,1.0); | ||
v_positionEC = pos.xyz; | ||
gl_Position = u_projectionMatrix * pos; | ||
v_normal = u_normalMatrix * a_normal; | ||
v_texcoord_0 = a_texcoord_0; | ||
} |
145 changes: 145 additions & 0 deletions
145
Specs/Data/Cesium3DTiles/Tilesets/TilesetWithExternalResources/tileset.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"asset": { | ||
"version": "0.0", | ||
"tilesetVersion": "1.2.3" | ||
}, | ||
"geometricError": 70, | ||
"root": { | ||
"boundingVolume": { | ||
"region": [ | ||
-1.3197004795898053, | ||
0.6988582109, | ||
-1.3196595204101946, | ||
0.6988897891, | ||
0, | ||
20 | ||
] | ||
}, | ||
"geometricError": 70, | ||
"refine": "add", | ||
"children": [ | ||
{ | ||
"boundingVolume": { | ||
"region": [ | ||
-1.3197004795898053, | ||
0.6988582109, | ||
-1.3196595204101946, | ||
0.6988897891, | ||
0, | ||
20 | ||
] | ||
}, | ||
"geometricError": 70, | ||
"refine": "add", | ||
"content": { | ||
"url": "tileset2/tileset2.json" | ||
} | ||
}, | ||
{ | ||
"boundingVolume": { | ||
"region": [ | ||
-1.3197004795898053, | ||
0.6988582109, | ||
-1.3196595204101946, | ||
0.6988897891, | ||
0, | ||
20 | ||
] | ||
}, | ||
"geometricError": 70, | ||
"refine": "add", | ||
"content": { | ||
"url": "external.b3dm" | ||
}, | ||
"transform": [ | ||
0.9686325809759725, | ||
0.24849733011005554, | ||
0, | ||
0, | ||
-0.15987226587942635, | ||
0.6231756512501834, | ||
0.7655670880409421, | ||
0, | ||
0.190241377398304, | ||
-0.7415532243993574, | ||
0.6433560707015301, | ||
0, | ||
1215072.0326519238, | ||
-4736301.828828896, | ||
4081608.4380407534, | ||
1 | ||
] | ||
}, | ||
{ | ||
"boundingVolume": { | ||
"region": [ | ||
-1.3197004795898053, | ||
0.6988582109, | ||
-1.3196595204101946, | ||
0.6988897891, | ||
0, | ||
20 | ||
] | ||
}, | ||
"geometricError": 70, | ||
"refine": "add", | ||
"content": { | ||
"url": "external.i3dm" | ||
}, | ||
"transform": [ | ||
0.9686335987925251, | ||
0.24849336266838487, | ||
0, | ||
0, | ||
-0.15986971340174239, | ||
0.6231763060686413, | ||
0.7655670880409422, | ||
0, | ||
0.1902383400555372, | ||
-0.7415540036062118, | ||
0.6433560707015301, | ||
0, | ||
1215052.6331380012, | ||
-4736306.80562453, | ||
4081608.4380407534, | ||
1 | ||
] | ||
}, | ||
{ | ||
"boundingVolume": { | ||
"region": [ | ||
-1.3197004795898053, | ||
0.6988582109, | ||
-1.3196595204101946, | ||
0.6988897891, | ||
0, | ||
20 | ||
] | ||
}, | ||
"geometricError": 70, | ||
"refine": "add", | ||
"content": { | ||
"url": "embed.i3dm" | ||
}, | ||
"transform": [ | ||
0.9686346165928273, | ||
0.24848939522254557, | ||
0, | ||
0, | ||
-0.15986716092137648, | ||
0.6231769608766445, | ||
0.7655670880409424, | ||
0, | ||
0.19023530270957903, | ||
-0.7415547828006255, | ||
0.6433560707015301, | ||
0, | ||
1215033.2336036952, | ||
-4736311.782340704, | ||
4081608.4380407534, | ||
1 | ||
] | ||
} | ||
] | ||
} | ||
} |
Binary file added
BIN
+4.12 KB
Specs/Data/Cesium3DTiles/Tilesets/TilesetWithExternalResources/tileset2/embed.i3dm
Binary file not shown.
Binary file added
BIN
+4.04 KB
Specs/Data/Cesium3DTiles/Tilesets/TilesetWithExternalResources/tileset2/external.b3dm
Binary file not shown.
Binary file added
BIN
+145 Bytes
Specs/Data/Cesium3DTiles/Tilesets/TilesetWithExternalResources/tileset2/external.i3dm
Binary file not shown.
127 changes: 127 additions & 0 deletions
127
Specs/Data/Cesium3DTiles/Tilesets/TilesetWithExternalResources/tileset2/tileset2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{ | ||
"asset": { | ||
"version": "0.0" | ||
}, | ||
"geometricError": 70, | ||
"root": { | ||
"boundingVolume": { | ||
"region": [ | ||
-1.3197004795898053, | ||
0.6988582109, | ||
-1.3196595204101946, | ||
0.6988897891, | ||
0, | ||
20 | ||
] | ||
}, | ||
"geometricError": 70, | ||
"refine": "add", | ||
"children": [ | ||
{ | ||
"boundingVolume": { | ||
"region": [ | ||
-1.3197004795898053, | ||
0.6988582109, | ||
-1.3196595204101946, | ||
0.6988897891, | ||
0, | ||
20 | ||
] | ||
}, | ||
"geometricError": 70, | ||
"refine": "add", | ||
"content": { | ||
"url": "external.b3dm" | ||
}, | ||
"transform": [ | ||
0.9686356343768792, | ||
0.24848542777253735, | ||
0, | ||
0, | ||
-0.1598646084383285, | ||
0.6231776156741929, | ||
0.7655670880409422, | ||
0, | ||
0.19023226536042928, | ||
-0.7415555619825982, | ||
0.6433560707015301, | ||
0, | ||
1215013.8340490046, | ||
-4736316.75897742, | ||
4081608.4380407534, | ||
1 | ||
] | ||
}, | ||
{ | ||
"boundingVolume": { | ||
"region": [ | ||
-1.3197004795898053, | ||
0.6988582109, | ||
-1.3196595204101946, | ||
0.6988897891, | ||
0, | ||
20 | ||
] | ||
}, | ||
"geometricError": 70, | ||
"refine": "add", | ||
"content": { | ||
"url": "external.i3dm" | ||
}, | ||
"transform": [ | ||
0.9686366521446808, | ||
0.2484814603183605, | ||
0, | ||
0, | ||
-0.1598620559525986, | ||
0.6231782704612867, | ||
0.7655670880409423, | ||
0, | ||
0.19022922800808817, | ||
-0.7415563411521302, | ||
0.6433560707015301, | ||
0, | ||
1214994.4344739306, | ||
-4736321.735534675, | ||
4081608.4380407534, | ||
1 | ||
] | ||
}, | ||
{ | ||
"boundingVolume": { | ||
"region": [ | ||
-1.3197004795898053, | ||
0.6988582109, | ||
-1.3196595204101946, | ||
0.6988897891, | ||
0, | ||
20 | ||
] | ||
}, | ||
"geometricError": 70, | ||
"refine": "add", | ||
"content": { | ||
"url": "embed.i3dm" | ||
}, | ||
"transform": [ | ||
0.9686376698962317, | ||
0.24847749286001491, | ||
0, | ||
0, | ||
-0.1598595034641867, | ||
0.6231789252379254, | ||
0.7655670880409422, | ||
0, | ||
0.19022619065255567, | ||
-0.7415571203092216, | ||
0.6433560707015301, | ||
0, | ||
1214975.0348784733, | ||
-4736326.712012473, | ||
4081608.4380407534, | ||
1 | ||
] | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.