bz-slidepane OK + console started + intro loader
This commit is contained in:
+4
-11
@@ -23,7 +23,7 @@ class Intro{
|
||||
new Promise((resolve, reject) => {
|
||||
new RGBELoader()
|
||||
.setPath('/app/assets/images/')
|
||||
.load('kloofendal_48d_partly_cloudy_puresky_2k.hdr', resolve, this.hdrProgress, reject)
|
||||
.load('kloofendal_48d_partly_cloudy_puresky_2k.hdr', resolve, null, reject)
|
||||
})
|
||||
|
||||
const loadTexture1 = () =>
|
||||
@@ -45,15 +45,6 @@ class Intro{
|
||||
this.Xcorrection = -0.02
|
||||
}
|
||||
|
||||
hdrProgress(xhr){
|
||||
const pb = document.querySelector('div.progress')
|
||||
if (xhr.lengthComputable) {
|
||||
const percent = (xhr.loaded / xhr.total) * 100
|
||||
pb.style.width = percent.toFixed(0)
|
||||
if(percent.toFixed(0)>=99) pb.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
initScene(LoadersResults){ console.log('initScene')
|
||||
let hdrTexture
|
||||
const [hdrResult, texResultP42, texResultEE] = LoadersResults
|
||||
@@ -182,11 +173,13 @@ class Intro{
|
||||
})
|
||||
|
||||
this.renderer.render(this.scene, this.camera)
|
||||
document.querySelector('div.loading').style.display = 'none'
|
||||
this.canvas.classList.add('ready')
|
||||
|
||||
}
|
||||
|
||||
launch3DAnim(){ console.log('CSs finished, launching 3D anim')
|
||||
document.getElementById('startbtn').style.display = 'block'
|
||||
this.nextAnim = Date.now()
|
||||
this.animate()
|
||||
}
|
||||
@@ -228,7 +221,7 @@ class Intro{
|
||||
}
|
||||
if (!this.planeEE) {
|
||||
const geo = new THREE.PlaneGeometry(planeWidth, planeHeight)
|
||||
this.matEE = new THREE.MeshBasicMaterial({ map: this.backgroundTextureEE, transparent: false, alphaTest: 0.01, depthWrite:true, depthTest:true })
|
||||
this.matEE = new THREE.MeshBasicMaterial({ map: this.backgroundTextureEE, transparent: false, alphaTest: 0.001, depthWrite:true, depthTest:true })
|
||||
this.matEE.defines = this.matEE.defines || {}
|
||||
this.matEE.defines.USE_UV = ""
|
||||
this.matEE.onBeforeCompile = shader => {
|
||||
|
||||
Reference in New Issue
Block a user