MCPcopy
hub / github.com/widgetti/ipyvolume / select

Method select

js/src/values.ts:211–228  ·  view source on GitHub ↗
(selected)

Source from the content-addressed store, hash-verified

209 }
210
211 select(selected) {
212 // copy since we will modify
213 const sizes = (this.array.size as any) = this.array.size.slice();
214 const size_selected = this.array.size_selected;
215 // copy since we will modify
216 const color = (this.array_vec4.color as any) = this.array_vec4.color.slice();
217 const color_selected = this.array_vec4.color_selected;
218 // this assumes, and requires that color_selected is an array, maybe a bit inefficient
219 selected.forEach((element, index) => {
220 if (index < this.length) {
221 sizes[index] = size_selected[index];
222 color[index * 4 + 0] = color_selected[index * 4 + 0];
223 color[index * 4 + 1] = color_selected[index * 4 + 1];
224 color[index * 4 + 2] = color_selected[index * 4 + 2];
225 color[index * 4 + 3] = color_selected[index * 4 + 3];
226 }
227 });
228 }
229
230 merge_to_vec3(names, new_name) {
231 const element_length = names.length;

Callers 6

create_meshMethod · 0.95
_d3_add_axisMethod · 0.45
_d3_add_axis_tickMethod · 0.45
_d3_update_axis_tickMethod · 0.45
_real_updateMethod · 0.45
select_textFunction · 0.45

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected