Hi everyone,
We have been implementing the version 1 .env files over at our client about two years ago.
They now ask for additional environment textures but I now see the newly generated .env files are ‘version 2’ and incompatible.
We cannot simply upgrade/adjust the code on our client’s side, even though that would be ideal.
Is there an older version of the Sandbox in which we can simply generate the version 1 .env files?
Any advice appreciated, we’re hitting a wall here, thanks!
Hey! you can use the old sandbox and deploy it somewhere:
Babylon.js/sandbox at 6f34248fa6da71a9d9129fa6a1ac7db0189bf043 · BabylonJS/Babylon.js (github.com)
Or even get more back in time if required
Thank you Deltakosh, I’ve uploaded the code somewhere, adjust the “css” and “js” links, bypassed the Monaco loader with “babylonjs-loaders.js”, but the playground won’t run.
There are no errors in Chrome, but when I drag an glb into the page it simply downloads, doesn’t upload.
Any tips?
Wait I thought you meant the sandbox ? But anyway, what are the error in the console?
Oh yes I meant sandbox, but the files you linked pointed to the Playground folder files? (when you click the ‘Go to file’ button).
The /sandbox folder contains the new “version 2” environment export.
I’m sorry, I guess I’m missing something here.
Okay ignore my ‘Playground’ reply.
I’ve uploaded the /sandbox folder from the 2-year-old version of which you sent me the link and cleared my browser cache.
That version outputs an .env file that is version 2.
Maybe you have a git link to an even older version?
Hi @Deltakosh , sorry to bother you again, but could you point me to an older version of the sandbox? Thanks!
First my link was to the sandbox: Babylon.js/sandbox at 6f34248fa6da71a9d9129fa6a1ac7db0189bf043 · BabylonJS/Babylon.js (github.com)
Not the playground
Then the sandbox code uses a link to load a version of bjs:
Babylon.js/index.html at 6f34248fa6da71a9d9129fa6a1ac7db0189bf043 · BabylonJS/Babylon.js (github.com)
Line 18 to 27
In those lines you can point to a previous version of BabylonJS (where we have version 1 of the env)
Here are the potential values:
Thank you! I really need to learn how to work with Github I’m going to try this out
Hi again Deltakosh,
I’ve replaced lines 18-27 in index.html (of the /sandbox folder) from this:
<script src="https://preview.babylonjs.com/ammo.js"></script>
<script src="https://preview.babylonjs.com/cannon.js"></script>
<script src="https://preview.babylonjs.com/Oimo.js"></script>
<script src="https://preview.babylonjs.com/libktx.js"></script>
<script src="https://preview.babylonjs.com/babylon.js"></script>
<script src="https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js"></script>
<script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.min.js"></script>
<script src="https://preview.babylonjs.com/serializers/babylonjs.serializers.min.js"></script>
<script src="https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script>
to this:
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/ammo.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/cannon.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/Oimo.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/libktx.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/babylon.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/inspector/babylon.inspector.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/loaders/babylonjs.loaders.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/serializers/babylonjs.serializers.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/materialsLibrary/babylonjs.materials.min.js"></script>
and I also tried this:
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/babylon.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/gui/babylon.gui.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/inspector/babylon.inspector.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/materialsLibrary/babylonjs.materials.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/postProcessesLibrary/babylonjs.postProcess.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/loaders/babylonjs.loaders.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BabylonJS/Babylon.js@4.1.0/dist/serializers/babylonjs.serializers.min.js"></script>
Neither of those options work unfortunately, I get the error “Cannot read properties of undefined (reading ‘GetAvailableVariants’)”
Thanks!
I may need a repro somewhere to check what is wrong for you
1 Like
Okay, I’ve uploaded it here:
Does that help?
It does
I know why now. The system expects to find variants support in our gltf loader meaning you have to go more back in time
Let’s try this one:
Babylon.js/sandbox at 85290e0941c3149b8545ac57ddeae237bd0f0a8f · BabylonJS/Babylon.js (github.com)
I’ve updated the URL with my 1st test group of script replacements, but now dragging & dropping a GLB simply downloads it to the downloads folder.
I’m sorry Deltakosh, but I’m really not familiar with Github, just expect I’m a total noob
Okay I’ve updated all 4 files now (not just index.html) and now the GLB upload works again.
But I don’t see the menu buttons anymore for getting to the .env export. Did I somehow mess that up?
Hi @Deltakosh again, sorry to keep asking, but we promised our client an update last week.
The last time we generated about 20 .env files was October 19th, 2020. They are all version 1.
Just to be clear, there’s no backup of your entire code for such a date or timeframe around it?
sebavan
February 21, 2022, 9:59pm
17
You could use the code snippet from this answer: .env conversion from .hdr throws an error - #6 by sebavan You could do that in 4.2.1
Thank Sebavan, we managed to generate a version 1 environment
1 Like