Answer the question
In order to leave comments, you need to log in
What means to choose for rendering and controlling the playing field?
Good afternoon.
It is necessary to create a playing field for 2 players.
The site is created using Wicket Apache.
When they go to the field page, they have a common class that contains data about the page and about both players.
What are the easiest ways to provide rendering and control over events (onClick, etc.)?
The field map is 240 hexes, with wicket:id specified, but since they are Image elements, there is not even a basic click handler for them. js does not want to be connected due to its ignorance, besides, the question arises with data synchronization, because when going to the battle page, each player already has the saved data necessary for him in a special class.
It seemed to me that drawing on canvas could be a solution, but the problem with absolute coordinates and the lack of resizing spoiled the idea, since for the current implementation, all properties can be written through css, which, together with the svg format of field hexes, gives a good result.
Answer the question
In order to leave comments, you need to log in
D3.js is great at working with dynamic SVG, as well as handling events like clicks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question