Programmatically Create Sprite
Is it possible to programmatically create a sprite? For instance, I'd like to create a texture the size of the screen than contains the shadows of certain objects to draw them all at once. Is this possible?
Is it possible to programmatically create a sprite? For instance, I'd like to create a texture the size of the screen than contains the shadows of certain objects to draw them all at once. Is this possible?
Perfect! Thank you. Is there a place where features like this can be found? I haven't seen anything about images on the API documentation.
Edit: Also, how do you access this? I don't seem to be able to create a new Image object.
Edit2: Seems it's not available for Javascript, only Microscript. That's too bad :\
Ah yeah, it's a feature exclusive to Microscript 2.0 :/
If you want though, you can use javascript and microscript!
Microscript has a function
system.javascript("""
// javascript goes here
""")
that runs any javascript you put into it
you can access microscript variables/functions with global.(variable name)
In the documentation you have: Doc >> More >> JavaScript
In JavaScript, the global variable for a microStudio image, Image, conflicts with the name of the HTML Image element. For this reason, when working in JavaScript, this variable is renamed msImage. You can thus create a microStudio Image object with image = new msImage( width, height ).