-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: udpate cesium version, update cesium-utils
- Loading branch information
Showing
21 changed files
with
376 additions
and
222 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
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
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,39 @@ | ||
#define PI 3.14159265358979323846 | ||
|
||
precision lowp float; | ||
|
||
uniform float u_time; | ||
uniform vec2 u_resolution; | ||
|
||
float myBox(vec2 uv, vec2 size) { | ||
vec2 halfSize = size / 2.0; | ||
return step(uv.x, halfSize.x) * step(-halfSize.x, uv.x) * step(uv.y, halfSize.y) * step(-halfSize.y, uv.y); | ||
} | ||
|
||
float myBox1(vec2 uv, vec2 size) { | ||
vec2 halfSize = size / 2.0; | ||
vec2 r = smoothstep(halfSize + 0.001, halfSize, uv) * smoothstep(-halfSize - 0.001, - halfSize, uv); | ||
return r.x * r.y; | ||
} | ||
|
||
float cross(vec2 uv, float size) { | ||
return myBox1(uv, vec2(size * 0.25, size)) + myBox1(uv, vec2(size, size * 0.25)); | ||
} | ||
|
||
mat2 rotate2d(float angle) { | ||
return mat2(cos(angle), - sin(angle), sin(angle), cos(angle)); | ||
} | ||
|
||
void main() { | ||
vec2 uv = gl_FragCoord.xy / u_resolution; | ||
uv -= 0.5; | ||
// vec3 color = vec3(0.4824, 0.8196, 0.451); | ||
|
||
uv = rotate2d(sin(u_time) * PI) * uv; | ||
|
||
float t = cross(uv, 0.3); | ||
vec3 color = vec3(uv, 1.0); | ||
color += t; | ||
|
||
gl_FragColor = vec4(color, 1.0); | ||
} |
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
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,3 @@ | ||
import { genInfo } from "@zxtool/utils/dist/util" | ||
|
||
export const genZCUInfo = genInfo("@zxtool/cesium-utils") |
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 |
---|---|---|
|
@@ -210,4 +210,8 @@ export class MassivePointsHelper { | |
this.primitive = null | ||
} | ||
} | ||
|
||
getGrid() { | ||
return this.primitive | ||
} | ||
} |
Oops, something went wrong.