Hi folks,
To be precise, I’m upgrading from 4.0.3 to 4.1.0-alpha.17.
1. beginAnimation missing on scene object
This is the error I get when i call scene.beginAnimation(...)
:
scene.beginAnimation is not a function
at updateObjects (Viewer.js:450)
at commitHookEffectList (react-dom.development.js:18053)
at commitPassiveHookEffects (react-dom.development.js:18080)
at HTMLUnknownElement.callCallback (react-dom.development.js:147)
at Object.invokeGuardedCallbackDev (react-dom.development.js:196)
at invokeGuardedCallback (react-dom.development.js:250)
at commitPassiveEffects (react-dom.development.js:19706)
at wrapped (scheduler-tracing.development.js:177)
at flushPassiveEffects (react-dom.development.js:19759)
at Object.enqueueSetState (react-dom.development.js:11593)
It works fine in the PG at https://www.babylonjs-playground.com/#DMLMIP#1.
2. SkyMaterial shaders can’t be computed
In this context
const skyMaterial = new SkyMaterial('sky-material', scene)
skyMaterial.backFaceCulling = false
const skybox = BoxBuilder.CreateBox('skybox', { size: 1000 }, scene)
skybox.material = skyMaterial
This is the error I get when I call skybox.material = skyMaterial
:
(warn) engine.js:3095 WebGL: INVALID_VALUE: shaderSource: string not ASCII
(warn) engine.js:3095 WebGL: INVALID_VALUE: shaderSource: string not ASCII
(error) index.js:1375 BJS - [13:14:14]: Unable to compile effect:
(error) index.js:1375 BJS - [13:14:14]: Uniforms: world, viewProjection, view, vFogInfos, vFogColor, pointSize, vClipPlane, vClipPlane2, vClipPlane3, vClipPlane4, luminance, turbidity, rayleigh, mieCoefficient, mieDirectionalG, sunPosition, cameraPosition, cameraOffset
(error) index.js:1375 BJS - [13:14:14]: Attributes: position
(error) index.js:1375 BJS - [13:14:14]: Defines:
(error) index.js:1375 BJS - [13:14:14]: Error: VERTEX SHADER ERROR: 1:1: '' : syntax error
I can provide the full stack trace for these if that’s useful to anyone.
The closest PG I could find and adapt (to use BoxBuilder) is https://www.babylonjs-playground.com/#E6OZX#270 and it works fine.
3. Failure to create Gizmos
This is the error I get when I call new BoundingBoxGizmo(Color3.FromHexString('#0984e3'))
.
utilityLayerRenderer.js:58 Uncaught TypeError: Cannot read property 'getEngine' of null
at new UtilityLayerRenderer (utilityLayerRenderer.js:58)
at Function.get [as DefaultKeepDepthUtilityLayer] (utilityLayerRenderer.js:226)
at new BoundingBoxGizmo (boundingBoxGizmo.js:37)
at onSceneReady (ObjectsEditor.js:70)
at doneWithScene (Viewer.js:452)
at updateObjects (Viewer.js:615)
at commitHookEffectList (react-dom.development.js:18053)
at commitPassiveHookEffects (react-dom.development.js:18080)
at HTMLUnknownElement.callCallback (react-dom.development.js:147)
at Object.invokeGuardedCallbackDev (react-dom.development.js:196)
at invokeGuardedCallback (react-dom.development.js:250)
at commitPassiveEffects (react-dom.development.js:19706)
at wrapped (scheduler-tracing.development.js:177)
at flushPassiveEffects (react-dom.development.js:19759)
at renderRoot (react-dom.development.js:20332)
at performWorkOnRoot (react-dom.development.js:21357)
at performWork (react-dom.development.js:21267)
at performSyncWork (react-dom.development.js:21241)
at interactiveUpdates$1 (react-dom.development.js:21526)
at interactiveUpdates (react-dom.development.js:2268)
at dispatchInteractiveEvent (react-dom.development.js:5085)
The closest PG I could find and adapt (add the color in the constructor) is https://www.babylonjs-playground.com/#SG9ZZB#1 and it works fine.
Questions
I realize this is hard for you to help since each of them works in the PG and I cannot provide a repro case. I’m just hoping someone will identify something, knowing the changes existing in the preview release.
To get these errors, I only need to upgrade @babylonjs/core. Downgrading fixes everything. No other changes to the code.
This is in an ES6 codebase (I’m using React with create-react-app handling webpack for me). I’m making maximum use of tree shacking. I believe this setup cannot be reproduced in the PG, is that right? Would their be any other way to debug this? To share my setup in any other way? How are releases tested for ES6 at the moment?
I’ve been at a loss at this, so any pointer will be useful.
Thanks.
Note: First time I tried the preview was at 4.1.0-alpha.14 and as far as I remember some of these already existed.