• About R.U.B.E
  • Getting started
    • Opening a scene
    • Testing the scene
    • Manipulating items
      • Translating
      • Rotating
      • Scaling
    • Adding items
      • Adding a body
      • Adding a fixture
      • Adding a joint
      • Copying a joint
    • Saving the scene
  • The workspace
    • Panning and zooming views
    • Editor views
      • Item labels
    • Player views
      • Player controls
    • Docking panels
      • Items panel
      • Properties panel
        • Customizing the properties panel
      • Script panel
      • Context help panel
      • Help panel
      • Log panel
  • Editing items
    • Edit modes
    • The cursor
    • Basic editing controls
      • Selecting
      • Translating
      • Rotating
      • Scaling
    • Editing bodies
    • Editing fixtures
      • Circle shapes
      • Polygon shapes
      • Loop shapes
      • Line shapes
    • Editing vertices
    • Editing joints
      • Revolute joints
      • Distance joints
      • Prismatic joints
      • Wheel joints
      • Rope joints
      • Weld joints
      • Friction joints
      • Motor joints
    • Editing images
    • Editing world parameters
  • Custom properties
    • Creating custom properties
    • Managing custom properties in script
  • Exporting scenes
    • Difference between saving and exporting
    • Export options
    • Filtering exported properties
  • Using exported data
    • Supported loaders
      • C++
      • JavaScript
      • Java
    • JSON file structure
  • Action menu
    • Default action menu entries
      • Make chain
    • Customizing the action menu
  • Scripting
    • Rubescript intro
    • Script logs
    • Defining your own functions
    • Using #include
    • Managing scripts
    • Sorting and filtering
    • Script hooks
      • Keypress
      • Dropped images
  • Rubescript reference
    • Global functions
      • Math functions
        • Trig functions
          • cos(float)
          • sin(float)
          • tan(float)
          • acos(float)
          • asin(float)
          • atan(float)
          • atan2(float x, float y)
          • cosh(float)
          • sinh(float)
          • tanh(float)
        • Other functions
          • dr(float)
          • rd(float)
          • rnd()
          • log(float)
          • log10(float)
          • pow(float a, float b)
          • sqrt(float)
          • ceil(float)
          • abs(float)
          • floor(float)
          • fraction(float)
          • join(string[], string delimiter)
      • R.U.B.E global functions
        • Cursor related
          • cursor()
          • getCursor()
          • setCursor(float x, float y)
          • setCursor(vec2)
        • Body related
          • getBody(int)
          • getBody(string)
          • getBodies(string)
          • getSelectedBodies()
          • sb()
          • getAllBodies()
          • ab()
          • addBody(int, string)
          • select(body[])
          • deselect(body[])
          • delete(body[])
          • duplicate(body)
          • duplicate(body, bool)
          • duplicate(body[])
          • duplicate(body[], bool)
          • translate(body, vec2)
          • translate(body, float, float)
          • translate(body[], vec2)
          • translate(body[], float, float)
          • rotate(body, int, float)
          • rotate(body[], int, float)
          • sortBodies(body[], bodySortFunc@)
          • filterBodies(body[], bodyFilterFunc@)
        • Fixture related
          • getFixture(int)
          • getFixture(string)
          • getFixtures(string)
          • getSelectedFixtures()
          • sf()
          • getAllFixtures()
          • af()
          • select(fixture[])
          • deselect(fixture[])
          • delete(fixture[])
          • getShape(int, int)
          • duplicate(fixture)
          • duplicate(fixture[])
          • translate(fixture, vec2)
          • translate(fixture, float, float)
          • translate(fixture[], vec2)
          • translate(fixture[], float, float)
          • rotate(fixture, int, float)
          • rotate(fixture[], int, float)
          • sortFixtures(fixture[], fixtureSortFunc@)
          • filterFixtures(fixture[], fixtureFilterFunc@)
          • setCollisionBitplaneName(int, string)
          • getCollisionBitplaneName(int)
        • Vertex related
          • mv(float, float)
          • getVertex(int fixtureId, int vertexIndex)
          • getVertex(string fixtureName, int vertexIndex)
          • getVertices(string fixtureName)
          • getSelectedVertices()
          • sv()
          • getAllVertices()
          • av()
          • select(vertex[])
          • deselect(vertex[])
          • delete(vertex[])
          • translate(vertex, vec2)
          • translate(vertex, float, float)
          • translate(vertex[], vec2)
          • translate(vertex[], float, float)
          • rotate(vertex, int, float)
          • rotate(vertex[], int, float)
          • sortVertices(vertex[], vertexSortFunc@)
          • filterVertices(vertex[], vertexFilterFunc@)
        • Joint related
          • getJoint(int)
          • getJoint(string)
          • getJoints(string)
          • getSelectedJoints()
          • sj()
          • getAllJoints()
          • aj()
          • addJoint(int, string)
          • select(joint[])
          • deselect(joint[])
          • delete(joint[])
          • duplicate(joint)
          • duplicate(joint[])
          • translate(joint, int, vec2)
          • translate(joint, int, float, float)
          • translate(joint[], int, vec2)
          • translate(joint[], int, float, float)
          • rotate(joint, int, int, float)
          • rotate(joint[], int, int, float)
          • sortJoints(joint[], jointSortFunc@)
          • filterJoints(joint[], jointFilterFunc@)
        • Image related
          • getImage(int)
          • getImage(string)
          • getImages(string)
          • getSelectedImages()
          • si()
          • getAllImages()
          • ai()
          • addImage(int imageId, string imageDefinition)
          • addImage(string imageFile, vec2 center)
          • select(image[])
          • deselect(image[])
          • delete(image[])
          • duplicate(image)
          • duplicate(image[])
          • translate(image, vec2)
          • translate(image, float, float)
          • translate(image[], vec2)
          • translate(image[], float, float)
          • rotate(image, int, float)
          • rotate(image[], int, float)
          • sortImages(image[], imageSortFunc@)
          • filterImages(image[], imageFilterFunc@)
        • World related
          • getGravity()
          • setGravity(float, float)
          • setGravity(vec2)
          • setSimulationStepsPerSecond(float)
          • setSimulationPositionIterations(int)
          • setSimulationVelocityIterations(int)
        • Script related
          • queryOpenFile(string filter)
          • queryNumericValue(string description)
          • queryNumericValue(string description, float defaultValue)
          • queryStringValue(string description)
          • queryStringValue(string description, string defaultValue)
          • queryVectorValue(string description)
          • queryVectorValue(string description, float defaultX, float defaultY)
          • queryYesNo(string description)
          • getSupportedImageFormatsFilter()
          • getCurrentActionMenuFolder()
          • jsonEncode(dictionary)
        • Custom property related
          • addCustomProperty(string class, string type, string name, string displayName)
          • removeCustomProperty(string class, string name)
          • setCustomPropertyNames(string class, string name, string newName, string newDisplayName)
          • getCustomProperties(string class)
        • File related
          • dirExists(string path)
          • fileExists(string path)
          • readFile(string file)
          • writeFile(string file, string text)
        • Event hook related
          • getHookEventName()
          • isCtrlKeyDown()
          • isAltKeyDown()
          • getDroppedImages()
        • Color related
          • mc1(float red, float green, float blue, float alpha)
          • mc255(int red, int green, int blue, int alpha)
          • mcHex(string)
        • Other
          • getCurrentEditMode()
          • intval(string)
          • intval(string, bool& ok)
          • floatval(string)
          • floatval(string, bool& ok)
          • getMousePos()
          • print(string)
          • print(int)
          • print(bool)
          • print(float)
          • print(vec2)
          • print(color)
          • print(body)
          • print(fixture)
          • print(vertex)
          • print(joint)
          • print(image)
          • print(vec2[])
          • print(body[])
          • print(fixture[])
          • print(vertex[])
          • print(joint[])
          • print(image[])
    • R.U.B.E item classes
      • vec2
        • x
        • y
        • set(float x, float y)
        • length()
        • normalize()
        • normalized()
        • distanceTo(vec2)
        • projectOnto(vec2)
        • projectedOnto(vec2)
        • dot(vec2)
        • cross(vec2)
      • color
        • r
        • g
        • b
        • a
        • set255(int red, int green, int blue, int alpha)
        • set1(float red, float green, float blue, float alpha)
        • setHex(string)
        • getStr1()
        • getStr255()
        • getStrHex()
      • body
        • valid
        • pos
        • angle
        • id
        • select()
        • deselect()
        • isSelected()
        • getName()
        • setName(string)
        • setType(int)
        • setPosition(float x, float y)
        • setPos(float x, float y)
        • setPosition(vec2)
        • setPos(vec2)
        • setAngle(float)
        • setGravityScale(float)
        • setAngularVelocity(float)
        • setLinearDamping(float)
        • setAngularDamping(float)
        • setLinearVelocity(float x, float y)
        • setLinearVelocity(vec2)
        • setBullet(int)
        • setFixedRotation(int)
        • setSleepingAllowed(int)
        • setAwake(int)
        • setActive(int)
        • setMass(float)
        • addFixture(int fixtureId, string fixtureDefinition)
        • delete()
        • getWorldPoint(vec2)
        • getLocalPoint(vec2)
        • getWorldVector(vec2)
        • getLocalVector(vec2)
        • getWorldCenter()
        • getLocalCenter()
        • getFixtures()
        • getImages()
        • getJoints()
        • getJoints(body)
        • getType()
        • isBullet()
        • isFixedRotation()
        • isSleepingAllowed()
        • isAwake()
        • isActive()
        • getLinearVelocity()
        • getAngularVelocity()
        • getLinearDamping()
        • getAngularDamping()
        • getGravityScale()
        • getMass()
        • Custom property functions
          • getCustomProperties()
          • hasCustomProperty(string propertyName)
          • getCustomPropertyType(string propertyName)
          • getCustomInt(string propertyName, int defaultValue = 0)
          • getCustomFloat(string propertyName, float defaultValue = 0)
          • getCustomString(string propertyName, string defaultValue = "")
          • getCustomVec2(string propertyName, vec2 defaultValue)
          • getCustomVec2(string propertyName)
          • getCustomBool(string propertyName, bool defaultValue = false)
          • getCustomColor(string propertyName, color defaultValue)
          • getCustomColor(string propertyName)
          • setCustomInt(string propertyName, int)
          • setCustomFloat(string propertyName, float)
          • setCustomString(string propertyName, string)
          • setCustomVec2(string propertyName, vec2)
          • setCustomBool(string propertyName, bool)
          • setCustomColor(string propertyName, color)
          • clearCustomProperty(string propertyName)
      • fixture
        • shape
          • valid
          • type
          • setType(int)
          • setRadius(float)
        • valid
        • id
        • select()
        • deselect()
        • isSelected()
        • getName()
        • setName(string)
        • setFriction(float)
        • setRestitution(float)
        • setDensity(float)
        • setSensor(int)
        • setFilterCategoryBits(int)
        • setFilterMaskBits(int)
        • setFilterGroupIndex(int)
        • setMass(float)
        • getVertex(int)
        • getBody()
        • setVertex(int index, float x, float y)
        • setVertex(int index, vec2 position)
        • addVertex(int index, float x, float y)
        • addVertex(int index, vec2 position)
        • deleteVertex(int)
        • getNumVertices()
        • getVertices()
        • delete()
        • reverseWinding()
        • getShapes()
        • getShape(int)
        • getFriction()
        • getRestitution()
        • getDensity()
        • isSensor()
        • getFilterCategoryBits()
        • getFilterMaskBits()
        • getFilterGroupIndex()
        • Custom property functions
          • getCustomProperties()
          • hasCustomProperty(string propertyName)
          • getCustomPropertyType(string propertyName)
          • getCustomInt(string propertyName, int defaultValue = 0)
          • getCustomFloat(string propertyName, float defaultValue = 0)
          • getCustomString(string propertyName, string defaultValue = "")
          • getCustomVec2(string propertyName, vec2 defaultValue)
          • getCustomVec2(string propertyName)
          • getCustomBool(string propertyName, bool defaultValue = false)
          • getCustomColor(string propertyName, color defaultValue)
          • getCustomColor(string propertyName)
          • setCustomInt(string propertyName, int)
          • setCustomFloat(string propertyName, float)
          • setCustomString(string propertyName, string)
          • setCustomVec2(string propertyName, vec2)
          • setCustomBool(string propertyName, bool)
          • setCustomColor(string propertyName, color)
          • clearCustomProperty(string propertyName)
      • vertex
        • valid
        • index
        • pos
        • wpos
        • x
        • y
        • wx
        • wy
        • select()
        • deselect()
        • isSelected()
        • setPos(float x, float y)
        • setPos(vec2)
        • setWorldPos(float x, float y)
        • setWorldPos(vec2)
        • getFixture()
        • delete()
        • next()
        • prev()
      • joint
        • valid
        • id
        • select()
        • deselect()
        • isSelected()
        • getName()
        • setName(string)
        • setBodyA(int bodyId)
        • setBodyB(int bodyId)
        • setBodyA(body)
        • setBodyB(body)
        • getBodyA()
        • getBodyB()
        • setLocalAnchorA(float x, float y)
        • setLocalAnchorB(float x, float y)
        • setLocalAnchorA(vec2)
        • setLocalAnchorB(vec2)
        • setCollideConnected(int)
        • setEnableLimit(int)
        • setEnableMotor(int)
        • setReferenceAngle(float)
        • setLowerLimit(float)
        • setUpperLimit(float)
        • setMotorSpeed(float)
        • setMaxMotorTorque(float)
        • setMaxMotorForce(float)
        • setLength(float)
        • setFrequency(float)
        • setDampingRatio(float)
        • setLocalAxis(float x, float y)
        • setLocalAxis(vec2)
        • delete()
        • getLength()
        • getWorldAnchorA()
        • getWorldAnchorB()
        • Custom property functions
          • getCustomProperties()
          • hasCustomProperty(string propertyName)
          • getCustomPropertyType(string propertyName)
          • getCustomInt(string propertyName, int defaultValue = 0)
          • getCustomFloat(string propertyName, float defaultValue = 0)
          • getCustomString(string propertyName, string defaultValue = "")
          • getCustomVec2(string propertyName, vec2 defaultValue)
          • getCustomVec2(string propertyName)
          • getCustomBool(string propertyName, bool defaultValue = false)
          • getCustomColor(string propertyName, color defaultValue)
          • getCustomColor(string propertyName)
          • setCustomInt(string propertyName, int)
          • setCustomFloat(string propertyName, float)
          • setCustomString(string propertyName, string)
          • setCustomVec2(string propertyName, vec2)
          • setCustomBool(string propertyName, bool)
          • setCustomColor(string propertyName, color)
          • clearCustomProperty(string propertyName)
      • image
        • valid
        • center
        • id
        • select()
        • deselect()
        • isSelected()
        • getName()
        • setName(string)
        • getBody()
        • setBody(int bodyId)
        • setBody(body)
        • getFile()
        • setFile(string)
        • setCenter(float, float)
        • setCenter(vec2)
        • setAngle(float)
        • setHeight(float)
        • setScale(float)
        • setAspectScale(float)
        • setOpacity(float)
        • setFlip(int)
        • setFilter(int)
        • setRenderOrder(float)
        • setColorTint(int red, int green, int blue, int alpha)
        • setColorTint(color)
        • getCenter()
        • getAngle()
        • getScale()
        • getAspectScale()
        • getOpacity()
        • getFlip()
        • getFilter()
        • getRenderOrder()
        • getPixelWidth()
        • getPixelHeight()
        • getColorTint()
        • delete()
        • Custom property functions
          • getCustomProperties()
          • hasCustomProperty(string propertyName)
          • getCustomPropertyType(string propertyName)
          • getCustomInt(string propertyName, int defaultValue = 0)
          • getCustomFloat(string propertyName, float defaultValue = 0)
          • getCustomString(string propertyName, string defaultValue = "")
          • getCustomVec2(string propertyName, vec2 defaultValue)
          • getCustomVec2(string propertyName)
          • getCustomBool(string propertyName, bool defaultValue = false)
          • getCustomColor(string propertyName, color defaultValue)
          • getCustomColor(string propertyName)
          • setCustomInt(string propertyName, int)
          • setCustomFloat(string propertyName, float)
          • setCustomString(string propertyName, string)
          • setCustomVec2(string propertyName, vec2)
          • setCustomBool(string propertyName, bool)
          • setCustomColor(string propertyName, color)
          • clearCustomProperty(string propertyName)
      • world
        • Custom property functions
          • getCustomProperties()
          • hasCustomProperty(string propertyName)
          • getCustomPropertyType(string propertyName)
          • getCustomInt(string propertyName, int defaultValue = 0)
          • getCustomFloat(string propertyName, float defaultValue = 0)
          • getCustomString(string propertyName, string defaultValue = "")
          • getCustomVec2(string propertyName, vec2 defaultValue)
          • getCustomVec2(string propertyName)
          • getCustomBool(string propertyName, bool defaultValue = false)
          • getCustomColor(string propertyName, color defaultValue)
          • getCustomColor(string propertyName)
          • setCustomInt(string propertyName, int)
          • setCustomFloat(string propertyName, float)
          • setCustomString(string propertyName, string)
          • setCustomVec2(string propertyName, vec2)
          • setCustomBool(string propertyName, bool)
          • setCustomColor(string propertyName, color)
          • clearCustomProperty(string propertyName)
  • Command line interface
  • Video tutorials
  • Miscellaneous
    • System hooks
    • Checking for updates
    • Sending feedback
    • User settings save locations
  • Known issues