-
Beta Was this translation helpful? Give feedback.
Answered by
Hartrik
Feb 2, 2024
Replies: 2 comments 3 replies
-
Unfortunatelly, this is not possible through scripting. Changes to the Java codebase would be required to create and expose such API functions. And then rebuild the app using Maven... But such things are easy to do in Sand Game JS. Few examples that can be executed in browser console: // spawn fire after each iteration = fire source
sandGame.addOnProcessed(() => {
sandGame.graphics().drawRectangle(60, 50, 100, 55, brushes.fire);
});
// bigger fire
sandGame.addOnProcessed(() => {
sandGame.graphics().drawRectangle(120, 50, 170, 55, brushes.fire);
sandGame.graphics().drawRectangle(120, 50, 170, 55, brushes.effect_temp_255);
});
// control processing manually
sandGame.stopProcessing();
for (let i =0; i < 1000; i++) {
sandGame.doProcessing(); // perform one iteration now
}
sandGame.startProcessing(); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
fabkury
-
Cool, I will check your profile :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunatelly, this is not possible through scripting. Changes to the Java codebase would be required to create and expose such API functions. And then rebuild the app using Maven...
But such things are easy to do in Sand Game JS. Few examples that can be executed in browser console: