RevoluteJoint:setMotorEnabled

RevoluteJoint:setMotorEnabled Available since LÖVE 0.9.0 It has been renamed from RevoluteJoint:enableMotor. Enables/disables the joint motor. Function Synopsis RevoluteJoint:setMotorEnabled( enable ) Arguments boolean enable True to enable, false to disable. Returns Nothing. See Also RevoluteJoint

RevoluteJoint:setMotorSpeed

RevoluteJoint:setMotorSpeed Sets the motor speed. Function Synopsis RevoluteJoint:setMotorSpeed( s ) Arguments number s The motor speed, radians per second. Returns Nothing. See Also RevoluteJoint

RopeJoint:getMaxLength

RopeJoint:getMaxLength Available since LÖVE 0.8.0 This function is not supported in earlier versions. Gets the maximum length of a RopeJoint. Function Synopsis maxLength = RopeJoint:getLength( ) Arguments None. Returns number maxLength The maximum length of the RopeJoint. See Also RopeJoint

Shader Variables

Shader Variables Available since LÖVE 0.9.0 These built-in shader variables are not supported in earlier versions. There are several built-in variables LÖVE provides in vertex and pixel shaders. All built-in variables are read-only unless otherwise specified. Global built-in variables mat4 TransformMatrix The transformation matrix affected by love.graphics.translate and friends. mat4 ProjectionMatrix The orthographic projection matrix. mat4 TransformProjectionMatrix The combined tra

Shader:getExternVariable

Shader:getExternVariable Available since LÖVE 0.9.2 This function is not supported in earlier versions. Gets information about an 'extern' ('uniform') variable in the shader. Returns nil if the variable name doesn't exist in the shader, or if the video driver's shader compiler has determined that the variable doesn't affect the final output of the shader. Function Synopsis type, components, arrayelements = Shader:getExternVariable( name ) Arguments string name The name of the extern vari

Shader:getWarnings

Shader:getWarnings Available since LÖVE 0.9.0 It has been renamed from PixelEffect:getWarnings. Returns any warning and error messages from compiling the shader code. This can be used for debugging your shaders if there's anything the graphics hardware doesn't like. Function Synopsis warnings = Shader:getWarnings( ) Arguments None. Returns string warnings Warning and error messages (if any). See Also Shader

Shader:send

Shader:send Available since LÖVE 0.9.0 It has been renamed from PixelEffect:send. Sends one or more values to a special (uniform) variable inside the shader. Uniform variables have to be marked using the uniform or extern keyword, e.g. uniform float time; // "float" is the typical number type used in GLSL shaders. uniform float vars[2]; uniform vec2 light_pos; uniform vec4 colors[4]; The corresponding send calls would be shader:send("time", t) shader:send("vars",a,b) shader:send("light_p

Shader:sendColor

Shader:sendColor Available since LÖVE 0.10.0 This function is not supported in earlier versions. Sends one or more colors to a special (extern / uniform) vec3 or vec4 variable inside the shader. The color components must be in the range of [0, 255], unlike Shader:send. The colors are gamma-corrected if global gamma-correction is enabled. Extern variables must be marked using the extern keyword, e.g. extern vec4 Color; The corresponding sendColor call would be shader:sendColor("Color", {r

Shape:computeAABB

Shape:computeAABB Available since LÖVE 0.8.0 This function is not supported in earlier versions. Returns the points of the bounding box for the transformed shape. Function Synopsis topLeftX, topLeftY, bottomRightX, bottomRightY = Shape:computeAABB( tx, ty, tr, childIndex ) Arguments number tx The translation of the shape on the x-axis. number ty The translation of the shape on the y-axis. number tr The shape rotation. number childIndex (1) The index of the child to compute the bounding

Shape:computeMass

Shape:computeMass Available since LÖVE 0.8.0 This function is not supported in earlier versions. Computes the mass properties for the shape with the specified density. Function Synopsis x, y, mass, inertia = Shape:computeMass( density ) Arguments number density The shape density. Returns number x The x postition of the center of mass. number y The y postition of the center of mass. number mass The mass of the shape. number inertia The rotational inertia. See Also Shape