bx-1379-redesign #15

Merged
ksenia_mikhailova merged 124 commits from bx-1379-redesign into dev 2024-09-06 15:39:13 +03:00
1 changed files with 4 additions and 10 deletions
Showing only changes of commit 107a5f03af - Show all commits

View File

@ -180,18 +180,12 @@ const loadModels = async () => {
boundingBox.getCenter(size);
(find_element as Mesh).localToWorld(world_position);
const p = raw_dataStore.data.min_distance * 0.05;
const point = point_mesh_obj.clone()
const hsl_color = { h: 0, s: 0, l: 0 }
new Color(envVars.clear_color).getHSL(hsl_color)
const rad = Math.PI / 180
hsl_color.h = (((hsl_color.h * rad) + 180) % 360) * rad
hsl_color.s = hsl_color.s + 0.2
// console.log(size)
point_mesh_obj.traverse((el: Group | Mesh) => {
const point_color = new Color(envVars.clear_color).offsetHSL(0.45, 0.2, 0)
// console.log(point_color)
point.traverse((el: Group | Mesh) => {
if (el instanceof Mesh && el.material && el.material instanceof MeshStandardMaterial) {
el.material.color = new Color().setHSL(hsl_color.h, hsl_color.s, hsl_color.l)
el.material.color = point_color
}
})
point.position.set(world_position.x, size.y, world_position.z)