MCPcopy
hub / github.com/mrdoob/three.js / setFromArray

Method setFromArray

src/math/Box3.js:65–77  ·  view source on GitHub ↗

* Sets the upper and lower bounds of this box so it encloses the position data * in the given array. * * @param {Array } array - An array holding 3D position data. * @return {Box3} A reference to this bounding box.

( array )

Source from the content-addressed store, hash-verified

63 * @return {Box3} A reference to this bounding box.
64 */
65 setFromArray( array ) {
66
67 this.makeEmpty();
68
69 for ( let i = 0, il = array.length; i < il; i += 3 ) {
70
71 this.expandByPoint( _vector.fromArray( array, i ) );
72
73 }
74
75 return this;
76
77 }
78
79 /**
80 * Sets the upper and lower bounds of this box so it encloses the position data

Callers 1

Box3.tests.jsFile · 0.80

Calls 3

makeEmptyMethod · 0.95
expandByPointMethod · 0.95
fromArrayMethod · 0.45

Tested by

no test coverage detected