more memory efficient wireframe for KM

This commit is contained in:
Stewart Allen 2022-01-23 20:04:32 -05:00
commit 64fa3f80bb
2 changed files with 8 additions and 4 deletions

View file

@ -950,9 +950,13 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
} }
if (set) { if (set) {
let dark = KIRI.api.conf.get().controller.dark; let dark = KIRI.api.conf.get().controller.dark;
let geo = new THREE.WireframeGeometry(mesh.geometry); let mat = new THREE.MeshBasicMaterial({
let mat = new THREE.LineBasicMaterial({ color: dark ? 0xaaaaaa : 0 }); wireframe: true,
let wire = widget.wire = new THREE.LineSegments(geo, mat); color: dark ? 0xaaaaaa : 0,
opacity: 0.5,
transparent: true
})
let wire = widget.wire = new THREE.Mesh(mesh.geometry.shallowClone(), mat);
mesh.add(wire); mesh.add(wire);
} }
if (KIRI.api.view.get() === KIRI.conf.VIEWS.ARRANGE) { if (KIRI.api.view.get() === KIRI.conf.VIEWS.ARRANGE) {

View file

@ -493,7 +493,7 @@ function set_darkmode(dark) {
} }
sky.set({ sky.set({
color: dark ? 0 : 0xffffff, color: dark ? 0 : 0xffffff,
ambient: { intensity: dark ? 0.5 : 1.1 } ambient: { intensity: dark ? 0.55 : 1.1 }
}); });
platform.set({ platform.set({
light: dark ? 0.08 : 0.08, light: dark ? 0.08 : 0.08,