Search found 85 matches
- Sun Aug 22, 2021 10:30 pm
- Forum: Libraries and Tools
- Topic: cimgui-love: another LÖVE module for DearImGui using LuaJIT FFI
- Replies: 5
- Views: 20231
Re: cimgui-love: another LÖVE module for DearImGui using LuaJIT FFI
Do you have an example on how to use imgui::Combo? I'm very new to ffi.
- Wed Aug 18, 2021 8:51 pm
- Forum: Support and Development
- Topic: [SOLVED] Weird graphical bug with canvas
- Replies: 4
- Views: 6308
[SOLVED] Re: Weird graphical bug with canvas
Always set the color to white before draw the canvas. Also do for x = 0, width/snap.x do -- don't render to out of canvas linex = x * snap.x love.graphics.line(linex, 0, linex, height) end It looks like rendering outside of the canvas was the issue! Also setting the color to white solved another is...
- Wed Aug 18, 2021 1:46 pm
- Forum: Support and Development
- Topic: [SOLVED] Weird graphical bug with canvas
- Replies: 4
- Views: 6308
[SOLVED] Weird graphical bug with canvas
Hi, I'm trying to draw a grid using the canvas and graphics methods. For some reason it is sometimes showing a gradient in the background. This doesn't happen if I draw without using a canvas though. Am I using canvas incorrectly? (screenshot and code below) Screenshot from 2021-08-18 09-26-18.png l...
- Wed Mar 04, 2020 6:45 pm
- Forum: Support and Development
- Topic: GitHub not loading - Atom
- Replies: 1
- Views: 5798
Re: GitHub not loading - Atom
I don't use Atom for love2d development myself, but have you tried looking at the information on this wiki page. It may help with your toolbar issue.
- Mon Mar 02, 2020 6:41 pm
- Forum: Support and Development
- Topic: [SOLVED] Lua math.cos issue
- Replies: 8
- Views: 17992
Re: Lua math.cos issue
Interesting! Thanks for explaining.
- Mon Mar 02, 2020 5:42 pm
- Forum: Support and Development
- Topic: [SOLVED] Lua math.cos issue
- Replies: 8
- Views: 17992
[SOLVED] Lua math.cos issue
I simply want to get cos(90 deg) using the following:
This is giving me a nasty 6.1232339957368e-17.
I thought cos(90 deg) was 0. My calculator IRL and google also gives me 0.
Code: Select all
math.cos(math.rad(90))
I thought cos(90 deg) was 0. My calculator IRL and google also gives me 0.
- Wed Feb 12, 2020 6:15 pm
- Forum: Support and Development
- Topic: [SOLVED] Need help with my vertex shader code
- Replies: 3
- Views: 5494
Re: Need help with my vertex shader code
SOLVED: I figured out a hacky way to do this with pixel shader. I didn't realize texture_coords was normalized while texSize was not. So I didn't really even need to use texSize. It's a shame the vertex shader didn't work how I thought it would though. Would be nice if there were code examples on ho...
- Wed Feb 12, 2020 4:49 pm
- Forum: Support and Development
- Topic: [SOLVED] Need help with my vertex shader code
- Replies: 3
- Views: 5494
Re: Need help with my vertex shader code
Thanks. After learning some stuff about matrix multiplication I'm now trying this: extern vec2 texSize; extern float angle; #ifdef VERTEX vec4 position(mat4 transform_projection, vec4 vertex_position) { transform_projection *= mat4( 1, 0, 0, 0, 0, cos(angle), -sin(angle), 0, 0, sin(angle), cos(angle...
- Mon Feb 10, 2020 7:07 pm
- Forum: Support and Development
- Topic: [SOLVED] Need help with my vertex shader code
- Replies: 3
- Views: 5494
[SOLVED] Need help with my vertex shader code
I'm trying to do a 2d perspective transformation using a vertex shader. Similar to the image below: https://love2d.org/imgmirrur/aGbzh.png I'm currently using this shader code to try and achieve this effect: extern vec2 texSize; number lerp(number a, number b, number t) { return a * (1.0 - t) + b * ...
- Fri Aug 24, 2018 7:47 pm
- Forum: Support and Development
- Topic: Pausing animation in ParticleSystem
- Replies: 2
- Views: 3343
Re: Changing texture and quad in ParticleSystem
BUMP: Anyone know if it's possible to pause the animation in a ParticleSystem that uses quads? I just want to draw each particle to be a different frame of a spritesheet and not change to any other part of the animation.