Skip to content

Commit

Permalink
Update reference.md
Browse files Browse the repository at this point in the history
add more stuff
  • Loading branch information
KilledByAPixel authored Aug 1, 2024
1 parent 7cd053e commit f9c8123
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,17 @@ isFullscreen()

// Tile Info Object
TileInfo(pos=(0,0), size, textureIndex=0) // Create a tile info object
TileInfo.pos // Top left corner of tile in pixels
TileInfo.size // Size of tile in pixels
TileInfo.textureIndex // Texture index to use
TileInfo.offset(offset) // Offset this tile by a certain amount in pixels
TileInfo.getTextureInfo() // Returns texture info for this tile

// Texture Info Object
TextureInfo(image) // Created automatically for each image
TextureInfo.image // Image source
TextureInfo.size // Size of the image
TextureInfo.glTexture // WebGL texture

// Font Image Object draws text using characters in an image
FontImage(image, tileSize=(8,8), paddingSize=(0,1)) // Create an image font
Expand Down Expand Up @@ -284,6 +295,25 @@ EngineObject.addChild(child, localPos, localAngle) // Attach a child
EngineObject.removeChild(child) // Remove a child
EngineObject.setCollision(solids, isSolid, tiles) // Set collision

// Engine Object Members
EngineObject.pos // World space position
EngineObject.size // World space width and height
EngineObject.drawSize // Size of object used for drawing if set
EngineObject.tileInfo // Tile info to render object
EngineObject.angle // Rotation angle for rendering
EngineObject.color // Color to apply when rendered
EngineObject.additiveColor // Additive color to apply when rendered
EngineObject.mirror // Should it flip along y axis when rendered
EngineObject.mass // Weight of object, static if 0
EngineObject.damping // How much to slow velocity each frame (0-1)
EngineObject.angleDamping // How much to slow rotation each frame (0-1)
EngineObject.elasticity // How bouncy is it when colliding (0-1)
EngineObject.friction // How much friction when sliding (0-1)
EngineObject.gravityScale // How much to scale gravity by
EngineObject.renderOrder // Objects are sorted by render order
EngineObject.velocity // Velocity of the object
EngineObject.angleVelocity // Angular velocity of the object

// Object settings
enablePhysicsSolver = true // Enable collisions between objects?
objectDefaultMass = 1 // Default object mass for collisions
Expand Down

0 comments on commit f9c8123

Please sign in to comment.