mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 01:06:00 +08:00
[glfw] Switch to loader scale
This commit is contained in:
parent
8663dd89c7
commit
099c3ba096
@ -104,12 +104,11 @@ int main() {
|
||||
GlTextureLoader textureLoader;
|
||||
Atlas *atlas = new Atlas("data/celestial-circus-pma.atlas", &textureLoader);
|
||||
SkeletonBinary binary(*atlas);
|
||||
binary.setScale(0.2f);
|
||||
SkeletonData *skeletonData = binary.readSkeletonDataFile("data/celestial-circus-pro.skel");
|
||||
|
||||
// Create a skeleton from the data
|
||||
Skeleton skeleton(*skeletonData);
|
||||
skeleton.setScaleX(0.2);
|
||||
skeleton.setScaleY(0.2);
|
||||
skeleton.setupPose();
|
||||
skeleton.update(0);
|
||||
skeleton.updateWorldTransform(Physics_Update);
|
||||
|
||||
@ -205,6 +205,7 @@ void USpineSkeletonAnimationComponent::SetPlaybackTime(float InPlaybackTime, boo
|
||||
if (bCallDelegates) {
|
||||
BeforeUpdateWorldTransform.Broadcast(this);
|
||||
}
|
||||
skeleton->update(physicsTimeScale * DeltaTime);
|
||||
skeleton->updateWorldTransform(Physics_Update);
|
||||
if (bCallDelegates) {
|
||||
AfterUpdateWorldTransform.Broadcast(this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user