mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Draw CCTV cameras from a GPU icon set
This commit is contained in:
1 parent
e0eb771217
commit
8aaf5564d7
16 files changed
+291
-168
No files matched your search
@@ -259,10 +259,14 @@ export class IconSetPrimitive {
|
||||
|
||||
update(frameState) {
|
||||
const set = this.set;
|
||||
// Icons are screen overlays, not world surfaces: they stay out of the
|
||||
// offscreen ray picks behind pickFromRay and sampleHeight, so a layer's
|
||||
// ground and mesh probes never hit its own (or another layer's) icons.
|
||||
if (
|
||||
!this.show ||
|
||||
!set.show ||
|
||||
(!frameState.passes.render && !frameState.passes.pick)
|
||||
(!frameState.passes.render && !frameState.passes.pick) ||
|
||||
frameState.passes.offscreen
|
||||
)
|
||||
return;
|
||||
const context = frameState.context;
|
||||
@@ -446,6 +450,9 @@ export class IconSetPrimitive {
|
||||
handle = {
|
||||
pickId: context.createPickId({
|
||||
id,
|
||||
// Which set drew the pick: ownership for layers whose row ids are
|
||||
// upstream ids a sibling may share.
|
||||
iconSet: set,
|
||||
get meta() {
|
||||
const at = set.row(id);
|
||||
return at >= 0 ? set.metaAt(at) : undefined;
|
||||
|
||||
Reference in new issue
Block a user