Skip to content

Please provide an example of animating a scene #354

Closed Answered by rodja
ipsod asked this question in Q&A
Discussion options

You must be logged in to vote

To move a sphere you could do

from nicegui import ui

with ui.scene(600, 400) as scene:
    player = scene.sphere().move(0, 0, 1)

ui.joystick(on_move=lambda e: player.move(e.x + player.x, e.y + player.y, player.z))

ui.run()

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ipsod
Comment options

You must be logged in to vote
2 replies
@falkoschindler
Comment options

@ipsod
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #353 on February 09, 2023 04:46.