three.js: Errors in the threejs.org editor
Description of the problem
In the r113 editor (https://threejs.org/editor/), the following issues occured:
Menubar.Edit.js:161 Uncaught TypeError: Cannot read property 'isShaderMaterial' of undefined
at Menubar.Edit.js:161
at Scene.traverse (three.module.js:5707)
at UIRow.<anonymous> (Menubar.Edit.js:157)
Sidebar.Object.js:571 Uncaught TypeError: Cannot set property 'needsUpdate' of undefined
at UIBoolean.update (Sidebar.Object.js:571)
Sidebar.Object.js:571 Uncaught TypeError: Cannot set property 'needsUpdate' of undefined
at UIBoolean.update (Sidebar.Object.js:571)
This was from attempting to click objects and set the shadows flags to true in the ‘Camera’ example scene. A log warning found 15 times when looking in the log:
three.module.js:18347 THREE.WebGLProgram: gl.getProgramInfoLog() C:\fakepath(231,25-83): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
Two ‘not cached’ errors from google analytics showed up at the top of the log:
[SW] Not cached: https://ssl.google-analytics.com/ga.js
[SW] Not cached: https://ssl.google-analytics.com/__utm.gif?utmwv=5.7.2&utms=14&utmn=1003831722&utmhn=threejs.org&utmcs=UTF-8&utmsr=1536x864&utmvp=1211x700&utmsc=24-bit&utmul=en-us&utmje=0&utmfl=-&utmdt=three.js%20%2F%20editor&utmhid=1226119357&utmr=0&utmp=%2Feditor%2F&utmht=1580941272269&utmac=UA-86951-15&utmcc=__utma%3D88431582.1846809080.1557700072.1580870481.1580938466.12%3B%2B__utmz%3D88431582.1580938466.12.8.utmcsr%3Dgithub.com%7Cutmccn%3D(referral)%7Cutmcmd%3Dreferral%7Cutmcct%3D%2Fmrdoob%2Fthree.js%3B&utmjid=&utmu=qAAAAAAAAAAAAAAAAAAAAAAE~
Three.js version
- Dev
- r113
- https://threejs.org/editor/
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
Unknown
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (5 by maintainers)
These 15 warnings look like a variation of ones seen in #18422. It may be valid to continue tracking this there.
I think doing a
max( 0, f )would be safer, but we’ll see what they do.@Mugen87 reported it to Chrome too. https://bugs.chromium.org/p/chromium/issues/detail?id=1050238
Ah, now I can reproduce one issue. If you select 3D objects without materials and then change
receiveShadows, the following block produces a runtime error:https://github.com/mrdoob/three.js/blob/9c9d05a2b91b2a76dd1e5b7409af39ed5205f49d/editor/js/Sidebar.Object.js#L569-L574
This should be an easy fix.
Thanks for sending these!
However, unless we know what action you did that caused these errors is hard for us to fix them.