自定义着色器,智慧交通案例等

This commit is contained in:
jiawanlong 2025-04-20 09:30:00 +08:00
parent 8bbd106c73
commit 7086934e8a
68 changed files with 140166 additions and 12 deletions

View File

@ -0,0 +1,78 @@
<!--********************************************************************
* by jiawanlong
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="./../../libs/cesium/Cesium1.98/Widgets/widgets.css" />
<script type="text/javascript" src="./../../libs/cesium/Cesium1.98/Cesium.js"></script>
</head>
<body style="
margin: 0;
overflow: hidden;
background: #fff;
width: 100%;
height: 100%;
position: absolute; top: 0;
">
<div id="map" style="margin: 0 auto; width: 100%; height: 100%"></div>
<script type="text/javascript">
Cesium.Ion.defaultAccessToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3ZjQ5ZGUzNC1jNWYwLTQ1ZTMtYmNjYS05YTY4ZTVmN2I2MDkiLCJpZCI6MTE3MTM4LCJpYXQiOjE2NzY0NDUyODB9.ZaNSBIfc1sGLhQd_xqhiSsc0yr8oS0wt1hAo9gbke6M";
const viewer = new Cesium.Viewer("map", {});
viewer.scene.debugShowFramesPerSecond = true;
/*
1. 顶点着色器Vertex Shader坐标变换、传递数据给片段着色器、动态变形
2. 片段着色器Fragment Shader计算颜色、应用光照、后处理效果
*/
const customShader = new Cesium.CustomShader({
vertexShaderText: `
void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {
// vec3 position = vsInput.attributes.positionMC;
// position.y = position.y + 10.5;
// vsOutput.positionMC = position;
}
`,
fragmentShaderText: `
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
float height = fsInput.attributes.positionMC.y;
vec3 lowColor = vec3(0.0, 0.0, 1.0); // 蓝色
vec3 highColor = vec3(1.0, 0.0, 0.0); // 红色
// material.diffuse = mix(lowColor, highColor, smoothstep(0.0, 200.0, height));
if(height > 30.0){
material.diffuse = lowColor;
}else{
material.diffuse = highColor;
}
}
`,
});
const tileset = new Cesium.Cesium3DTileset({
url: "./data/tileset.json",
customShader: customShader
});
tileset.readyPromise
.then(function (tileset) {
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset)
})
.catch(function (error) {
console.log(error);
});
</script>
</body>
</html>

View File

@ -0,0 +1,82 @@
<!--********************************************************************
* by jiawanlong
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="./../../libs/cesium/Cesium1.98/Widgets/widgets.css" />
<script type="text/javascript" src="./../../libs/cesium/Cesium1.98/Cesium.js"></script>
</head>
<body style="
margin: 0;
overflow: hidden;
background: #fff;
width: 100%;
height: 100%;
position: absolute; top: 0;
">
<div id="map" style="margin: 0 auto; width: 100%; height: 100%"></div>
<script type="text/javascript">
Cesium.Ion.defaultAccessToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3ZjQ5ZGUzNC1jNWYwLTQ1ZTMtYmNjYS05YTY4ZTVmN2I2MDkiLCJpZCI6MTE3MTM4LCJpYXQiOjE2NzY0NDUyODB9.ZaNSBIfc1sGLhQd_xqhiSsc0yr8oS0wt1hAo9gbke6M";
const viewer = new Cesium.Viewer("map", {});
viewer.scene.debugShowFramesPerSecond = true;
/*
1. 顶点着色器Vertex Shader坐标变换、传递数据给片段着色器、动态变形
2. 片段着色器Fragment Shader计算颜色、应用光照、后处理效果
*/
const customShader = new Cesium.CustomShader({
uniforms: {
u_height: {
type: Cesium.UniformType.FLOAT,
value: 10.0
},
},
fragmentShaderText: `
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
float height = fsInput.attributes.positionMC.y;
vec3 lowColor = vec3(0.0, 0.0, 1.0); // 蓝色
vec3 highColor = vec3(1.0, 0.0, 0.0); // 红色
if(height > u_height){
material.diffuse = lowColor;
}else{
material.diffuse = highColor;
}
}
`,
});
const tileset = new Cesium.Cesium3DTileset({
url: "./data/tileset.json",
customShader: customShader
});
tileset.readyPromise
.then(function (tileset) {
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset)
setInterval(() => {
if (customShader.uniforms.u_height.value == 100) {
customShader.uniforms.u_height.value = 10;
}
if (customShader.uniforms.u_height.value < 100) {
customShader.uniforms.u_height.value += 3;
}
}, 100)
})
.catch(function (error) {
console.log(error);
});
</script>
</body>
</html>

