1. sayfa (Toplam 1 sayfa)
xSaber
how to zoom into my skeleton without use viewport, like a zoom button
1 year ago
- xSaber
- Mesajlar: 12
Nate
You would need to write the code to do this yourself. You can look at the spine-player source code. You will need to understand how the camera works.
1 year ago
-
Nate - Mesajlar: 12213
Mario
I've added a very basic CameraController that allows zooming and paning, both on desktop and mobile:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/spine-ts/spine-webgl/src/CameraController.ts
You can set it up in the
https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/spine-ts/spine-player/src/Player.ts#L144
Something like:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/spine-ts/spine-webgl/src/CameraController.ts
You can set it up in the
success
callback of the player config:https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/spine-ts/spine-player/src/Player.ts#L144
Something like:
let config = {
success: (player) => {
let cameraController = new spine.CameraController(player.canvas, player.sceneRenderer.camera);
}
};
new spine.SpinePlayer(playerElement, config);
success: (player) => {
let cameraController = new spine.CameraController(player.canvas, player.sceneRenderer.camera);
}
};
new spine.SpinePlayer(playerElement, config);
1 year ago
-
Mario - Mesajlar: 3274
Nate
Super cool! 

1 year ago
-
Nate - Mesajlar: 12213
Mark topic unread
• 1. sayfa (Toplam 1 sayfa)
Dön Runtimes
- Tüm zamanlar UTC