My application is working fine in windows & android.
But I am getting issue with some iOS devices on load when they have opened lots off application in background.
My scene has 30 MB model, and 20 MB hdr ( I reduced it to 2 MB)
So I created one simple application in which I am just loading model and hdr.
Here is my code and video
import * as THREE from 'three';
import { loadGlb } from './loadGlb';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
camera.position.z = 5;
const controls = new OrbitControls(camera, renderer.domElement);
// Environment map
const rgbeLoader = new RGBELoader()
.setPath('./');
const [texture] = await Promise.all([
rgbeLoader.loadAsync("./noon_bright_.hdr"),
]);
texture.offset.y = Math.PI / 2
texture.mapping = THREE.EquirectangularReflectionMapping
scene.environment = texture;
loadGlb('./(52313)__sport-water-bottle-with-spout-lid.glb').then((root) => {
console.log(scene.children)
scene.add(root);
})
function animate() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
controls.update();
}
animate();