Spiral »
You do not own this project, so changes will not be saved
// Was a little bored so did this :)
//
// Nothing fancy, just a simple spiral with a pinch of salt
// Andy
$screenWidth = getScreenWidth()
$screenHeight = getScreenHeight()
$halfWidth = $screenWidth / 2
$halfHeight = $screenHeight / 2
tt2 = new Image("tt2.png")
image = new Image("blob2.png")
setFont( 'Arial', 32, 'italic' )
a = 5
b = 5
aa = 0.1
av = 0.001
onEachFrame() do
fill( 0, 0, 0 )
setBlend(:add)
x = $halfWidth
y = $halfHeight
if (aa > 4 || aa < 0)
av = -av
end
aa = aa + av * getDelta()
360.times() do |i|
lastX = x
lastY = y
angle = aa * i
x = $halfWidth + (a + b * angle) * angle.cos()
y = $halfHeight + (a + b * angle) * angle.sin()
drawImage(image, x, y, i*aa*2, i*aa*2, true)
setColor( i/2, 255, i/3 )
drawLine(lastX, lastY, x, y, 2)
end
end
ERRORS
- ▶Language Reference
- ▶Core
- ▶Graphics
- ▶Image Class
- new
- clear
- clearTransforms
- clone
- drawCircle
- drawEllipse
- drawImage
- drawInnerSegment
- drawLine
- drawPixel
- drawPolygon
- drawRect
- drawRotatedImage
- drawRoundedRect
- drawSegment
- drawText
- fill
- fillCircle
- fillEllipse
- fillInnerSegment
- fillPolygon
- fillRect
- fillRoundedRect
- fillSegment
- fillText
- getAlpha
- getBlue
- getColors
- getGreen
- getHeight
- getPixel
- getPixelAlpha
- getPixelBlue
- getPixelGreen
- getPixelRed
- getRed
- getWidth
- isOverlap
- isPixelOverlap
- multAlpha
- rotate
- scale
- setAlpha
- setBlend
- setColor
- setFont
- setPixel
- setTransform
- size
- transform
- translate
- undoTransform
- ▶Transformations
- How Alignment Works
- Using Colors
- drawCircle
- drawEllipse
- drawImage
- drawInnerSegment
- drawLine
- drawPixel
- drawPolygon
- drawRect
- drawRotatedImage
- drawRoundedRect
- drawSegment
- drawText
- fill
- fillCircle
- fillEllipse
- fillInnerSegment
- fillPolygon
- fillRect
- fillRoundedRect
- fillSegment
- fillText
- getAlpha
- getBlue
- getColors
- getGreen
- getRed
- multAlpha
- setAlpha
- setBlend
- setColor
- setFont
- ▶Image Class
- ▶Audio
- ▶Controls
- ▶Collisions
- ▶Utility
- ▶Debugging
