Scratch for Java
Contact
Translations
Installation
Differences to Scratch
Costumes, Backdrops and Sounds
Changelog
Multiple Approach Design
Documentation
β
Window
β
getHeight()
getInstance()
getWidth()
isDebug()
setDebug()
setStage()
π§ exit
π§ getDeltaTime
π§ setDefaultFont
π§ whenExits
Stage
β
Looks
β
add()
addBackdrop()
changeColor()
changeTint()
changeTransparency()
display()
getAll()
getCurrentBackdropIndex()
getCurrentBackdropName()
nextBackdrop()
remove()
removeAll()
removeBackdrop()
setColor()
setCursor()
setTint()
setTransparency()
switchBackdrop()
π§ eraseAll
π§ eraseBackground
π§ eraseForeground
π§ randomBackdrop
π§ removeAllPens
π§ removeAllSprites
π§ removeAllTexts
π§ setSorter
Sound
β
addSound()
isSoundPlaying()
playSound()
removeSound()
stopAllSounds()
stopSound()
Events
β
broadcast(message)
run()
whenBackdropSwitches()
whenIReceive(message)
whenKeyPressed(keyCode)
π§ whenKeyReleased
π§ whenMouseClicked
π§ whenMouseWheelMoved
Sensing
β
addTimer()
find()
getCurrentDay()
getCurrentDayOfWeek()
getCurrentHour()
getCurrentMillisecond()
getCurrentMinute()
getCurrentMonth()
getCurrentSecond()
getCurrentYear()
getDaysSince2000()
getMouseX()
getMouseY()
getTimer()
isKeyPressed()
isMouseDown()
removeTimer()
π§ count
π§ countPens
π§ countPensOf
π§ countSprites
π§ countSpritesOf
π§ countTexts
π§ countTextsOf
π§ findPensOf
π§ findSpritesOf
π§ findTextsOf
π§ getCamera
π§ getDeltaTime
π§ getHeight
π§ getMouse
π§ getWidth
Operators
β
pickRandom()
Sprite
β
Motion
β
changeX()
changeY()
getDirection()
getX()
getY()
move()
setDirection()
setOnEdgeBounce()
setPosition()
setRotationStyle()
setX()
setY()
turnLeft()
turnRight()
π§ goToMousePointer
π§ goToRandomPosition
π§ goToSprite
π§ pointInDirection
π§ pointTowardsMousePointer
π§ pointTowardsSprite
Looks
β
addCostume()
changeTint()
changeTransparency()
getCurrentCostumeIndex()
getCurrentCostumeName()
getHeight()
getPixels()
getSize()
getWidth()
goLayersBackwards()
goLayersForwards()
goToBackLayer()
goToFrontLayer()
hide()
isUI
isVisible()
nextCostume()
say()
setSize()
setTint()
setTransparency()
show()
switchCostume()
think()
π§ stamp
π§ stampToBackground
π§ stampToForeground
π§ stampToUI
Sound
β
addSound()
isSoundPlaying()
playSound()
removeSound()
stopAllSounds()
stopSound()
Events
β
broadcast(message)
run()
whenBackdropSwitches()
whenClicked()
whenIReceive(message)
whenKeyPressed(keyCode)
whenMouseMoved(x, y)
π§ whenAddedFromStage
π§ whenKeyReleased
π§ whenMouseClicked
π§ whenRemovedFromStage
Sensing
β
addTimer()
distanceToMousePointer()
distanceToSprite()
getCurrentDay()
getCurrentDayOfWeek()
getCurrentHour()
getCurrentMillisecond()
getCurrentMinute()
getCurrentMonth()
getCurrentSecond()
getCurrentYear()
getDaysSince2000()
getHitbox()
getMouseX()
getMouseY()
getTimer()
isKeyPressed()
isMouseDown()
isTouchingEdge()
isTouchingMousePointer()
isTouchingSprite()
removeTimer()
setHitbox()
π§ disableHitbox
π§ enableHitbox
π§ getDeltaTime
π§ getMouse
π§ getStage
π§ getTouchingSprite
π§ getTouchingSprites
Operators
β
pickRandom()
Pen
β
getPen()
Extensions
β
Timer
β
afterMillis()
everyMillis()
forMillis()
intervalMillis()
reset()
Animation
β
AnimatedSprite
β
Looks
β
addAnimation()
getAnimationFrame()
getAnimationInterval()
isAnimationPlayed()
playAnimation()
resetAnimation()
setAnimationFrame()
setAnimationInterval()
FS
β
File
β
load()
save()
Math
β
Random
β
noise()
noiseSeed()
random()
randomInt()
randomSeed()
Vector2
β
π§ add
π§ angle
π§ distance
π§ distanceSq
π§ dot
π§ fromPolar
π§ getX
π§ getY
π§ length
π§ lengthSq
π§ multiply
π§ normalVector
π§ reverse
π§ rotateBy
π§ rotateTo
π§ sub
π§ unitVector
Pen
β
changeColor()
changeSize()
changeTransparency()
down()
eraseAll()
setColor()
setPosition()
setSize()
setTransparency()
up()
Recorder
β
FFmpeg
Frame
GIF
camera
β
π§ changeX
π§ changeY
π§ changeZoom
π§ getPosition
π§ getX
π§ getY
π§ getZoom
π§ resetZoom
π§ setPosition
π§ setX
π§ setY
π§ setZoom
π§ setZoomLimit
π§ toGlobalPosition
π§ toGlobalX
π§ toGlobalY
π§ toLocalPosition
π§ toLocalX
π§ toLocalY
Operators
β
lerp()
π§ absOf
π§ acos
π§ asin
π§ atan
π§ ceilingOf
π§ constrain
π§ cosOf
π§ eToThePowerOf
π§ floorOf
π§ lnOf
π§ logOf
π§ map
π§ max
π§ min
π§ mod
π§ sinOf
π§ sqrtOf
π§ tanOf
π§ tenToThePowerOf
Examples
β
Cat
Clock
Donut IO
Pipes
Rainbow Vine
Random Dot
Robot
Sensing
Shakespeare
Smart Rocket
Stress Test
Tiled
Timed Dot
Timer
Tutorials
β
Getting Started
Powered by
Hyperbook
Sprite
pickRandom()
changeX()
β GitHub
Licensed under CC BY-NC-SA
by
OpenPatch
.