more memory efficient wireframe for KM
This commit is contained in:
parent
f6d1ba79fd
commit
64fa3f80bb
2 changed files with 8 additions and 4 deletions
|
|
@ -950,9 +950,13 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
}
|
||||
if (set) {
|
||||
let dark = KIRI.api.conf.get().controller.dark;
|
||||
let geo = new THREE.WireframeGeometry(mesh.geometry);
|
||||
let mat = new THREE.LineBasicMaterial({ color: dark ? 0xaaaaaa : 0 });
|
||||
let wire = widget.wire = new THREE.LineSegments(geo, mat);
|
||||
let mat = new THREE.MeshBasicMaterial({
|
||||
wireframe: true,
|
||||
color: dark ? 0xaaaaaa : 0,
|
||||
opacity: 0.5,
|
||||
transparent: true
|
||||
})
|
||||
let wire = widget.wire = new THREE.Mesh(mesh.geometry.shallowClone(), mat);
|
||||
mesh.add(wire);
|
||||
}
|
||||
if (KIRI.api.view.get() === KIRI.conf.VIEWS.ARRANGE) {
|
||||
|
|
|
|||
|
|
@ -493,7 +493,7 @@ function set_darkmode(dark) {
|
|||
}
|
||||
sky.set({
|
||||
color: dark ? 0 : 0xffffff,
|
||||
ambient: { intensity: dark ? 0.5 : 1.1 }
|
||||
ambient: { intensity: dark ? 0.55 : 1.1 }
|
||||
});
|
||||
platform.set({
|
||||
light: dark ? 0.08 : 0.08,
|
||||
|
|
|
|||
Loading…
Reference in a new issue