MCPcopy
hub / github.com/CesiumGS/cesium / set

Method set

packages/engine/Source/Renderer/createUniform.js:155–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153 }
154
155 set() {
156 const v = this.value;
157
158 if (defined(v.red)) {
159 if (!Color.equals(v, this._value)) {
160 this._value = Color.clone(v, this._value);
161 this._gl.uniform3f(this._location, v.red, v.green, v.blue);
162 }
163 } else if (defined(v.x)) {
164 if (!Cartesian3.equals(v, this._value)) {
165 this._value = Cartesian3.clone(v, this._value);
166 this._gl.uniform3f(this._location, v.x, v.y, v.z);
167 }
168 } else {
169 //>>includeStart('debug', pragmas.debug);
170 throw new DeveloperError(
171 `Invalid vec3 value for uniform "${this.name}".`,
172 );
173 //>>includeEnd('debug');
174 }
175 }
176}
177
178///////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 3

definedFunction · 0.50
equalsMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected