mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
perf(import): reuse generated pin textures and trim unused processing
This commit is contained in:
1 parent
c58ff5c215
commit
767a7d5ae8
6 files changed
+169
-96
No files matched your search
@@ -102,6 +102,13 @@ try {
|
||||
});
|
||||
window.__qaStyleSnapshot = (source) => {
|
||||
const now = viewer.clock.currentTime;
|
||||
const images = new Map();
|
||||
const imageValue = (p) => {
|
||||
const value = p?.getValue(now);
|
||||
if (value?.tagName !== 'CANVAS') return value;
|
||||
if (!images.has(value)) images.set(value, value.toDataURL());
|
||||
return images.get(value);
|
||||
};
|
||||
const color = (p) => p?.getValue(now)?.toCssColorString();
|
||||
const positions = (p) => p?.getValue(now)?.map((v) => [v.x, v.y, v.z]);
|
||||
return source.entities.values
|
||||
@@ -110,7 +117,7 @@ try {
|
||||
point: e.position?.getValue(now),
|
||||
scale: e.billboard?.scale?.getValue(now),
|
||||
rotation: e.billboard?.rotation?.getValue(now),
|
||||
image: e.billboard?.image?.getValue(now),
|
||||
image: imageValue(e.billboard?.image),
|
||||
color: color(e.billboard?.color),
|
||||
width: e.polyline?.width?.getValue(now),
|
||||
lineColor: color(e.polyline?.material?.color),
|
||||
|
||||
Reference in new issue
Block a user