-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e3ea96
commit f05f5d9
Showing
6 changed files
with
73 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {ShaderModule} from '@luma.gl/shadertools'; | ||
import {UniformTypes} from '@deck.gl/core'; | ||
|
||
const uniformBlock = `\ | ||
uniform meshUniforms { | ||
bool pickFeatureIds; | ||
} mesh; | ||
`; | ||
|
||
export type MeshProps = { | ||
pickFeatureIds: boolean; | ||
}; | ||
|
||
export const meshUniforms = { | ||
name: 'mesh', | ||
vs: uniformBlock, | ||
fs: uniformBlock, | ||
uniformTypes: { | ||
pickFeatureIds: 'f32' | ||
} as const satisfies UniformTypes<MeshProps> | ||
} as const satisfies ShaderModule<MeshProps>; |
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
27 changes: 27 additions & 0 deletions
27
modules/geo-layers/src/trips-layer/trips-layer-uniforms.ts
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,27 @@ | ||
import {ShaderModule} from '@luma.gl/shadertools'; | ||
import {UniformTypes} from '@deck.gl/core'; | ||
|
||
const uniformBlock = `\ | ||
uniform tripsUniforms { | ||
bool fadeTrail; | ||
float trailLength; | ||
float currentTime; | ||
} trips; | ||
`; | ||
|
||
export type TripsProps = { | ||
fadeTrail: boolean; | ||
trailLength: number; | ||
currentTime: number; | ||
}; | ||
|
||
export const tripsUniforms = { | ||
name: 'trips', | ||
vs: uniformBlock, | ||
fs: uniformBlock, | ||
uniformTypes: { | ||
fadeTrail: 'f32', | ||
trailLength: 'f32', | ||
currentTime: 'f32' | ||
} as const satisfies UniformTypes<Required<TripsProps>> | ||
} as const satisfies ShaderModule<TripsProps>; |
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