View File

@ -0,0 +1,67 @@
<!--********************************************************************
* by jiawanlong
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="./../../libs/cesium/Cesium1.98/Widgets/widgets.css" />
<script type="text/javascript" src="./../../libs/cesium/Cesium1.98/Cesium.js"></script>
</head>
<body style="
margin: 0;
overflow: hidden;
background: #fff;
width: 100%;
height: 100%;
position: absolute; top: 0;
">
<div id="map" style="margin: 0 auto; width: 100%; height: 100%"></div>
<script type="text/javascript">
Cesium.Ion.defaultAccessToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3ZjQ5ZGUzNC1jNWYwLTQ1ZTMtYmNjYS05YTY4ZTVmN2I2MDkiLCJpZCI6MTE3MTM4LCJpYXQiOjE2NzY0NDUyODB9.ZaNSBIfc1sGLhQd_xqhiSsc0yr8oS0wt1hAo9gbke6M";
const viewer = new Cesium.Viewer("map", {});
viewer.scene.debugShowFramesPerSecond = true;
/*
1. 顶点着色器Vertex Shader坐标变换、传递数据给片段着色器、动态变形
2. 片段着色器Fragment Shader计算颜色、应用光照、后处理效果
*/
const customShader = new Cesium.CustomShader({
lightingModel: Cesium.LightingModel.UNLIT,
fragmentShaderText: `
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
float _baseHeight = 0.0; // 物体的基础高度,需要修改成一个合适的建筑基础高度
float _heightRange = 60.0; // 高亮的范围(_baseHeight ~ _baseHeight + _heightRange) 默认是 0-60米
float _glowRange = 300.0; // 光环的移动范围(高度)
float vtxf_height = fsInput.attributes.positionMC.y-_baseHeight;
float vtxf_a11 = fract(czm_frameNumber / 120.0) * 3.14159265 * 2.0;
float vtxf_a12 = vtxf_height / _heightRange + sin(vtxf_a11) * 0.1;
material.diffuse*= vec3(vtxf_a12, vtxf_a12, vtxf_a12);
float vtxf_a13 = fract(czm_frameNumber / 360.0);
float vtxf_h = clamp(vtxf_height / _glowRange, 0.0, 1.0);
vtxf_a13 = abs(vtxf_a13 - 0.5) * 2.0;
float vtxf_diff = step(0.005, abs(vtxf_h - vtxf_a13));
material.diffuse += material.diffuse * (1.0 - vtxf_diff);
}
`,
});
const tileset = new Cesium.Cesium3DTileset({
url: "./data/tileset.json",
customShader: customShader
});
tileset.readyPromise.then(function (tileset) {
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset)
})
</script>
</body>
</html>

View File

