From dc00ae43d05ccef32e58fc49484471899ba0d5e0 Mon Sep 17 00:00:00 2001 From: HUYNH Nghi Date: Wed, 3 Aug 2022 09:22:37 +0700 Subject: [PATCH] condition to play 1st animation at index 0 --- dist/threebox.js | 2 +- src/animation/AnimationManager.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/threebox.js b/dist/threebox.js index 092bb4d3..6f6d243a 100755 --- a/dist/threebox.js +++ b/dist/threebox.js @@ -1764,7 +1764,7 @@ AnimationManager.prototype = { obj.playAnimation = function (options) { if (obj.mixer) { - if (options.animation) { + if (options.animation>=0) { setAction(options.animation) } obj.playDefault(options); diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index 7f511337..71151ceb 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -292,7 +292,7 @@ AnimationManager.prototype = { obj.playAnimation = function (options) { if (obj.mixer) { - if (options.animation) { + if (options.animation>=0) { setAction(options.animation) } obj.playDefault(options);