Thread: Feature Request Scriptable custom textured background
View Single Post
szmol96 szmol96's Avatar

JCF Member

Joined: Jun 2013

Posts: 83

szmol96 is doing well so far

Jul 19, 2018, 07:17 AM
szmol96 is offline
Reply With Quote
Well, the idea I have doesn't involve scripting only and could be used by anyone less familiar with AS. It's about drawing a heightmap with given image resolutions, which would determine the "shape" of the background itself, and the orientation of that shape could be manipulated in the script. I'm thinking of properties like zoom, stretch, rotation on different axes and mirroring (copies the shape and renders it on the opposite side of the center point).

EDIT: code for warp horizon in vertical orientation would be something like this:

customBG.loadHeightmap("heightmapExample.png"); //loads a heightmap. using a flat shape for this example
customBG.zoom = 0;
customBG.stretchX = 0; //
customBG.stretchY = 0; //no stretching on any of the axes
customBG.stretchZ = 0; //
customBG.rotationX = 0;
customBG.rotationY = 0;
customBG.rotationZ = 256; //rotated 90 degrees clockwise on the Z axis with angle ranging from 0 to 1023
customBG.mirrored = true; //mirrors background shape around center point
All your base are belong to us.

Last edited by szmol96; Jul 19, 2018 at 08:08 AM.