@ -13,12 +13,14 @@ var exampleConfig = {
name: "综合应用",
name_en: "ba222212se",
content: [
{
name: "",
name_en: "",
thumbnail: "0.jpg",
fileName: "00"
name: "智慧交通",
name_en: "智慧交通",
thumbnail: "智慧交通.jpg",
fileName: "./真实道路.html"
},
{
name: "智慧城市",
name_en: "智慧城市",
@ -105,8 +107,8 @@ var exampleConfig = {
name_en: "常用工具",
content: [
{
name: "Goejson",
name_en: "Goejson",
name: "goejson在线",
name_en: "Ggoejson在线",
thumbnail: "Goejson.jpg",
fileName: "https://geojson.io/"
},
@ -134,6 +136,24 @@ var exampleConfig = {
thumbnail: "osgb转3dtiles.jpg",
fileName: "https://jiawanlong.github.io/Cesium-Examples/examples/cesiumEx/tools/osgb23dtiles.zip"
},
{
name: "任意坐标系转换",
name_en: "任意坐标系转换",
thumbnail: "1.19、任意坐标转换.jpg",
fileName: "1.19、任意坐标转换"
},
{
name: "wkt和geojson互转",
name_en: "wkt和geojson互转",
thumbnail: "2.1.13、wkt.jpg",
fileName: "2.1.13、wkt"
},
{
name: "shp转geojson",
name_en: "shp转geojson",
thumbnail: "2.1.14、shp.jpg",
fileName: "2.1.14、shp"
},
]
},
}
@ -143,9 +163,16 @@ var exampleConfig = {
name_en: "base",
content: {
"ma54xssp": {
name: "1.1、基础",
name_en: "ba66se",
content: [{
content: [
{
name: "",
name_en: "",
thumbnail: "0.jpg",
fileName: "00"
},{
name: "1.1、默认设置",
name_en: "1.1、默认设置",
thumbnail: "1.1、默认设置.jpg",
@ -1113,10 +1140,26 @@ var exampleConfig = {
name: "7.2.1、简易入门",
name_en: "7.2.1、简易入门",
thumbnail: "7.2.1、简易入门.jpg",
fileName: "7.2.1、简易入门"
},
{
name: "7.2.2、CustomShader_3DTiles",
name_en: "7.2.2、CustomShader_3DTiles",
thumbnail: "7.2.2、CustomShader_3DTiles.jpg",
fileName: "7.2.2、CustomShader_3DTiles"
},
{
name: "7.2.3、CustomShader_3DTiles 动态",
name_en: "7.2.3、CustomShader_3DTiles 动态",
thumbnail: "7.2.3、CustomShader_3DTiles 动态.jpg",
fileName: "7.2.3、CustomShader_3DTiles 动态"
},
{
name: "7.2.4、CustomShader_渐变",
name_en: "7.2.4、CustomShader_渐变",
thumbnail: "7.2.4、CustomShader_渐变.jpg",
fileName: "7.2.4、CustomShader_渐变"
},
]
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,11 @@
Model Information:
* title: 2015 Porsche 918 Spyder
* source: https://sketchfab.com/3d-models/2015-porsche-918-spyder-f6d03ef13bf243c8b632ca7bacd8c0f3
* author: Ddiaz Design (https://sketchfab.com/ddiaz-design)
Model License:
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
* requirements: Author must be credited. Commercial use is allowed.
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "2015 Porsche 918 Spyder" (https://sketchfab.com/3d-models/2015-porsche-918-spyder-f6d03ef13bf243c8b632ca7bacd8c0f3) by Ddiaz Design (https://sketchfab.com/ddiaz-design) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

View File

@ -0,0 +1,11 @@
Model Information:
* title: Highway
* source: https://sketchfab.com/3d-models/highway-3a23cea9b8f2493f9e1ae93f82881145
* author: Genkidonky (https://sketchfab.com/Genkidonky)
Model License:
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
* requirements: Author must be credited. Commercial use is allowed.
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "Highway" (https://sketchfab.com/3d-models/highway-3a23cea9b8f2493f9e1ae93f82881145) by Genkidonky (https://sketchfab.com/Genkidonky) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)

Binary file not shown.

View File

@ -0,0 +1,196 @@
{
"accessors": [
{
"bufferView": 2,
"componentType": 5126,
"count": 4,
"max": [
10.0,
7.0,
0.0
],
"min": [
-10.0,
-7.0,
0.0
],
"type": "VEC3"
},
{
"bufferView": 2,
"byteOffset": 48,
"componentType": 5126,
"count": 4,
"max": [
0.0,
0.0,
1.0
],
"min": [
0.0,
0.0,
1.0
],
"type": "VEC3"
},
{
"bufferView": 1,
"componentType": 5126,
"count": 4,
"max": [
1.0,
1.0
],
"min": [
0.0,
0.0
],
"type": "VEC2"
},
{
"bufferView": 0,
"componentType": 5125,
"count": 6,
"type": "SCALAR"
}
],
"asset": {
"extras": {
"author": "Genkidonky (https://sketchfab.com/Genkidonky)",
"license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)",
"source": "https://sketchfab.com/3d-models/highway-3a23cea9b8f2493f9e1ae93f82881145",
"title": "Highway"
},
"generator": "Sketchfab-15.31.0",
"version": "2.0"
},
"bufferViews": [
{
"buffer": 0,
"byteLength": 24,
"name": "floatBufferViews",
"target": 34963
},
{
"buffer": 0,
"byteLength": 32,
"byteOffset": 24,
"byteStride": 8,
"name": "floatBufferViews",
"target": 34962
},
{
"buffer": 0,
"byteLength": 96,
"byteOffset": 56,
"byteStride": 12,
"name": "floatBufferViews",
"target": 34962
}
],
"buffers": [
{
"byteLength": 152,
"uri": "scene.bin"
}
],
"extensionsUsed": [
"KHR_materials_unlit"
],
"images": [
{
"uri": "textures/Material_baseColor.jpeg"
}
],
"materials": [
{
"doubleSided": true,
"extensions": {
"KHR_materials_unlit": {}
},
"name": "Material",
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
},
"metallicFactor": 0.0
}
}
],
"meshes": [
{
"name": "Object_0",
"primitives": [
{
"attributes": {
"NORMAL": 1,
"POSITION": 0,
"TEXCOORD_0": 2
},
"indices": 3,
"material": 0,
"mode": 4
}
]
}
],
"nodes": [
{
"children": [
1
],
"matrix": [
1.0,
0.0,
0.0,
0.0,
0.0,
2.220446049250313e-16,
-1.0,
0.0,
0.0,
1.0,
2.220446049250313e-16,
0.0,
0.0,
0.0,
0.0,
1.0
],
"name": "Sketchfab_model"
},
{
"children": [
2
],
"name": "38df59af0287443eb1400f48d4f6be86.obj.cleaner.materialmerger.gles"
},
{
"mesh": 0,
"name": "Object_2"
}
],
"samplers": [
{
"magFilter": 9729,
"minFilter": 9987,
"wrapS": 10497,
"wrapT": 10497
}
],
"scene": 0,
"scenes": [
{
"name": "Sketchfab_Scene",
"nodes": [
0
]
}
],
"textures": [
{
"sampler": 0,
"source": 0
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -0,0 +1,11 @@
Model Information:
* title: Highway Fence
* source: https://sketchfab.com/3d-models/highway-fence-e29f9a95d6024388b60c5d5f4f50cbd6
* author: Bryan Christian (https://sketchfab.com/bryanblast99)
Model License:
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
* requirements: Author must be credited. Commercial use is allowed.
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "Highway Fence" (https://sketchfab.com/3d-models/highway-fence-e29f9a95d6024388b60c5d5f4f50cbd6) by Bryan Christian (https://sketchfab.com/bryanblast99) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)

Binary file not shown.

View File

@ -0,0 +1,221 @@
{
"accessors": [
{
"bufferView": 2,
"componentType": 5126,
"count": 1202,
"max": [
0.23812684416770935,
0.4016987085342407,
2.19854736328125
],
"min": [
-0.11250030994415283,
-0.9406726360321045,
-2.198528289794922
],
"type": "VEC3"
},
{
"bufferView": 2,
"byteOffset": 14424,
"componentType": 5126,
"count": 1202,
"max": [
1.0,
1.0,
1.0
],
"min": [
-1.0,
-1.0,
-1.0
],
"type": "VEC3"
},
{
"bufferView": 1,
"componentType": 5126,
"count": 1202,
"max": [
0.9862350821495056,
0.9846346378326416
],
"min": [
0.005916247610002756,
0.006082683801651001
],
"type": "VEC2"
},
{
"bufferView": 0,
"componentType": 5125,
"count": 4044,
"type": "SCALAR"
}
],
"asset": {
"extras": {
"author": "Bryan Christian (https://sketchfab.com/bryanblast99)",
"license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)",
"source": "https://sketchfab.com/3d-models/highway-fence-e29f9a95d6024388b60c5d5f4f50cbd6",
"title": "Highway Fence"
},
"generator": "Sketchfab-12.67.0",
"version": "2.0"
},
"bufferViews": [
{
"buffer": 0,
"byteLength": 16176,
"name": "floatBufferViews",
"target": 34963
},
{
"buffer": 0,
"byteLength": 9616,
"byteOffset": 16176,
"byteStride": 8,
"name": "floatBufferViews",
"target": 34962
},
{
"buffer": 0,
"byteLength": 28848,
"byteOffset": 25792,
"byteStride": 12,
"name": "floatBufferViews",
"target": 34962
}
],
"buffers": [
{
"byteLength": 54640,
"uri": "scene.bin"
}
],
"images": [
{
"uri": "textures/Material_baseColor.jpeg"
}
],
"materials": [
{
"doubleSided": true,
"name": "Material",
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
},
"metallicFactor": 0.5,
"roughnessFactor": 0.25
}
}
],
"meshes": [
{
"name": "Object_0",
"primitives": [
{
"attributes": {
"NORMAL": 1,
"POSITION": 0,
"TEXCOORD_0": 2
},
"indices": 3,
"material": 0,
"mode": 4
}
]
}
],
"nodes": [
{
"children": [
1
],
"matrix": [
1.0,
0.0,
0.0,
0.0,
0.0,
2.220446049250313e-16,
-1.0,
0.0,
0.0,
1.0,
2.220446049250313e-16,
0.0,
0.0,
0.0,
0.0,
1.0
],
"name": "Sketchfab_model"
},
{
"children": [
2
],
"name": "root"
},
{
"children": [
3
],
"matrix": [
1.0,
0.0,
0.0,
0.0,
0.0,
2.220446049250313e-16,
1.0,
0.0,
0.0,
-1.0,
2.220446049250313e-16,
0.0,
0.0,
0.0,
0.0,
1.0
],
"name": "GLTF_SceneRootNode"
},
{
"children": [
4
],
"name": "Cube_0"
},
{
"mesh": 0,
"name": "Object_4"
}
],
"samplers": [
{
"magFilter": 9729,
"minFilter": 9987,
"wrapS": 10497,
"wrapT": 10497
}
],
"scene": 0,
"scenes": [
{
"name": "Sketchfab_Scene",
"nodes": [
0
]
}
],
"textures": [
{
"sampler": 0,
"source": 0
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

View File

@ -0,0 +1,11 @@
Model Information:
* title: Highway Sign
* source: https://sketchfab.com/3d-models/highway-sign-ecc11655a4de4b48bc8f2656a19967e5
* author: Owen Cg (https://sketchfab.com/eljayelyasse123)
Model License:
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
* requirements: Author must be credited. Commercial use is allowed.
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "Highway Sign" (https://sketchfab.com/3d-models/highway-sign-ecc11655a4de4b48bc8f2656a19967e5) by Owen Cg (https://sketchfab.com/eljayelyasse123) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 KiB

View File

@ -0,0 +1,11 @@
Model Information:
* title: SU7
* source: https://sketchfab.com/3d-models/su7-7296a91633d74c6eb113010e2ed75eda
* author: s1657270997 (https://sketchfab.com/s1657270997)
Model License:
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
* requirements: Author must be credited. Commercial use is allowed.
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "SU7" (https://sketchfab.com/3d-models/su7-7296a91633d74c6eb113010e2ed75eda) by s1657270997 (https://sketchfab.com/s1657270997) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 KiB

File diff suppressed because one or more lines are too long

View File

@ -90,7 +90,7 @@ function loadExampleHtml() {
return;
}
var mapUrl;
if (locationParam.indexOf('http') > -1) {
if (locationParam.indexOf('http') > -1 ) {
mapUrl = locationParam
}else{
var href = window.location.toString();

View File

@ -123,7 +123,7 @@ function createGalleryChart(example) {
var chartDiv = $("<div class='col-xlg-2 col-lg-3 col-md-4 col-sm-6 col-xs-12'></div>");
var chart = $("<div class='chart'></div>");
if (href.indexOf('http') >-1 ) {
if (href.indexOf('http') >-1 || href.indexOf('.html') >-1) {
var link = $("<a class='chart-link' target='_blank' href='"+href+"'></a>");
} else {
var link = $("<a class='chart-link' target='_blank' href='" + target + "#" + href + "'></a>");