fozmo-3d-preview
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -43,8 +43,2 @@ import * as THREE from 'three'; | ||
this.camera.lookAt(this.scene.position); | ||
if (Utils.isiOSWechatEnv()) { | ||
window.addEventListener('orientationchange', this.onResize.bind(this)); | ||
} | ||
else { | ||
window.addEventListener('resize', this.onResize.bind(this)); | ||
} | ||
this.onResize(); | ||
@@ -101,8 +95,2 @@ this.setFPS(fps); | ||
InteractionManager.inst.removeListener(this.renderer); | ||
if (Utils.isiOSWechatEnv()) { | ||
window.removeEventListener('orientationchange', this.onResize.bind(this)); | ||
} | ||
else { | ||
window.removeEventListener('resize', this.onResize.bind(this)); | ||
} | ||
this.renderer.setAnimationLoop(null); | ||
@@ -109,0 +97,0 @@ this.container.removeChild(this.renderer.domElement); |
@@ -13,2 +13,3 @@ import { MainScene } from '../scenes/MainScene'; | ||
private constructor(); | ||
private onResize; | ||
get mainScene(): MainScene; | ||
@@ -15,0 +16,0 @@ pauseCurrentScene(): void; |
import { MainScene } from '../scenes/MainScene'; | ||
import { BPGameConfig } from '../BPGameConfig'; | ||
import { BaseStats } from '../Base/BaseStats'; | ||
import { Utils } from '../framework/Utils/Utils'; | ||
/** | ||
@@ -18,3 +19,15 @@ * 空间管理 | ||
_scenes = []; | ||
constructor() { } | ||
constructor() { | ||
if (Utils.isiOSWechatEnv()) { | ||
window.addEventListener("orientationchange", this.onResize.bind(this)); | ||
} | ||
else { | ||
window.addEventListener("resize", this.onResize.bind(this)); | ||
} | ||
} | ||
onResize() { | ||
this._scenes.forEach((scene) => { | ||
scene.onResize(); | ||
}); | ||
} | ||
get mainScene() { | ||
@@ -75,5 +88,5 @@ return this._mainScene; | ||
if (this._mainScene) { | ||
this._mainScene.destroy(); | ||
this.shiftScene(); | ||
} | ||
} | ||
} |
@@ -66,3 +66,3 @@ import { EEncryptExt, ENormalExt, ResLoaderManager } from './../manager/ResLoaderManager'; | ||
exposure: 1.0, | ||
toneMapping: 'ACESFilmic', | ||
toneMapping: 'AgX', | ||
blurriness: 0.3, | ||
@@ -563,4 +563,12 @@ bgIntensity: 1.0, | ||
this._orbitControl = null; | ||
if (this._composer) { | ||
this._composer.dispose(); | ||
this._lutPass.dispose(); | ||
if (this._bloomPass) { | ||
this._bloomPass.dispose(); | ||
} | ||
this._composer = null; | ||
} | ||
super.destroy(); | ||
} | ||
} |
{ | ||
"name": "fozmo-3d-preview", | ||
"version": "1.0.04", | ||
"version": "1.0.05", | ||
"description": "风之末 作品预览", | ||
@@ -5,0 +5,0 @@ "main": "lib/Fozmo3DPreview.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
151604
4684