Commit Graph

21 Commits

Author SHA1 Message Date
Alex Szpakowski 0752f27bdf Update copyright year for 2019 2019-01-03 21:09:05 -04:00
Alex Szpakowski ac52666c6f Rename ParticleSystem:setAreaSpread to setEmissionArea, and move the functionality from setAreaSpreadAngle/setAreSpreadIsRelativeDirection into setEmissionArea. Resolves issue #1311. 2018-01-13 21:11:07 -04:00
Bart van Strien e80247c191 Happy new year! 2018-01-03 19:47:35 +01:00
Alex Szpakowski f7b2598490 Remove unnecessary internal constructor arguments. 2017-12-24 22:08:57 -04:00
Alex Szpakowski a31b500b03 Simplify quad drawing code, and use glDrawElementsBaseVertex when available. 2017-12-24 22:05:10 -04:00
Alex Szpakowski e3fd489373 Abstracted lower level drawing code, moved all type-specific drawing code out of opengl backend, deleted obsolete files
--HG--
branch : minor
2017-10-26 20:58:19 -03:00
Alex Szpakowski 15cc540e4c Make internal vertex attribute code less OpenGL-specific.
--HG--
branch : minor
2017-10-25 23:12:39 -03:00
Bart van Strien 9e4374935d Show (short) list of possible enum values when an invalid value is encountered (resolves #1318)
All enum errors have (hopefully) been changed to a luax_enumerror, which has a
fixed error message. If additionally a list of valid options is passed, it
lists that in the error message. For every enum error with few options I've
implemented this using a getConstants call.

This solution has been designed specifically to reduce the number of template
instantiations (as I've been told that was a concern). All new template code
happens in places where there already was an instantiation of the relevant
StringMap. Of course there is still std::vector<std::string>...

--HG--
branch : minor
2017-10-02 17:11:53 +02:00
Bart van Strien 7dae80f552 Fix return type of ParticleSystem:getAreaSpreadIsRelativeDirection, remove optional parameters from ParticleSystem:setAreaSpread (resolves #1340)
I opted to remove the optional parameters altogether since they seemed oddly
out-of-place. They used to reset the values to defaults when not supplied, and
they also weren't returned by getAreaSpread(), so
setAreaSpread(getAreaSpread()) actually changed spread parameters.

The other option was to remove the separate getters/setters for
AreaSpreadIsRelativeDirection and AreaSpreadAngle, and fully rely on
setAreaSpread for these parameters, but the rest of the ParticleSystem API
tends to keep parameters separate.

--HG--
branch : minor
2017-09-12 12:40:21 +02:00
Alex Szpakowski b129d49a6c Move Color.h from modules/graphics/ to common/
--HG--
branch : minor
2017-08-01 23:53:44 -03:00
Alex Szpakowski 864147c38c love.graphics: move more platform-independent code out of the opengl backend
--HG--
branch : minor
2017-07-22 23:34:39 -03:00
Alex Szpakowski 955fb9b60c Fixed love.graphics.draw(particlesystem, …) to actually use the transformation parameters.
--HG--
branch : minor
2017-05-17 18:51:42 -03:00
Alex Szpakowski ac697ddb0f Clean up love’s internal Vector code a bit, and rename it to Vector2 so it’s more obvious what it is.
--HG--
branch : minor
2017-05-16 22:07:01 -03:00
lognz 0f99f261e0 Particle System new features
2 new Particle System Distribution types:

borderellipse - spawns new particles around the border of an elllipse shape defined by dx,dy
borderrectangle - spawns new particles around the border of a rectangle shape defined by dx, dy

New functions:

getAreaSpreadAngle()
getAreaSpreadIsRelativeDirection()
setAreaSpreadAngle(angle in radians)
setAreaSpreadIsRelativeDirection(boolean)

setAreaSpread(distribution, x, y, (optional)angle, (optional)isRelativeDirection)

- angle - defaults 0. In radians the angle to rotate the entire area spread distribution
- isRelativeDirection - defaults false. When false, particles will travel in the direction defined by setDirection(). When true, particles will travel away from the center of the area spread shape

Demo: http://i.imgur.com/sBQ9Xhr.png

The new angle parameter should address: https://bitbucket.org/rude/love/issues/1172

--HG--
branch : particle system new features
2017-03-11 01:54:26 -06:00
lognz 09b757f018 2 new area particle distributions: borderellipse and borderrectangle
--HG--
branch : particle system new features
2017-03-10 06:42:52 -06:00
Alex Szpakowski d990044288 love.graphics internal Buffer objects are no longer OpenGL-specific.
--HG--
branch : minor
2017-01-28 19:26:57 -04:00
Alex Szpakowski abb72cb813 Happy new year! 🥂
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Bart van Strien c761202486 Build type information on first use (load-time), instead of using a hardcoded list
--HG--
branch : dynamiccore2
2016-11-13 16:38:57 +01:00
Nathan Korth 53c528aa44 Add 'ellipse' distribution to ParticleSystem 2016-10-28 16:26:28 -04:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
Alex Szpakowski ac99a47386 Moved most of the ParticleSystem code from modules/graphics/opengl/ to modules/graphics/ 2015-11-25 04:29:00 -04:00