# Static Functions

Namespaces that group related functions and constants.

This section contains **59 namespaces**.

| Page | Description |
| --- | --- |
| [`Global`](Global.md) | Globals |
| [`sm`](sm.md) | The <strong>sm</strong> namespace contain all API features related to Scrap Mechanic. |
| [`sm.ai`](sm.ai.md) | AI utility functions. |
| [`sm.areaTrigger`](sm.areaTrigger.md) | An <strong>area trigger</strong> is an invisible collider in the world that can trigger events when objects move in or out of it. This allows the script to, for instance, detect when a character enters a door, or count the number of shapes there are in a room. |
| [`sm.audio`](sm.audio.md) | The <strong>audio</strong> manager is used to play sound effects in the game. |
| [`sm.body`](sm.body.md) | A <strong>body</strong> is a collection of [shapes](../Userdata/Shape.md) that are built together. Bodies can be connected to other bodies using [joints](../Userdata/Joint.md) such as the bearing. |
| [`sm.builderGuide`](sm.builderGuide.md) | Builder Guide |
| [`sm.camera`](sm.camera.md) | The <strong>camera</strong> library contains methods related to the [localPlayer](sm.localPlayer.md)'s camera view. |
| [`sm.cell`](sm.cell.md) | The <strong>cell</strong> api exposes and expands on parts of the world loading process. |
| [`sm.challenge`](sm.challenge.md) | The <strong>Challenge</strong> api contains functions related to the Challenge game mode. |
| [`sm.character`](sm.character.md) | A <strong>character</strong> is the physical body of a living entity in the world. Both <strong>players</strong> and <strong>units</strong> may control a character. |
| [`sm.clientScriptableObject`](sm.clientScriptableObject.md) | ScriptableObject creation |
| [`sm.color`](sm.color.md) | A <strong>color</strong> is represented using a red, green, blue and alpha component. Colors are prominently used for blocks and parts that are colored by the <em>Paint Tool</em>. |
| [`sm.construction`](sm.construction.md) | The <strong>Construction</strong> api is used for interacting with the shape construction system. |
| [`sm.container`](sm.container.md) | Functions and constants provided by `sm.container`. |
| [`sm.creation`](sm.creation.md) | A <strong>Creation</strong> represent a collection of [Bodies](../Userdata/Body.md) linked together by [Joints](../Userdata/Joint.md). |
| [`sm.cullSphereGroup`](sm.cullSphereGroup.md) | A <strong>cull sphere group</strong> is a collection of spheres that can be efficiently queried for. |
| [`sm.debris`](sm.debris.md) | <strong>Debris</strong> are visual objects that have no impact on any other object. |
| [`sm.debugDraw`](sm.debugDraw.md) | The <strong>Debug Draw</strong> api can be used for drawing geometric primitives for debug purposes. |
| [`sm.debugGui`](sm.debugGui.md) | No description or API members are present in the published source. |
| [`sm.effect`](sm.effect.md) | The <strong>effect</strong> api handles the creation and playing of audio and visual effects. |
| [`sm.event`](sm.event.md) | Events for communicating between scripts by running callbacks. |
| [`sm.game`](sm.game.md) | Used to check the state of the game. |
| [`sm.garage`](sm.garage.md) | The <strong>Garage</strong> library contains various utility functions for handling the garage. |
| [`sm.gui`](sm.gui.md) | The <strong>gui</strong> library contains various utility functions for handling user interfaces. |
| [`sm.gui.widget`](sm.gui.widget.md) | Removed! Don't use. |
| [`sm.harvestable`](sm.harvestable.md) | Harvestable creation |
| [`sm.interactable`](sm.interactable.md) | Functions and constants provided by `sm.interactable`. |
| [`sm.item`](sm.item.md) | Allows checking for static infortmation about items. |
| [`sm.joint`](sm.joint.md) | A <strong>joint</strong> is a part that can be built by a player that is used to connect [bodies](../Userdata/Body.md). There are multiple scriptable joint types: |
| [`sm.json`](sm.json.md) | Parses and writes json files from and to lua values. |
| [`sm.jsonGui`](sm.jsonGui.md) | Functions and constants provided by `sm.jsonGui`. |
| [`sm.lift`](sm.lift.md) | Functions and constants provided by `sm.lift`. |
| [`sm.localPlayer`](sm.localPlayer.md) | <strong>Local player</strong> represents the current character being controlled on the client's computer. This library can only be used on the client. |
| [`sm.log`](sm.log.md) | Used for logging information from scripts to the game log. |
| [`sm.melee`](sm.melee.md) | Information about melee attacks are located in `/Data/Melee/attacks.json`. |
| [`sm.menuCreation`](sm.menuCreation.md) | Used to save and load blueprints displayed in the menu. |
| [`sm.message`](sm.message.md) | Functions and constants provided by `sm.message`. |
| [`sm.noise`](sm.noise.md) | Contains methods related to random number and noise generation. |
| [`sm.particle`](sm.particle.md) | The <strong>particle</strong> api allows you to create particle effects at a position. |
| [`sm.pathfinder`](sm.pathfinder.md) | Pathfinder |
| [`sm.pathNode`](sm.pathNode.md) | Path node creation |
| [`sm.physics`](sm.physics.md) | Contains functions regarding the physics engine. |
| [`sm.pipeGraph`](sm.pipeGraph.md) | Pipe utility functions. |
| [`sm.player`](sm.player.md) | A <strong>player</strong> is a user playing the game. Every player controls a [Character](../Userdata/Character.md) in the world. |
| [`sm.portal`](sm.portal.md) | A <strong>portal</strong> moves objects inside a box to another box in another place. |
| [`sm.projectile`](sm.projectile.md) | Information about projectiles are located in `/Data/Projectiles/ProjectileSets/projectiles.json`. |
| [`sm.quat`](sm.quat.md) | A <strong>quaternion</strong> is used to represent rotation as a <a target="_blank" href="https://en.wikipedia.org/wiki/Quaternion">generalization of complex numbers</a>. |
| [`sm.render`](sm.render.md) | Render settings |
| [`sm.scriptableObject`](sm.scriptableObject.md) | ScriptableObject creation |
| [`sm.shape`](sm.shape.md) | A <strong>shape</strong> is any block, part or basic material that can be built by a player. Shapes are always connected to a [Body](../Userdata/Body.md), which is a collection of shapes. |
| [`sm.storage`](sm.storage.md) | <strong>Storage</strong> is used for saving and loading any Lua data into the world's database. This allows for data to be retrieved after closing and reloading the world. |
| [`sm.tool`](sm.tool.md) | A <strong>tool</strong> is a scripted tool a player holds in their hand. The tool object is focused on handling animations for first and third person view. |
| [`sm.unit`](sm.unit.md) | Unit creation and management |
| [`sm.util`](sm.util.md) | Offers various math-related functions. |
| [`sm.uuid`](sm.uuid.md) | A universally unique identifier (<strong>UUID</strong>) is a 128-bit number that can guarantee uniqueness across space and time. |
| [`sm.vec3`](sm.vec3.md) | A <strong>vector</strong> is used to represent position and direction in 3D space, using X, Y and Z coordinates. |
| [`sm.visualization`](sm.visualization.md) | <strong>Visualization</strong> is used for visualizing game objects. |
| [`sm.world`](sm.world.md) | The <strong>world</strong> api handles the creation and destruction of worlds. |
