How can i use RGBELoader.js with ZIM? By the way, hello Dr. Abstract, hello to everybody. I've been very very sick. I am getting better and i am back to ZIM. Thank you.
oh nice your back, good you tell it in the forum, hope you're will soon.
Tell me more what you want to to with threeJS I like it also;
GreetZ Karel
note: I found this idea for reflection https://medium.com/@althafkhanbecse/crafting-realistic-material-reflections-with-rgbeloader-and-flakestexture-in-three-js-a20d8f5ec5a0
. Thank you Karel for the warm welcome and wish. I though i will not be able to make it. But it is the past now. It is still a struggle everyday, but luckily the spirit came back.
. Thank you for sharing the article whish explained exactly the purpose of using RGBELoaders.js , one of the multiple ways to bring life to materials by bringing life to the scene. Some models need to receive a scene reflection in order to properly appears. This is the peace of code from the article example.:
new RGBELoader()
.setPath('textures/')
.load('small_empty_room_1_4k.hdr', function (texture) {
texture.mapping = THREE.EquirectangularReflectionMapping;
scene.background = texture;
scene.environment = texture;
});
. I think RGBELoader.js needs to be define in ZIM_three unless there is an alternative to import it. Our Dr. has the answer for that.
Thank you,
Hi Kavi! Glad you are spiritually better!
Here is what we are currently importing in ZIM_three (sorry for the auto caps on ZIM).
import * as THREE from "https://zimjs.org/cdn/r156/three.module.js";
import {OrbitControls} from "https://zimjs.org/cdn/r156/OrbitControls_module.js";
import {FirstPersonControls} from "https://zimjs.org/cdn/r156/FirstPersonControls_module.js";
import {PointerLockControls} from "https://zimjs.org/cdn/r156/PointerLockControls_module.js";
import {GLTFLoader} from "https://zimjs.org/cdn/r156/GLTFLoader_module.js";
import {ObjectControls} from "https://zimjs.org/cdn/r156/ObjectControls_module.js";
import {VRButton} from "https://zimjs.org/cdn/r156/VRButton.js";
window.THREE = THREE;
export default THREE;
export {OrbitControls, FirstPersonControls, PointerLockControls, GLTFLoader, ObjectControls, VRButton};
We will look into what importing the RGBELoader might be like.
I am looking into this and when I go to get the latest version of three.js (181) it says
Deprecated in version 180 - can you believe it!
So... would the HDRLoader work for you instead?
You can try the RGBELoader now my using
import zim from "https://zimjs.org/cdn/018/zim_three";
import {RGBELoader} from "https://zimjs.org/cdn/r156/RGBELoader_module";
ok, when that is working, can the KX2loader.js also work with ZIM?
https://threejs.org/docs/#KTX2Loader
I need it for ml5js mouth gestures
Thank you Dr. Abstract. I will use the link you have mentionned. Thank you for the warm message.
When defining the above impor it gives the following error message:
Uncaught SyntaxError: The requested module 'https://zimjs.org/cdn/r156/three.module.js' does not provide an export named 'RGBFormat' (at RGBELoader_module:8:2).
That is odd as it is there in the export line.

Doing some testing...
Well... it is there. I switched over to the docs version and got same error. I moved the export over to the start of the exports and it still is broken. It is only holding the number 1024 - so I will try and reprogram it...
Oh!!! It is RGBAFormat that is there... not RGBFormat. Okay - will see what's up.
I think the loader I have is older like 135 or something so perhaps they updated to RGBA since that is what 156 has. So just changed it to RGBA - it was only holding the number 1024 so... try it out now.
If I define the following:
const hdrEquirect = new THREE.RGBELoader();
I get this message:
ncaught TypeError: THREE.RGBELoader is not a constructor.
If you import it as {RGBELoader} then you just use new RGBELoader() without the namespace. All this module stuff is a pain... but I am starting to get used to it.
I will import without the namesapce. Thank you so much for your support.
Once i use new RGBELoader() , i got the following problem.
My approach was to develop just in THREEjs. Once the script works properly under Threejs , i then convert it in Zimjs environment. Under Threejs environment i do not have any error message. But in Zimjs i had those messages.
I will do some investigation and will give you a followup.
Thank you.
After some investigations, those message are not related to RGBELoader but to TEXTURE. I will open a new call.
Thank you.

