fozmo-3d-preview
Advanced tools
Comparing version 1.0.44 to 1.0.45
@@ -33,2 +33,3 @@ import { BaseScene, BaseSceneConfig } from '../Base/BaseScene'; | ||
init(url: string, config: LaunchConfig): Promise<boolean>; | ||
private setExtraEffects; | ||
private setExtraParams; | ||
@@ -35,0 +36,0 @@ private _textureImageContainer; |
@@ -290,2 +290,35 @@ import { EEncryptExt, ENormalExt, ResLoaderManager } from './../manager/ResLoaderManager'; | ||
}); | ||
// 美化滚动条 | ||
const style = document.createElement('style'); | ||
style.textContent = ` | ||
#texture-container::-webkit-scrollbar { | ||
width: 8px; | ||
} | ||
#texture-container::-webkit-scrollbar-track { | ||
background: rgba(255, 255, 255, 0.1); | ||
border-radius: 4px; | ||
} | ||
#texture-container::-webkit-scrollbar-thumb { | ||
background: rgba(255, 255, 255, 0.3); | ||
border-radius: 4px; | ||
} | ||
#texture-container::-webkit-scrollbar-thumb:hover { | ||
background: rgba(255, 255, 255, 0.5); | ||
} | ||
`; | ||
document.head.appendChild(style); | ||
this.setExtraEffects(); | ||
if (config.needControllers) { | ||
this._saveCallback = config.saveCallback; | ||
this.setGUI(); | ||
} | ||
this.setUpEffects(); | ||
await this.setPostProcessing(); | ||
this.setHemisphereLight(this._params.HLEnable); | ||
this.setDirectionalLight(this._params.DLEnable); | ||
this.setExtraParams(); | ||
this.onResize(); | ||
return true; | ||
} | ||
setExtraEffects() { | ||
this.createTextureImageContainer(); | ||
@@ -343,13 +376,2 @@ this._wireframes = new THREE.Group(); | ||
}); | ||
if (config.needControllers) { | ||
this._saveCallback = config.saveCallback; | ||
this.setGUI(); | ||
} | ||
this.setUpEffects(); | ||
await this.setPostProcessing(); | ||
this.setHemisphereLight(this._params.HLEnable); | ||
this.setDirectionalLight(this._params.DLEnable); | ||
this.setExtraParams(); | ||
this.onResize(); | ||
return true; | ||
} | ||
@@ -396,21 +418,2 @@ setExtraParams() { | ||
} | ||
// 美化滚动条 | ||
const style = document.createElement('style'); | ||
style.textContent = ` | ||
#texture-container::-webkit-scrollbar { | ||
width: 8px; | ||
} | ||
#texture-container::-webkit-scrollbar-track { | ||
background: rgba(255, 255, 255, 0.1); | ||
border-radius: 4px; | ||
} | ||
#texture-container::-webkit-scrollbar-thumb { | ||
background: rgba(255, 255, 255, 0.3); | ||
border-radius: 4px; | ||
} | ||
#texture-container::-webkit-scrollbar-thumb:hover { | ||
background: rgba(255, 255, 255, 0.5); | ||
} | ||
`; | ||
document.head.appendChild(style); | ||
this._textureImageContainer.id = 'texture-container'; | ||
@@ -890,2 +893,3 @@ this.container.appendChild(this._textureImageContainer); | ||
await this.loadModel(url); | ||
this.setExtraEffects(); | ||
await this._orbitControl.reset(false); | ||
@@ -1222,2 +1226,10 @@ this._orbitControl.update(0); | ||
this._model = null; | ||
this._uniqueTextures.clear(); | ||
this._uniqueTextures = new Set(); | ||
this._wireframes.clear(); | ||
this._normals.clear(); | ||
if (this._textureImageContainer) { | ||
this.container.removeChild(this._textureImageContainer); | ||
this._textureImageContainer = null; | ||
} | ||
this.scene.clear(); | ||
@@ -1224,0 +1236,0 @@ } |
{ | ||
"name": "fozmo-3d-preview", | ||
"version": "1.0.44", | ||
"version": "1.0.45", | ||
"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
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
201260
5956