Fix randomly assigned element marker colors limited to 8

This commit is contained in:
JannisX11 2023-01-23 23:47:52 +01:00
parent d5d16b3d06
commit d90513ae37
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class Cube extends OutlinerElement {
this.to = [size, size, size]; this.to = [size, size, size];
this.shade = true; this.shade = true;
this.mirror_uv = false; this.mirror_uv = false;
this.color = Math.floor(Math.random()*8) this.color = Math.floor(Math.random()*markerColors.length)
this.uv_offset = [0,0] this.uv_offset = [0,0]
this.inflate = 0; this.inflate = 0;
this.rotation = [0, 0, 0]; this.rotation = [0, 0, 0];

View File

@ -729,7 +729,7 @@ class Mesh extends OutlinerElement {
]; ];
new Property(Mesh, 'string', 'name', {default: 'mesh'}) new Property(Mesh, 'string', 'name', {default: 'mesh'})
new Property(Mesh, 'number', 'color', {default: Math.floor(Math.random()*8)}); new Property(Mesh, 'number', 'color', {default: Math.floor(Math.random()*markerColors.length)});
new Property(Mesh, 'vector', 'origin'); new Property(Mesh, 'vector', 'origin');
new Property(Mesh, 'vector', 'rotation'); new Property(Mesh, 'vector', 'rotation');
new Property(Mesh, 'boolean', 'visibility', {default: true}); new Property(Mesh, 'boolean', 'visibility', {default: true});