Lua Virtual Reality Framework
MIT License
Bot releases are visible (Hide)
lovr.filesystem
on POSIX (fixes ADB on Android 12+).Pass:sphere
to error when segment count is too small.Buffer:setData
to error when copying within a single Buffer with overlapping byte ranges.Pass:skybox
to render cubemaps with the correct X/Z orientation.lovr.graphics.newModel
to support empty GLB models.lovr.graphics.newModel
to support models without any vertices.TangentMatrix
builtin.lovr.quit
to not get called twice when canceling quit.transfer
usage.Model:getMesh
.Published by bjornbytes about 1 year ago
enet
plugin.http
plugin.utf8
module.:type
method to all objects and vectors.--graphics-debug
command line option, which sets t.graphics.debug
to true.lovr.audio.getDevice
.Image:mapPixel
.Blob:getString
that takes a byte range.Blob:getI8/getU8/getI16/getU16/getI32/getU32/getF32/getF64
.lovr.filesystem.load
to restrict chunks to text/binary.Pass:roundrect
.Pass:cone
that takes two vec3
endpoints.Pass:draw
that takes a Texture
.Pass:setViewCull
to enable frustum culling.Model:getBlendShapeWeight
, and Model:setBlendShapeWeight
.Model(Data):getBlendShapeCount
, Model(Data):getBlendShapeName
.Shader:getBufferFormat
.Mesh
object (sorry!).Model:clone
.materials
flag to lovr.graphics.newModel
.lovr.graphics.isInitialized
(mostly internal).depthResolve
feature to lovr.graphics.getFeatures
.Texture:newView
that creates a 2D slice of a layer/mipmap of a texture.Pass:send
that takes tables for uniform buffers.Buffer:getData
and Buffer:newReadback
.Texture:getPixels/setPixels/clear/newReadback/generateMipmaps
.t.graphics.debug
is set.lovr.graphics.is/setTimingEnabled
to record GPU durations for each Pass object.lovr.graphics.newPass
.Pass:setCanvas
and Pass:setClear
.Pass:getStats
.Pass:reset
.Pass:getScissor
and Pass:getViewport
.Pass:barrier
.Pass:beginTally/finishTally
and Pass:get/setTallyBuffer
.#include
in shader code.lovr.headset.getPassthrough/setPassthrough/getPassthroughModes
.hand/*/pinch
, hand/*/poke
, and hand/*/grip
Devices.lovr.headset
when lovr.graphics
is disabled, on supported runtimes.elbow/left
and elbow/right
poses on Ultraleap hand tracking.lovr.headset.getDirection
.lovr.headset.isVisible
and lovr.visible
callback.lovr.recenter
callback.floor
Device.t.headset.seated
and lovr.headset.isSeated
.lovr.headset.stopVibration
.radius
fields to joint tables returned by lovr.headset.getSkeleton
.Vec2
, Vec3
, Vec4
, Quat
, Mat4
).Vec3:transform
, Vec4:transform
, and Vec3:rotate
.vec3.up
, vec2.one
, quat.identity
, etc.).Mat4:getTranslation/getRotation/getScale/getPose
.Vec3:set
that takes a Quat
.Mat4:reflect
.TerrainShape
.World:queryBox
and World:querySphere
.World:getTags
.Shape:get/setPose
.lovr.physics.newMeshShape
function.Collider:isDestroyed
.lovr.system.wasKeyPressed/wasKeyReleased
.lovr.system.getMouseX
, lovr.system.getMouseY
, and lovr.system.getMousePosition
.lovr.system.isMouseDown
.lovr.mousepressed
, lovr.mousereleased
, lovr.mousemoved
, and lovr.wheelmoved
callbacks.lovr.system.has/setKeyRepeat
.Channel:push
and Channel:pop
.lovr.graphics.submit
to no longer invalidate Pass objects.Pass:setBlendMode
/Pass:setColorWrite
to take an optional attachment index.lovr.graphics.newModel
to work when the asset references paths starting with ./
.lovr.graphics.newModel
to error when the asset references paths starting with /
.lovr.graphics.newBuffer
to take format first instead of length/data.Pass:setStencilWrite
to only set the "stencil pass" action when given a single action, instead of all 3.lovr.graphics
to show a message box on Windows when Vulkan isn't supported.JNI_OnLoad
on Android so plugins can use JNI.t.headset.overlay
to also support numeric values to control overlay sort order.World:isCollisionEnabledBetween
to take nil
s, which act as wildcard tags.Mat4:__tostring
to print matrix components.World:raycast
to prevent subsequent checks when the callback returns false
.lovr.system.isKeyDown
to take multiple keys.lovr.headset.isDown/isTouched
to return nil instead of nothing.lovr.headset.getTime
to always start at 0 to avoid precision issues.lovr.headset.getDriver
to also return the OpenXR runtime name.pitchable
flag in lovr.audio.newSource
to default to true.Buffer:setData
, Buffer:clear
, and Buffer:getPointer
to work on permanent Buffers.lovr.timer.sleep
to have higher precision on Windows.lovr.headset.animate
to no longer require a Device
argument (current variant is deprecated).lovr.physics.newBoxShape
always creating a cube.MeshShape
not working properly with some OBJ models.Model:getNodeScale
to properly return the scale instead of the rotation.Mat4:set
and Mat4
constructors to properly use TRS order when scale is given.lovr.graphics.newShader
to work with nil
shader code (uses unlit
shader).t.graphics.debug
is set but the validation layers aren't installed.Pass:setProjection
to use an infinite far plane by default.Texture:hasUsage
.Pass:points
/ Pass:line
to work with temporary vectors.lovr.event.quit
to properly exit on Android/Quest.lovr.filesystem.getDirectoryItems
.lovr.graphics.newShader
to error properly if the push constants block is too big.lovr.log
to not print second string.gsub
result.lovr.data.newImage
wouldn't initialize empty Image
object pixels to zero.Model:getMaterial
to work when given a string.Vec3:angle
would sometimes return NaNs.normalMap
shader flag was set).DistanceJoint:getAnchors
.Material:getProperties
returned an incorrect uvScale.lovr.graphics.newMaterial
.Pass:capsule
didn't render anything when its length was zero.t.window = nil
wasn't working as intended.lovr.graphics.getPass
(lovr.graphics.newPass
should be used instead).Pass:getType
. All Pass objects support both compute and rendering (computes run before draws).Pass:getTarget
(renamed to Pass:getCanvas
).Pass:getSampleCount
(Pass:getCanvas
returns a samples
key).lovr.graphics.getBuffer
(Use lovr.graphics.newBuffer
or tables).lovr.graphics.newBuffer
that takes length/data as the first argument (put format first).lovr.headset.get/setDisplayFrequency
(it's named lovr.headset.get/setRefreshRate
now).lovr.headset.getDisplayFrequencies
(it's named lovr.headset.getRefreshRates
now).lovr.headset.getOriginType
(use lovr.headset.isSeated
).lovr.headset.animate
that takes a Device
argument (just pass the Model
now).Buffer:getPointer
(renamed to Buffer:mapData
).transfer
passes (methods on Buffer
and Texture
objects can be used instead).Pass:copy
(use Buffer:setData
and Texture:setPixels
).Pass:read
(use Buffer:newReadback
and Texture:newReadback
).Pass:clear
(use Buffer:clear
and Texture:clear
).Pass:blit
(use Texture:setPixels
).Pass:mipmap
(use Texture:generateMipmaps
).Tally
(use lovr.graphics.setTimingEnabled
or Pass:beginTally/finishTally
).lovr.event.pump
(it's named lovr.system.pollEvents
now).t.headset.offset
(use t.headset.seated
).mipmaps
flag from render passes (they always regenerate mipmaps now).Published by bjornbytes about 2 years ago
Add:
segments
option to planes.Pass
objects for recording rendering work.Buffer
objects.Buffer:getPointer
for accessing FFI pointers to GPU memory.r8
, rg8
, r16
, rg16
, rgba16
, and rgb565
image and texture formats.d32fs8
texture format.KHR_texture_transform
glTF extension.Sampler
objects.Tally
objects for GPU queries.Readback
objects for asynchronous GPU readbacks.t.graphics.shadercache
option to cache compiled shaders to disk.lovr.graphics.compileShader
and the ability to load shaders from SPIR-V.normal
default shader.Font:getKerning
.Font:getLines
.Font:getVertices
.Pass:blit
, Pass:clear
, Pass:copy
, Pass:mipmap
, and Pass:read
for raw GPU transfers.lovr.graphics.isFormatSupported
and lovr.graphics.getDevice
.eye/gaze
Device.t.headset.submitdepth
flag to submit depth buffers to the OpenXR runtime.t.headset.overlay
conf.lua flag to run as an OpenXR overlay.keyboard
device pose on Oculus Quest.thumbrest
DeviceButton.a
, b
, x
, and y
DeviceButtons.hand/left/point
and hand/right/point
Devices.lovr.headset.newModel
.lovr.headset.getDisplayFrequency
.lovr.headset.setDisplayFrequency
and lovr.headset.getDisplayFrequencies
.lovr.headset.isFocused
.lovr.headset.getDeltaTime
.vec2
s as scale arguments.ModelData
(it didn't have any before, now it has lots).Model
and ModelData
.Model:getMetadata
to return raw JSON from glTF models.Rasterizer:getWidth
, Rasterizer:getDimensions
, and Rasterizer:getBoundingBox
.Rasterizer:getKerning
and Rasterizer:getBearing
.Rasterizer:getCurves
.Rasterizer:newImage
.Vec2:angle
, Vec3:angle
, and Vec4:angle
.Vec2:equals
, Vec3:equals
, Vec4:equals
, Quat:equals
, and Mat4:equals
.Sound:getCapacity
and Sound:getByteStride
.Source:get/setPitch
.Source:isSpatial
and spatial
flag to lovr.audio.newSource
.audiocapture
Permission with lovr.system.requestPermission
.World:getContacts
.World:get/setStepCount
.lovr.system.isKeyDown
.Change:
lovr.headset.getSkeleton
to also return joint radii.setColor
to accept a second alpha parameter when using a hexcode.Source:setEffectEnabled
to error when called on a Source that has effects disabled.lovr.headset.isDown
to return nil
instead of false
when a button is not supported by a Device.dt
parameter to use predicted headset display time delta instead of wallclock delta time, when available.lovr.math.noise
to use simplex noise instead of Perlin noise.lovr.filesystem.write
and lovr.filesystem.append
to return success instead of byte count.lovr.system
instead of lovr.graphics
.Font:get/setLineHeight
to Font:get/setLineSpacing
.lovr.graphics.stencil
to be split into separate "stencil test" and "stencil write" states.Fix:
lovr.audio.setGeometry
or lovr.physics.newMeshCollider
with zero vertices/indices.require
not finding plugins packaged as "all in one" Lua libraries.Object:release
rapidly.require
d in threads.lovr.math.gammaToLinear
and lovr.math.linearToGamma
when used with a table.lovr.filesystem.getDirectoryItems
when table.sort
is unavailable.Mat4 * Vec3
.World:raycast
and MeshShape
s.lovr.draw
when using OpenXR.conf.lua
wouldn't get read properly on Android.Thread:start
.Font:setFlipEnabled
.Remove:
rgb
and rgba4
texture formats.Mesh
and ShaderBlock
(they are replaced by Buffer
).Canvas
(textures can be rendered to directly with render passes).Font:setFlipEnabled
(font flips automatically when needed).openvr
, oculus
, vrapi
, webxr
, and pico
headset drivers.beacon
Devices.lovr.headset.getDisplayMask
.effects = false
flag from lovr.audio.newSource
(use spatial
flag).Published by bjornbytes over 3 years ago
Add:
Device
s for elbows, shoulders, chest, waist, knees, feet, camera, and keyboardlovr.system
modulelovr.permission
callbackrequire
ing libraries inside APKslovr.graphics.cylinder
Mat4:target
t.audio.spatializer
to support switching audio spatializersSampleFormat
for creating floating point Soundst.audio.start
to control whether audio devices are automatically startedlovr.audio.getDevices
, lovr.audio.setDevice
, lovr.audio.start
, lovr.audio.stop
, and lovr.audio.isStarted
lovr.audio.setGeometry
and AudioMaterial
lovr.audio.get/setAbsorption
Effect
, Source:isEffectEnabled
, and Source:setEffectEnabled
Source:get/setRadius
Source:get/setDirectivity
Source:clone
VolumeUnit
parameter to lovr.audio.get/setVolume
and Source:get/setVolume
lovr.headset.getVelocity
to the WebXR driverChange:
SoundData
to be named Sound
TextureData
to be named Image
Image:encode
to return a Blob
instead of writing to a file.01
to 0
lovr.mirror
to correctly render transparent headset texturesMat4:lookAt
to compute a "look at" view matrix (use Mat4:target
for the old behavior)lovr.filesystem.write
and lovr.filesystem.append
to accept Blobslovr.headset
to submit empty frames when lovr.draw
is missing (instead of not submitting anything)ShaderBlock:send
to accept a byte range when sending a Bloblovr.graphics.newFont
to accept custom glyph padding and SDF range valueslovr.audio.isSpatialized
to lovr.audio.getSpatializer
Source:setCone
to Source:setDirectivity
samples
value of TimeUnit
to be named frames
.Fix:
lovr.math.newCurve
variant that takes a single number for the point countMat4:unpack
would sometimes return nan
anglest.math.globals
was false
vrapi
driver when requesting pose for devices other than head/handslovr.filesystem.append
on unixlovr.headset.getDisplayDimensions
to return dimensions for a single eye on the desktop driverlovr.restart
and arg.restart
on WebAssemblylovr.graphics.getBlendMode
when blending is disabledShape
when it isn't attached to a ColliderRemove:
lua_modules
and deps
from the default require paths--root
command line argumentlovr.graphics.triangle
enet
(use the lovr-enet
plugin)cjson
(use the lovr-cjson
plugin)AudioStream
(use stream
Sounds instead)Source:getType
and SourceType
(use decode
option of newSource/Sound)Source:getBitDepth
, Source:getChannelCount
, and Source:getSampleRate
lovr.audio.getMicrophoneNames
, lovr.audio.newMicrophone
, and Microphone
lovr.audio.update
lovr.audio.pause
lovr.audio.get/setVelocity
, Source:get/setVelocity
, and lovr.audio.get/setDopplerEffect
Source:get/setFalloff
Source:get/setPitch
Source:get/setVolumeLimits
Source:is/setRelative
Published by bjornbytes about 4 years ago
Add:
lovr.headset.getSkeleton
.lovr.headset.animate
and animated
flag to lovr.headset.newModel
.lovr.headset.wasPressed
and lovr.headset.wasReleased
.lovr.headset.getViewCount
, lovr.headset.getViewPose
, lovr.headset.getViewAngles
.beacon/1
, beacon/2
, beacon/3
, and beacon/4
Devices.lovr.headset.getDisplayFrequency
.lovr.headset.getTime
.lovr.keypressed
, lovr.keyreleased
, and lovr.textinput
callbacks.lovr.event.restart
, lovr.restart
callback, and arg.restart
for persisting data between restarts.lovr.resize
callback.lovr.log
callback.World:getColliders
.World:newMeshCollider
.Joint:setEnabled
and Joint:isEnabled
.Shape:setSensor
and Shape:isSensor
.World:get/setResponseTime
, BallJoint:get/setResponseTime
, and DistanceJoint:get/setResponseTime
.World:get/setTightness
, BallJoint:get/setTightness
, DistanceJoint:get/setTightness
.lovr.graphics.getViewPose
and lovr.graphics.setViewPose
.lovr.graphics.getProjection
.t.graphics.debug
config flag.compute
limit to lovr.graphics.getLimits
.renderpasses
, buffers
, textures
, buffermemory
, and texturememory
graphics stats.lovr.graphics.setColorMask
and lovr.graphics.getColorMask
.AudioStream:append
for procedural audio generation.SoundData:getBlob
and TextureData:getBlob
.Texture:getCompareMode
and Texture:setCompareMode
.sampler2DMultiview
and textureMultiview
helpers to shaders.highp
ShaderFlag.Shader:hasBlock
.Model:hasJoints
.:release
to all objects to immediately destroy them from Lua.Change:
lovr.focus
events when window focus changes.0.1
and 100.0
on all backends.Thread:start
to accept arguments to pass to the Thread's function.Channel:peek
to return a second value indicating if a message was present.Microphone:getData
to take new count/destination/offset arguments.Mesh:setVertices
to accept a Blob
with vertex data.lovr.graphics.setProjection
to take a view index.Curve:render
to always return 2 points if the Curve is a line.Curve:render
to be faster.lovr.data.newTextureData
to allow filling in initial contents with a Blob.lovr.data.newTextureData
to accept a TextureData to clone.lovr.filesystem.getDirectoryItems
to omit .
and ..
.lovr.filesystem.getDirectoryItems
to return sorted filenames.Shader:send
to return a boolean instead of erroring on failure.ShaderBlock:getShaderCode
to accept an optional namespace for accessing the block.Vec3:set
to accept a Mat4
.Fix:
Channel:push
errored when a userdata was its only argument.nil
to lovr.thread.newThread
.lovr.data.newBlob(blob)
to properly copy data to the new Blob.lovr.headset.getHands
returned an empty table on Linux.lovr.graphics.getFeatures().compute
returning false
on Android.lovr.graphics.points
/ lovr.graphics.line
.Blob
in ShaderBlock:send
.Thread:wait
on Windows.Remove:
webvr
headset driver (use webxr
instead).leap
headset driver (use the Ultraleap OpenXR API Layer instead).oculusmobile
headset driver (use vrapi
instead).SoundData:getPointer
and TextureData:getPointer
(use :getBlob
).Source:resume
and lovr.audio.resume
(use Source:play
).Source:rewind
and lovr.audio.rewind
(use Source:seek(0)
).Source:isPaused
and Source:isStopped
(use :isPlaying
).lovr.event.quit('restart')
variant.t.hotkeys
config (use lovr.keypressed
and lovr.keyreleased
).lovr.filesystem.getApplicationId
(use lovr.filesystem.getIdentity
).anisotropic
FilterMode
(anisotropy can be used with any filter mode).Published by bjornbytes about 5 years ago
Add:
standard
PBR shader.strength
and frequency
parameters to lovr.headset.vibrate
.lovr.headset.getDisplayMask
.lovr.headset.isTracked
.vec2
and vec4
objects.TextureData:paste
for copying between TextureData objects.TextureData:getFormat
.t.hotkeys
conf flag.flags
argument to lovr.graphics.newShader
for configuring shaders without writing GLSL.DefaultShader
enum for creating instances of built-in shaders.animated
shader flag to automatically make shaders animated.lovr.graphics.tick
and lovr.graphics.tock
for accurate GPU profiling.getPose
and setPose
functions to lovr.audio
, Source
, and Collider
.Model:pose
and Model:getNodePose
functions for modifying individual joints in a Model.astc
, dxt
, instancedstereo
, multiview
, and timers
GraphicsFeatures.lovr.math.drain
function for freeing temporary vectors.t.window.resizable
flag to make the mirror window resizable.t.window.vsync
hint to control vsync (may be ignored if necessary for proper VR timing).getNodeCount
, getMaterialCount
, and getAnimationCount
to Model
.Change:
new
-prefixed functions for permanent vectors.lovr.filesystem.read
to accept and return the number of bytes read.lovr.filesystem
to follow symbolic links.lovr.graphics.newMesh
to accept a Blob
for binary vertex data.fake
headset driver to desktop
.TextureData:getPixel
/setPixel
to support more formats: rgb
, r32f
, rg32f
, rgba32f
.lovr.graphics.getSystemLimits
to lovr.graphics.getLimits
.lovr.graphics.getSupported
to lovr.graphics.getFeatures
.lovr.graphics.plane
to accept optional uv coordinates to draw a subregion of a Texture.Font:getWidth
to also return the number of wrapped lines.lovr.thread.newThread
to accept a filename or a Blob
.lovr.headset.getType
to lovr.headset.getName
, returning the raw headset name string.lovr.graphics.circle
size argument to be a radius instead of a diameter.MULTICANVAS
shader define to be a multicanvas
shader flag.Source:getDirection
, :setDirection
to Source:getOrientation
, setOrientation
.Fix:
Remove:
Animator
objects, they are replaced by the Model:animate
function.Controller
objects, equivalent functions that accept a Device are now in lovr.headset
.lovr.headset.isMounted
, use lovr.headset.isDown('head', 'proximity')
instead.controlleradded/removed/pressed/released
).lovr.graphics.skybox
, rotation is automatically applied.Pool
objects, there is a default temporary vector Pool built in to lovr.math
.t.gammacorrect
conf flag, all rendering is gamma correct now.Published by bjornbytes over 5 years ago
Community
lovr-oculus-mobile
from @mcclure.lodr
, from @mcclure.lovr-native-example
for easily integrating C code into a project.Framework
Add:
vec3
, mat4
, quat
, and Pool
objects to lovr.math
.go
and gear
HeadsetTypes.oculus
and oculusmobile
HeadsetDrivers.lovr.mirror
callback for custom rendering to the desktop window.Controller:getVelocity
and Controller:getAngularVelocity
.Curve
objects for working with Bézier curves.Canvas:getDepthTexture
.lovr.headset.getBoundsGeometry
(again).lovr.headset.getMirrorTexture
.lovr.graphics.discard
.lovr.graphics.flush
.lovr.graphics.setAlphaSampling
and lovr.graphics.getAlphaSampling
.lovr.graphics.setProjection
.lovr.graphics.getPixelDensity
.lovr.graphics.hasWindow
.ubyte
, short
, ushort
, and uint
types for Mesh attributes.Font:hasGlyphs
.Font:getRasterizer
.Font:isFlipEnabled
and Font:setFlipEnabled
.ShaderBlock:read
.lovr.filesystem.getApplicationId
.--root
command line argument to run a project from a directory inside an archive.Change:
lovr.headset.setMirrored
and the t.headset.mirrored
conf.lua flag to take a HeadsetEye.lovr.graphics.setBlendMode
to accept nil
to disable blending.lovr.graphics.triangle
to take multiple triangles to draw.lovr.graphics.cylinder
to take position, rotation, and scale (length) arguments.lovr.graphics.newShaderBlock
to take a BlockType
instead of a writable
flag.lovr.graphics.newMesh
and lovr.graphics.newShaderBlock
to accept a readable
flag.lovr.graphics.fill
to accept a subregion of the input Texture to use.emissive
colors in Materials to default to black instead of white.lovr.graphics.getSystemLimits
to return the maximum ShaderBlock size (blocksize
).lovr.filesystem.mount
to accept a path inside the archive to mount.depth
flag of lovr.graphics.newCanvas
to additionally accept a table with format
and readable
keys for creating a Canvas with a readable depth buffer.Animator
functions to accept both animation names and indices.DrawMode
to DrawStyle
and MeshDrawMode
to DrawMode
(enum values are unchanged).DepthFormat
to be merged into TextureFormat
(enum values are unchanged).lovr.graphics.newCanvas
to create Textures with the clamp
TextureWrap.Font:setPixelDensity
to accept nil
to reset the density to the default.computeshaders
graphics feature to compute
.lovr.getOS
to return Android
on Android.deps
folder.Fix:
lovr.filesystem.unmount
was not exposed.Channel:peek
.Remove:
Transform
objects (use mat4
instead).fbx2gltf
can be used to convert to glTF).VertexData
.ModelData
API.Model:getMesh
.replace
BlendMode.Mesh:drawInstanced
and Model:drawInstanced
(draw
takes an instance count now).lovr.headset.setMirrored
, lovr.headset.isMirrored
, and the t.headset.mirror
flag.lovr.headset.getPose
(and getPosition/getOrientation) that took a HeadsetEye.ShaderBlock:isWritable
(use ShaderBlock:getType
).Canvas:getDepthFormat
(use Canvas:getDepthTexture
instead).Published by bjornbytes about 6 years ago
Community
lovr-keyboard
and lovr-mouse
libraries for mouse and keyboard input.Framework
Add:
Microphone
objects, lovr.audio.getMicrophoneNames
, and lovr.audio.newMicrophone
.SoundData
objects for accessing individual samples of sound files and Source:getType
.lovr.graphics.newComputeShader
and lovr.graphics.compute
.ShaderBlock
objects for efficiently sending large amounts of data to Shaders.AudioStream:decode
to decode a chunk of audio and return it as a SoundData.lineloop
value for MeshDrawMode
.lovr.math.noise
for perlin noise.require
ing C libraries (.dll, .so) files as LÖVR modules.Material:setTransform
and Material:getTransform
for using subregions of textures or applying other texture coordinate transformations.Texture:getMipmapCount
.rgba4
, r16f
, r32f
, rg16f
, rg32f
, rgb5a1
, rgb10a2
.Texture:getFormat
.conf.headset.msaa
to control the antialiasing of the headset Canvas (it can be different from the MSAA of the desktop window now).lovr.graphics.getSupported
so you can figure out if compute shaders are supported.Change:
lovr.audio.newSource
to accept a SourceType
so you can create a Source backed by either an AudioStream or a SoundData.lovr.graphics.newShader
to accept Blobs containing shader source code.lovr.filesystem.getRequirePath
and lovr.filesystem.setRequirePath
to support C require paths.lovr.filesystem
to look in lua_modules
for Lua modules for better luarocks integration.Texture:replacePixels
to accept an x/y offset and a mipmap level to replace.Texture:getWidth
, Texture:getHeight
, and Texture:getDimensions
to accept an optional mipmap level.lovr.graphics.newShader
to work with strings longer than 8,192 characters.lovr.data.newTextureData
to support an optional texture format.Transform:getMatrix
to accept a table to fill with values.Fix:
conf.lua
wasn't loading properly.lovr.event.push
to work with custom event names.lovr.graphics.getBlendMode
to report correct values.Remove:
AudioStream:seek
.Published by bjornbytes over 6 years ago
Community
Framework
Add:
lovr.thread
module, Thread
objects, Channel
objects, and the lovr.threaderror
callback.lovr.graphics.getCanvas
and lovr.graphics.setCanvas
.lovr.mount
callback and lovr.headset.isMounted
for detecting when/if the headset is on a head.lovr.data
module and AudioStream
, ModelData
, Rasterizer
, TextureData
, and VertexData
objects.lovr.event.quit
that restarts instead of quitting.Texture:replacePixels
for modifying Texture contents.lovr.graphics.clear
for clearing the depth and stencil buffers to custom values.lovr.graphics.setDepthTest
for controlling whether the depth buffer is written to.ModelData:getVertexData
for access to raw vertex data in models.MaterialTexture
s for PBR maps: emissive
, metalness
, roughness
, occlusion
, and normal
. They are loaded for new Models by default.MaterialScalar
, Material:getScalar
, and Material:setScalar
for metalness and roughness properties.emissive
MaterialColor
.mipmaps
flag to lovr.graphics.newTexture
and lovr.graphics.newCanvas
.lovr.audio.getDopplerEffect
and lovr.audio.setDopplerEffect
(removed in a previous version).lovrTangent
as a vec3 accessible to Shaders and load tangents from Models.Mesh:attachAttributes
and Mesh:detachAttributes
for improved instancing support.lovr.filesystem.getRequirePath
and lovr.filesystem.setRequirePath
.lovr.filesystem.getWorkingDirectory
.Canvas:newTextureData
for reading pixel data from Canvas objects.Change:
lovr.timer.getFPS
to average over the last 90 frames instead of 60.lovr.graphics.newCanvas
to error when given negative/zero sizes.Canvas:renderTo
to error if a function isn't supplied to it.Canvas:renderTo
to pass extra arguments to the render callback.lovr.graphics.plane
to accept separate x/y scales for the plane.Source:getChannels
to Source:getChannelCount
.lovr.controllerpressed
and lovr.controllerreleased
to pass nil
instead of 'unknown'
for unknown controller buttons.lovr.graphics.newMesh
and Mesh:setVertices
to accept a VertexData
object to load vertices from.Mesh:setVertexMap
to accept a Blob
for fast vertex map updating.Shader:send
to accept a Blob
for updating Shaders with arbitrary binary data.Collider:getShapeList
to Collider:getShapes
.Collider:getJointList
to Collider:getJoints
and also fix it.lovr.headset.setMirrored
function.Blob:getFilename
to Blob:getName
.Fix:
require
when used with dot-separated module paths.conf.lua
would be loaded from the working directory if one wasn't present in the project.lovr.headset.getDisplayDimensions
was called before the first frame was rendered.Joint:getType
returning nil
for DistanceJoints.Texture:setFilter
not doing anything for cubemap textures.lovr.audio.newSource
to show an error message when passed an invalid file.Model:getAABB
.lovr.graphics.cube
.lovr.load
to correctly pass in the argument table.Remove:
lovr.step
callback. It is now returned from lovr.run
.lovr.headset.getBoundsGeometry
.lovr.headset.isPresent
.MatrixType
enum.lovr.graphics.plane(texture)
for drawing fullscreen quads, it has its own lovr.graphics.fill
function now.lovr.filesystem.newBlob
that creates a Blob from a string, use lovr.data.newBlob
instead.Published by bjornbytes almost 7 years ago
Add:
Canvas
objects.lovr.graphics.stencil
, lovr.graphics.getStencilTest
, and lovr.graphics.setStencilTest
.lovr.headset.getPose
and Controller:getPose
.lovr.graphics.getStats
.Change:
Fix:
Remove:
Texture:renderTo
and variants of lovr.graphics.newTexture
that created framebuffers.lovr.headset.getEyePosition
. An HeadsetEye can now optionally be specified as the first argument to lovr.headset.getPosition
, lovr.headset.getOrientation
, and lovr.headset.getPose
.Published by bjornbytes almost 7 years ago
Add:
Material
objects. Materials are sets of colors and textures that can be applied to Models and Meshes. Models automatically load referenced materials and textures.Animator
objects for skeletal animation playback.lovr.graphics.isGammaCorrect
, and the gammacorrect
option to conf.lua
.lovr.math.gammaToLinear
and lovr.math.linearToGamma
.lovr.graphics.circle
.lovr.graphics.arc
.lovr.math.orientationToDirection
.Transform:getMatrix
and Transform:setMatrix
.lovrVertexColor
vertex attribute to shaders.Model:getMesh
.Mesh:drawInstanced
and Model:drawInstanced
.lines
and linestrip
draw modes to Meshes.Shader:hasUniform
.headset.drivers
table in conf.lua
.Change:
Shader:send
to accept more types of uniforms, including arrays.lovr.graphics.newTexture
to accept 6 arguments to create a cube map texture.Fix:
Controller:getHand
, lovr.graphics.setPointSize
, HRTF audio, and ZIP archive mounting for WebVR.World:raycast
that occurred when the ray hit multiple things.Remove:
Model:setTexture
, Model:getTexture
, Mesh:setTexture
, and Mesh:getTexture
. They have been replaced by Model:setMaterial
, Model:getMaterial
, Mesh:setMaterial
, and Mesh:getMaterial
.Skybox
object. It has been replaced with lovr.graphics.skybox
.lovr.filesystem.exists
. The lovr.filesystem.isFile
and lovr.filesystem.isDirectory
functions can be used instead.Published by bjornbytes about 7 years ago
Add:
lua-enet
library for multiplayer networking.anisotropy
system limit returned by lovr.graphics.getSystemLimits
.lovr.graphics.getDefaultFilter
and lovr.graphics.setDefaultFilter
.lovr.math.lookAt
.lovr.math.random
, lovr.math.randomNormal
, and RandomGenerator
objects.unknown
, trigger
, a
, b
, x
, and y
.grip
ControllerAxis
.Controller:getHand
and ControllerHand
.Controller:isTouched
.HeadsetOrigin
, lovr.headset.getOriginType
, and headset.offset
option to conf.lua
.HeadsetType
.lovr.graphics.createWindow
and window
options to conf.lua
.lovrModel
and lovrView
uniform matrices for shaders.MatrixType
and allow transform stack functions to manipulate either the model or the view matrix.Change:
lovr.graphics.plane
to take an angle/axis orientation instead of a normal vector.FilterMode
. The new values are nearest
, bilinear
, trilinear
, and anisotropic
.less
to lequal
.lovr.graphics.translate
, lovr.graphics.rotate
, lovr.graphics.scale
, and lovr.graphics.transform
to accept an optional MatrixType
as the first parameter to control whether the model matrix or the view matrix is affected.Fix:
lovr.graphics.setFont
when specifying a Font of nil
.lovr.headset.getType
to return correct values.Remove:
lovr.graphics.getScissor
and lovr.graphics.setScissor
.lovr.graphics.getColorMask
and lovr.graphics.setColorMask
.Texture:bind
function.Published by bjornbytes over 7 years ago
Add:
lovr.graphics.cylinder
.lovr.graphics.sphere
.lovr.graphics.box
.Model:getAABB
.lovrNormalMatrix
uniform to shaders.Change:
lovr.math.newTransform
, Transform:setTransformation
, and lovr.graphics.transform
to accept 3 scale parameters instead of 1.Fix:
Mesh:getVertexMap
indices.Collider:getAABB
.Collider:applyTorque
.Remove:
lovr.audio.getDopplerEffect
and lovr.audio.setDopplerEffect
.Published by bjornbytes over 7 years ago
Add:
lovr.physics
module (YES!)lovr.timer.getAverageDelta
Change:
Fix:
require
.Published by bjornbytes over 7 years ago
Add:
Change:
Fix:
Remove:
Published by bjornbytes over 7 years ago
Add:
lovr.controllerpressed
and lovr.controllerreleased
callbacks.lovr.focus
callback.lovr --version
command line flag.lovr.getOS
.Source:getFalloff
and Source:setFalloff
.Source:getVolumeLimits
and Source:setVolumeLimits
.Source:getCone
and Source:setCone
.Source:isRelative
and Source:setRelative
.Source:getVelocity
and Source:setVelocity
.lovr.audio.getVelocity
and lovr.audio.setVelocity
(called automatically in lovr.run
).lovr.audio.getDopplerEffect
and lovr.audio.setDopplerEffect
.lovr.audio.isSpatialized
.lovr.filesystem.load
.lovr.filesystem.createDirectory
.lovr.filesystem.getAppdataDirectory
.lovr.filesystem.getDirectoryItems
.lovr.filesystem.getLastModified
.lovr.filesystem.getSaveDirectory
.lovr.filesystem.getSize
.lovr.filesystem.isFused
.lovr.filesystem.newBlob
.lovr.filesystem.remove
.lovr.filesystem.mount
and lovr.filesystem.unmount
.Mesh:isAttributeEnabled
and Mesh:setAttributeEnabled
.lovr.headset.isMirrored
and lovr.headset.setMirrored
. The initial value can be set in conf.lua
(t.headset.mirrored
).lovr.graphics.print
for aligning text horizontally and vertically.Font:getPixelDensity
and Font:setPixelDensity
for controlling scales of fonts independent of units.Font:getWidth
, Font:getHeight
, Font:getAscent
, Font:getDescent
, and Font:getBaseline
.lovr.graphics.getBlendMode
and lovr.graphics.setBlendMode
.lovr.graphics.getSystemLimits
for returning the maximum point size, the maximum texture size, and the maximum supported msaa level for render textures.Change:
Buffer
to Mesh
.lovr.graphics.scale
accepts a single argument that will scale all 3 axes.lovr.graphics.rotate
defaults to rotating around the y axis.Transform
s to mat4
uniforms in shaders.Source:getOrientation
and Source:setOrientation
to Source:getDirection
and Source:setDirection
.lovr.headset.getEyePosition
to accept nil
as a parameter.lovr.graphics.print
.Blob
s.Fix:
lovr.graphics.reset
.Remove:
Source:getOrientation
and Source:setOrientation
(renamed to getDirection
and setDirection
).lovr.graphics.setProjection
.Published by bjornbytes over 7 years ago
lovr.math
module and Transform
objects.lovr.graphics.transform
.lovr.graphics.cube
, Model:draw
, and Buffer:draw
to accept a Transform
.lovr.graphics.newModel
to accept a Texture
to apply to the model as the second argument.lovr.event.poll
.Buffer:getVertexFormat
.lovr.headset.getEyePosition(eye)
.Published by bjornbytes almost 8 years ago
Texture:renderTo
.lovr.graphics.cube
and lovr.graphics.plane
.lovr.graphics.plane(texture)
.Published by bjornbytes almost 8 years ago
lovr.event
module.lovr.filesystem
module.lovr.graphics
module.lovr.headset
module.lovr.timer
module.Published by bjornbytes almost 8 years ago
lovr.audio
module.lovr.headset.getOrientation
and Controller:getOrientation