{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/6236","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/6236/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/6236/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/6236/events","html_url":"https://github.com/mrdoob/three.js/issues/6236","id":61435612,"number":6236,"title":"WebGLRenderer warns with an 'undefined' when texture has no sourceFile","user":{"login":"redsolarmoon","id":11366279,"avatar_url":"https://avatars.githubusercontent.com/u/11366279?v=3","gravatar_id":"","url":"https://api.github.com/users/redsolarmoon","html_url":"https://github.com/redsolarmoon","followers_url":"https://api.github.com/users/redsolarmoon/followers","following_url":"https://api.github.com/users/redsolarmoon/following{/other_user}","gists_url":"https://api.github.com/users/redsolarmoon/gists{/gist_id}","starred_url":"https://api.github.com/users/redsolarmoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redsolarmoon/subscriptions","organizations_url":"https://api.github.com/users/redsolarmoon/orgs","repos_url":"https://api.github.com/users/redsolarmoon/repos","events_url":"https://api.github.com/users/redsolarmoon/events{/privacy}","received_events_url":"https://api.github.com/users/redsolarmoon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mrdoob/three.js/labels/Suggestion","name":"Suggestion","color":"ffffcf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-14T05:38:41Z","updated_at":"2015-03-14T20:12:00Z","closed_at":null,"body":"This happens with webgl_interactive_cubes_gpu example...\r\nhttps://github.com/mrdoob/three.js/blob/dev/examples/webgl_interactive_cubes_gpu.html\r\n\r\nWarning is triggered at...\r\nhttps://github.com/mrdoob/three.js/blob/dev/src/renderers/WebGLRenderer.js#L5456\r\n\r\nWhen a texture.sourceFile is not specified, this returns an undefined to the console. Suggestion...\r\n\r\n```javascript\r\nTHREE.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.' +\r\n\t( texture.sourceFile !== undefined ? ' ( ' + texture.sourceFile + ' )' : '' ) );\r\n```\r\nAn alternative to shortening it up?\r\n```javascript\r\nTHREE.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter. ( ' + ( texture.sourceFile || '' ) + ' )' );\r\n```\r\n\r\nThis also applies to line...\r\nhttps://github.com/mrdoob/three.js/blob/dev/src/renderers/WebGLRenderer.js#L5447\r\n\r\nAny suggestions on what message to show otherwise (when 'undefined'), or is leaving it blank fine as shown?"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/80699033","html_url":"https://github.com/mrdoob/three.js/issues/6236#issuecomment-80699033","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/6236","id":80699033,"user":{"login":"redsolarmoon","id":11366279,"avatar_url":"https://avatars.githubusercontent.com/u/11366279?v=3","gravatar_id":"","url":"https://api.github.com/users/redsolarmoon","html_url":"https://github.com/redsolarmoon","followers_url":"https://api.github.com/users/redsolarmoon/followers","following_url":"https://api.github.com/users/redsolarmoon/following{/other_user}","gists_url":"https://api.github.com/users/redsolarmoon/gists{/gist_id}","starred_url":"https://api.github.com/users/redsolarmoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redsolarmoon/subscriptions","organizations_url":"https://api.github.com/users/redsolarmoon/orgs","repos_url":"https://api.github.com/users/redsolarmoon/repos","events_url":"https://api.github.com/users/redsolarmoon/events{/privacy}","received_events_url":"https://api.github.com/users/redsolarmoon/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T20:12:00Z","updated_at":"2015-03-14T20:12:00Z","body":"Even if it weren't added dynamically, the warning message would still report undefined since the property was never added. Maybe just leave out the reporting of the sourceFile from the warning message altogether?"}}