fozmo-3d-preview
Advanced tools
Comparing version 1.0.31 to 1.0.32
@@ -38,2 +38,3 @@ import { BaseScene, BaseSceneConfig } from '../Base/BaseScene'; | ||
private setUpEffects; | ||
private handleAinm; | ||
private handleGLB; | ||
@@ -40,0 +41,0 @@ private handleFBX; |
@@ -478,2 +478,3 @@ import { EEncryptExt, ENormalExt, ResLoaderManager } from './../manager/ResLoaderManager'; | ||
this._currentAction = action; | ||
this._params.animationName = name; | ||
} | ||
@@ -593,8 +594,3 @@ }; | ||
} | ||
async handleGLB(gltf) { | ||
const model = gltf.scene; | ||
if (BPGameConfig.ENV !== ENV.PROD) { | ||
HHConsole.info(`>>>>>>> 模型总面数:${Utils.getTriangles(model)}`); | ||
} | ||
const animations = gltf.animations; | ||
handleAinm(animations, model) { | ||
if (animations.length > 0) { | ||
@@ -610,5 +606,17 @@ this._mixer = new THREE.AnimationMixer(model); | ||
action.play(); | ||
this._params.animationName = name; | ||
if (this._saveCallback) { | ||
this._saveCallback(this._params); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
async handleGLB(gltf) { | ||
const model = gltf.scene; | ||
if (BPGameConfig.ENV !== ENV.PROD) { | ||
HHConsole.info(`>>>>>>> 模型总面数:${Utils.getTriangles(model)}`); | ||
} | ||
const animations = gltf.animations; | ||
this.handleAinm(animations, model); | ||
this.scene.add(model); | ||
@@ -624,15 +632,3 @@ await this.renderer.compileAsync(model, this.camera, this.scene); | ||
const animations = model.animations; | ||
if (animations.length > 0) { | ||
this._mixer = new THREE.AnimationMixer(model); | ||
for (const clip of animations) { | ||
const name = clip.name; | ||
const action = this._mixer.clipAction(clip); | ||
action.loop = THREE.LoopRepeat; | ||
this._animations[name] = action; | ||
if (!this._currentAction) { | ||
this._currentAction = action; | ||
action.play(); | ||
} | ||
} | ||
} | ||
this.handleAinm(animations, model); | ||
this.scene.add(model); | ||
@@ -639,0 +635,0 @@ await this.renderer.compileAsync(model, this.camera, this.scene); |
{ | ||
"name": "fozmo-3d-preview", | ||
"version": "1.0.31", | ||
"version": "1.0.32", | ||
"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
187982
5645