MCPcopy Create free account
hub / github.com/mrdoob/three.js / warn

Function warn

src/utils.js:263–289  ·  view source on GitHub ↗

* Logs a warning message with the 'THREE.' prefix. * * If a custom console function is set via setConsoleFunction(), it will be used * instead of the native console.warn. The first parameter is treated as the * method name and is automatically prefixed with 'THREE.'. * * @param {...any} params

( ...params )

Source from the content-addressed store, hash-verified

261 * the method name and prefixed with 'THREE.'.
262 */
263function warn( ...params ) {
264
265 params = enhanceLogMessage( params );
266
267 const message = 'THREE.' + params.shift();
268
269 if ( _setConsoleFunction ) {
270
271 _setConsoleFunction( 'warn', message, ...params );
272
273 } else {
274
275 const stackTrace = params[ 0 ];
276
277 if ( stackTrace && stackTrace.isStackTrace ) {
278
279 console.warn( stackTrace.getError( message ) );
280
281 } else {
282
283 console.warn( message, ...params );
284
285 }
286
287 }
288
289}
290
291/**
292 * Logs an error message with the 'THREE.' prefix.

Callers 15

Three.Core.jsFile · 0.90
computeLineDistancesMethod · 0.90
updateMatrixWorldMethod · 0.90
computeLineDistancesMethod · 0.90
initMethod · 0.90
fromJSONMethod · 0.90
setFromPointsMethod · 0.90
toNonIndexedMethod · 0.90
constructorMethod · 0.90
setValuesMethod · 0.90
playMethod · 0.90
pauseMethod · 0.90

Calls 3

enhanceLogMessageFunction · 0.85
shiftMethod · 0.80
getErrorMethod · 0.80

Tested by

no test coverage detected