Richard Davey
881019e55d
No longer requires temp matrices
2020-11-02 22:39:42 +00:00
Richard Davey
47ec3d33c7
Remove texture setters
2020-11-02 16:20:22 +00:00
Richard Davey
bf7e7f352a
Container can how set a pipeline that overrides all children
2020-10-29 17:22:16 +00:00
Richard Davey
ce69c22e86
Added new private forcePipeline
property and pipeline methods
2020-10-29 17:22:04 +00:00
Richard Davey
60c834e2c8
Use the new Graphics Pipeline
2020-10-28 17:39:06 +00:00
Richard Davey
4ba2b0eb7b
All swapped to using renderer matrices to make pipelines smaller
2020-10-28 16:52:59 +00:00
Richard Davey
4b3cc7145e
Testing new pipelineData object.
2020-10-27 18:06:53 +00:00
Richard Davey
ba9b837739
You can now pass a pipeline instance to the GameObject.setPipeline
method, as well as a string.
2020-10-27 14:05:37 +00:00
Richard Davey
d670edd708
No need to reference via game
2020-10-27 13:55:27 +00:00
Richard Davey
371425a5d2
Use new pipeline resize method
2020-10-26 14:04:55 +00:00
Richard Davey
af01b23696
JSDocs fix
2020-10-26 14:03:35 +00:00
Kshitiz Srivastava
4941ca3b64
Added loadMediaStream method
2020-10-25 01:24:55 +05:30
Richard Davey
6ed84e2f34
Added Mesh.ignoreDirtyCache
flag.
2020-10-21 10:15:12 +01:00
Rex
34635c582e
Don't add white space when measure last word
2020-10-20 14:52:20 +08:00
Richard Davey
8bb1151aca
Fixed RenderTexture.fill rgb order. Fix #5364
2020-10-20 00:50:49 +01:00
Richard Davey
48d9eb6321
The GameObjects.Graphics.fillGradientStyle
method can now accept a different alpha value for each of the fill colors. The default is still 1. If you only provide a single alpha, it'll be used for all colors. Fix #5044
2020-10-16 18:08:31 +01:00
Richard Davey
85a284d095
Particles.EmitterOp
now cleanly separates between the different types of property configuration options. start | end
will now ease between the two values, min | max
will pick a random value between them and random: []
will pick a random element. They no longer get mixed together. Fix #3608
2020-10-16 17:52:59 +01:00
Richard Davey
1aaecbe703
Particles.EmitterOp.setMethods
will now reset both onEmit
and onUpdate
to their default values. This allows you to reconfigure an emitter op with a new type of value and not have it stuck on the previous one. Fix #3663
2020-10-16 17:32:22 +01:00
Richard Davey
ae6112297a
Default tint value should now be 0xffffff. Fix #5358
2020-10-15 12:19:17 +01:00
Richard Davey
0f87981f47
Improved docs
2020-10-15 11:07:22 +01:00
Richard Davey
f17743dadf
Changed updateProjectionMatrix
to setPerspective
and added setOrtho
counterpart
2020-10-14 16:32:29 +01:00
Richard Davey
cc167e158f
Much better effect from the light shader
2020-10-14 11:57:58 +01:00
Richard Davey
b1a5ce7f55
Testing new batched lights
2020-10-13 18:17:30 +01:00
Richard Davey
61c0e1c499
Moved Text out of 'static' folder, as it doesn't need to be in there
2020-10-13 11:04:46 +01:00
Richard Davey
8708255948
Removed Layer3D Game Object and old MeshPipeline
2020-10-13 10:56:21 +01:00
Richard Davey
9d23735a23
Lint fix
2020-10-13 10:51:17 +01:00
Richard Davey
19f581327e
Removed Animation component because it would reset the UV coords every frame, so makes things overly complex
2020-10-13 10:50:42 +01:00
Richard Davey
caa69b673d
Better debug rendering
2020-10-09 14:57:07 +01:00
Richard Davey
65e4a7734a
Updated docs
2020-10-09 12:07:37 +01:00
Richard Davey
abdd62dd57
Will no longer render Faces it cannot see in the Camera
2020-10-09 11:54:37 +01:00
Richard Davey
88feadb577
Fixed JSDocs, added totalRendered
property.
2020-10-09 11:54:19 +01:00
Richard Davey
bf8cd60aab
Added ability to rotate data on import
2020-10-08 15:53:13 +01:00
Richard Davey
af0a4dbd37
Updated Mesh to include new functions and docs
2020-10-08 13:24:23 +01:00
Richard Davey
e3f7048e22
Removed moved defs
2020-10-08 13:23:44 +01:00
Richard Davey
2e988801ce
Made obj material parsing external
2020-10-08 10:45:03 +01:00
Richard Davey
324fa6a3b2
Removed MeshCamera, updated Mesh to focus on ortho projections
2020-10-07 22:27:04 +01:00
Richard Davey
8f67ffca5f
Starting to add materials
2020-10-07 18:06:33 +01:00
Richard Davey
90824e1485
Removed normalMatrix
2020-10-07 18:06:22 +01:00
Richard Davey
dda4431366
Merged the Layer3D Game Object and pipeline back in for now
2020-10-07 17:44:36 +01:00
Richard Davey
75fd64ace7
Modified cam layout
2020-10-07 13:16:24 +01:00
Richard Davey
f6a0a8d96b
Transform based on z value
2020-10-07 13:16:10 +01:00
Richard Davey
55d7b36217
Pass in the z value
2020-10-07 13:16:01 +01:00
Richard Davey
8ff78ef08a
Fixed addVerts face addition
2020-10-07 12:45:31 +01:00
Richard Davey
caf545d042
Added position, rotation and scale vectors, caching and removed old methods
2020-10-07 12:04:46 +01:00
Richard Davey
7a0b056fef
Trying out MeshCamera
2020-10-06 18:05:14 +01:00
Richard Davey
4b7c344497
Added parseOBJMaterial
method and set default texture to __WHITE
2020-10-06 16:00:22 +01:00
Richard Davey
dff414fe82
Added Grid Config typedefs
2020-10-06 13:47:49 +01:00
Richard Davey
1f1edd3742
addGrid
now takes config object and works with texture frames, with or without repeating
2020-10-06 13:42:44 +01:00
Richard Davey
440c33deb8
Use config object
2020-10-06 11:11:28 +01:00
Richard Davey
7287a760ae
Added ParseOBJ type defs
2020-10-06 10:38:21 +01:00
Richard Davey
816c45937d
Removed the Quad Game Object. Mesh can do it better now.
2020-10-06 10:16:46 +01:00
Richard Davey
a0020b2ad4
Fixed paths and addGrid
2020-10-05 17:40:42 +01:00
Richard Davey
b774df9426
More documentation
2020-10-05 17:25:24 +01:00
Richard Davey
57974c120a
Updated docs
2020-10-05 17:12:18 +01:00
Richard Davey
7aaf77a2c6
Merged the Mesh Game Object back in
2020-10-05 16:52:01 +01:00
Richard Davey
8091f09c10
Don't set OutlineStyle if undefined
2020-10-05 13:53:11 +01:00
Richard Davey
2b99623cdc
Group
now extends EventEmitter
, allowing you to emit custom events from within a Group.
2020-10-03 10:05:38 +01:00
Richard Davey
3baecb19d4
Moved old mesh pipeline and code into own folder
2020-10-01 17:56:49 +01:00
Richard Davey
1907bda5ee
Update GameObjectFactory.js
2020-09-30 16:30:12 +01:00
Richard Davey
8823f7f0e4
Removed Layer3D and Quad Game Objects
2020-09-30 11:03:19 +01:00
Richard Davey
0e72b3d3a0
Container doesn't need to be on the updateList, so remove the handler.
2020-09-30 09:20:16 +01:00
Richard Davey
24de03ca96
Added missing ADDED_TO_SCENE
handlers
2020-09-29 20:14:30 +01:00
Richard Davey
12c8ddfd05
Use getXRound
2020-09-29 18:05:39 +01:00
Richard Davey
9619995527
Add to UpdateList if not on Display List
2020-09-29 18:05:29 +01:00
Richard Davey
8119ce7da1
Fixed use of old camera private properties
2020-09-29 16:44:11 +01:00
Richard Davey
83542ff51d
Merge pull request #5330 from somnolik/fix-render-texture-group
...
Fix drawing Group to RenderTexture
2020-09-29 12:22:07 +01:00
Richard Davey
f9803774dd
The Line
Game Object will now default its width and height to 1, rather than zero. This allows you to give Line objects a physics body (although you will still need to re-adjust the center of the body manually). Fix #4596
2020-09-28 17:00:15 +01:00
Stefan Karner
f4b2b34535
Fix drawing Group to RenderTexture
...
Group children (generic GameObjects) expect a 'camera' argument
in their 'willRender' function
2020-09-26 10:25:22 +02:00
Richard Davey
e004fa47fc
Creating a Bitmap Mask from a texture atlas that was then used to mask another Game Object also using that same texture atlas would throw the error GL_INVALID_OPERATION : glDrawArrays: Source and destination textures of the draw are the same.
. It now renders as expected. Fix #4675
2020-09-23 18:10:12 +01:00
Richard Davey
c6f533b872
Fixed legacy interpolation parameters
2020-09-23 17:55:29 +01:00
Richard Davey
212e7aa301
The Shape
class now includes the ComputedSize
component properties and methods directly in the class, rather than applying as a mixin. setSize
is now flagged as being private
, because it shouldn't be used on Shape classes, which was leading to confusion as it appeared in the public-facing API. Fix #4811
2020-09-23 12:46:55 +01:00
Richard Davey
f16e1c09f3
Lint fix
2020-09-23 12:39:21 +01:00
Richard Davey
e7926674b8
The Graphics
WebGL Renderer will now default to pathOpen = true
. This fixes issues under WebGL where, for example, adding an arc and calling strokePath
, without first calling beginPath
will no longer cause rendering artefacts when WebGL tries to close the path with a single tri.
2020-09-23 12:34:20 +01:00
Richard Davey
559127a53f
Graphics.strokeRoundedRect
now issues moveTo
commands as part of the drawing sequence, preventing issues under WebGL where on older Android devices it would project additional vertices into the display. Fix #3955
2020-09-23 12:34:06 +01:00
Richard Davey
b86d982c00
The ParticleManagerCanvasRenderer
now calculates its transform matrix differently, splitting out the parent matrix and factoring in the follow offsets separately. It also uses setToContext
internally. This fixes numerous issues with particle emitters being incorrectly offset when added to Containers, or having the Camera zoomed, running under Canvas. Fix #4908 #4531 #4131
2020-09-23 12:06:29 +01:00
Richard Davey
a459ec090f
Fixed lint issue
2020-09-23 11:50:07 +01:00
Richard Davey
fb849ae0dc
The ParticleManagerWebGLRenderer
now calculates its transform matrix differently, splitting out the parent matrix and factoring in follow offsets separately. This fixes numerous issues with particle emitters being incorrectly offset when added to Containers. Fix #5319 #5195 #4739 #4691
2020-09-23 11:50:00 +01:00
Richard Davey
d5de353890
You can now use setMaxWidth
on DynamicBitmapText
, which wasn't previously possible. Fix #4997
2020-09-22 16:52:36 +01:00
Richard Davey
6bf36083a8
Added setMaxWidth
docs. Fix #4997
2020-09-22 16:48:38 +01:00
Richard Davey
5a6dec237c
Fixed RetroFont Parser. Fix #5310
2020-09-22 16:47:05 +01:00
Richard Davey
4fd46f4d1f
Fixed DynamicBitmapText WebGL Renderer. Fix #5303
2020-09-22 16:38:17 +01:00
Richard Davey
b317f89404
Renderer updates the camera
2020-09-22 15:25:09 +01:00
Richard Davey
674966280e
Merge pull request #5320 from vforsh/master
...
Add reserve property to particle emitter config
2020-09-22 15:24:16 +01:00
Richard Davey
6ff21af807
Added start of controls
2020-09-22 12:48:32 +01:00
Richard Davey
6cf95f3548
Updated missing docs
2020-09-22 12:48:15 +01:00
Richard Davey
06b3a01d87
Added layer property
2020-09-22 12:48:03 +01:00
Richard Davey
183e68580f
Fixed dirty flag reset
2020-09-22 11:45:49 +01:00
Richard Davey
9ec300d618
Updated JSDocs
2020-09-22 11:12:40 +01:00
Richard Davey
820ea7799c
Completed JSDocs
2020-09-22 11:12:32 +01:00
Richard Davey
248d2352b6
Update the camera if dirty
2020-09-22 10:59:36 +01:00
Richard Davey
d08a6c657c
Added all documentation and dirty flag handling
2020-09-22 10:59:28 +01:00
Richard Davey
4945fc95e1
Not yet fixed, but no longer crashes build
2020-09-21 18:25:02 +01:00
Richard Davey
333945a89e
Remove Mesh Game Object and add Layer3D
2020-09-21 18:24:38 +01:00
Richard Davey
33734309f1
Clean the mesh after rendering
2020-09-21 15:57:21 +01:00
Richard Davey
989e3e6e07
Swapped to use RGB objects
2020-09-21 15:57:11 +01:00
Richard Davey
82c8ada236
Added fog, dirty refresh and preUpdate handler
2020-09-21 15:56:58 +01:00
Richard Davey
27eafe3661
New Face and Vertex typedefs
2020-09-21 15:56:21 +01:00
Vladislav Forsh
4d7301a4be
Improve types for particle emitter deathZone and emitZone
2020-09-21 12:38:29 +03:00
Vladislav Forsh
530c7a3d92
Add reserve property to particle emitter config
2020-09-21 12:06:49 +03:00
Richard Davey
99953b94b6
Merge pull request #5311 from vforsh/master
...
Add ability to use custom easing function(s) with particle emitters
2020-09-21 09:40:26 +01:00
Richard Davey
48272312ed
Merge pull request #5318 from samme/fix/getMatching
...
Fix Group#getMatching()
2020-09-21 09:34:03 +01:00
Richard Davey
78c1eb7934
Removed debug, modified signatuers, added fog
2020-09-21 00:17:58 +01:00
samme
d4059c8f6e
Fix Group#getMatching
2020-09-19 10:10:25 -07:00
Richard Davey
374cc84be8
Now the pipeline does it all
2020-09-18 17:52:41 +01:00
Richard Davey
561a1b54a2
Handle vertex normals too
2020-09-18 17:52:30 +01:00
Richard Davey
640ce49d93
Update MeshCamera.js
2020-09-18 17:52:20 +01:00
Richard Davey
6e62ada207
Created new MeshLight class
2020-09-18 17:52:15 +01:00
Richard Davey
5b8e490c7e
Flush during render so we can have models with more vertices than the batch allows
2020-09-17 18:08:25 +01:00
Richard Davey
5ff9894925
MeshCamera now supports orbit and pan modes
2020-09-17 18:08:07 +01:00
Richard Davey
6ce58ed73b
Let them define the orientation
2020-09-17 10:08:15 +01:00
Richard Davey
c5412df09e
Fix docs
2020-09-16 17:48:56 +01:00
Richard Davey
8085952507
Expose MeshCamera
2020-09-16 17:35:54 +01:00
Richard Davey
c306229478
Final JSDocs
2020-09-16 17:33:17 +01:00
Richard Davey
1d0b5cc6a9
Added Size component
2020-09-16 17:15:37 +01:00
Richard Davey
a38166ce2b
Now allows a texture per model, not mesh
2020-09-16 16:39:06 +01:00
Richard Davey
851775ae19
New MeshCamera class
2020-09-16 16:38:39 +01:00
Richard Davey
8ff008b740
Removed un-used components, refactored method names and added MeshCamera
2020-09-16 16:38:32 +01:00
Richard Davey
da6a300474
Iterates and renders the new models array
2020-09-16 13:51:39 +01:00
Richard Davey
4f7442ee96
Moving all dependencies to the Model object
2020-09-16 13:51:30 +01:00
Richard Davey
a96d380933
Created new Geom.Mesh
namespace for all of the Mesh related functions and classes
2020-09-16 13:50:36 +01:00
Vladislav Forsh
8fd4754b03
Add ability to use custom easing function(s) with particle emitters
2020-09-16 12:43:38 +03:00
Richard Davey
45412157c2
Added JSDocs
2020-09-16 09:50:24 +01:00
Richard Davey
b74928b2f8
Added hideCCW
, addOBJ
, addModel
, sortByDepth
, rotateX
, rotateY
, rotateZ
, depthSort
, addVertex
and addFace
methods.
2020-09-15 18:09:19 +01:00
Richard Davey
431eb69b42
Much cleaner rendering function, skipping invalid faces
2020-09-15 18:07:51 +01:00
Richard Davey
3e133c900a
New method signature order
2020-09-15 18:07:24 +01:00
Richard Davey
a2a199818e
Added contains
and isCounterClockwise
methods and depth
property
2020-09-15 18:07:14 +01:00
Richard Davey
229d27dc9e
Updated docs and added load
method
2020-09-15 18:06:48 +01:00
Richard Davey
d8a8aa8448
Added clearVertices
and renamed to addVertices
so you can append on more verts post-creation
2020-09-15 11:57:44 +01:00
Richard Davey
b763fa0f18
The Mesh now renders by iterating through the Faces array, not the vertices. This allows you to use Array methods such as BringToTop
to reposition a Face, thus changing the drawing order without having to repopulate all of the vertices.
2020-09-15 11:57:22 +01:00
Richard Davey
92982d810b
Added ability to get InCenter. translate and rotate Face
2020-09-14 17:35:06 +01:00
Richard Davey
52d5b00fe5
Added setPosition
and translate
methods
2020-09-14 17:34:47 +01:00
Richard Davey
6a966e3f3b
Removed interpolationPercentage
parameter from all render methods, as it has never been used.
2020-09-14 15:33:58 +01:00
Richard Davey
83f8f007d1
Now uses GetCalcMatrix
2020-09-14 15:22:16 +01:00
Richard Davey
1057ead114
Dump all of the old mega arrays and replace with an array of Vertex instances.
2020-09-14 15:09:34 +01:00
Richard Davey
36a33745b6
Expose Vertex and Face
2020-09-14 15:09:12 +01:00
Richard Davey
6a3ce21702
GameObject.Face
is a new micro class that consists of references to the three Vertex
instances that construct the single Face.
2020-09-14 15:08:36 +01:00
Richard Davey
8fc969088c
GameObject.Vertex
is a new micro class that encapsulates all of the data required for a single vertex, such as position, uv, color and alpha. This class is now created internally by the Mesh Game Object.
2020-09-14 15:08:25 +01:00
Richard Davey
87c8e75ece
Updated JSDocs
2020-09-14 15:02:21 +01:00
Richard Davey
951457c881
As a result of the change to the shader, all uses of the WebGL Util function getTintAppendFloatAlphaAndSwap
have been replaced with getTintAppendFloatAlpha
instead.
2020-09-14 15:02:13 +01:00
Richard Davey
194257d199
Create GetCalcMatrixResults.js
2020-09-14 15:01:45 +01:00
Richard Davey
8d25510b61
GameObjects.GetCalcMatrix
is a new function that is used to calculate the transformed Game Object matrix, based on the given Game Object, Camera and Parent. This function is now used by the following Game Objects: BitmapText
(Static and Dynamic), Graphics
, Mesh
, Rope
, Shader
, Arc
, Curve
, Ellipse
, Grid
, IsoBox
, IsoTriangle
, Line
, Polygon
, Rectangle
, Star
and Triangle
. This dramatically reduces the amount of duplicate code across the API.
2020-09-14 15:01:40 +01:00
Richard Davey
81b63cdf20
The Rope.tintFill
property is now a boolean, not an integer, and can no longer take 2
as a value for a complete fill. Instead, you should provide a solid color texture with no alpha.
2020-09-14 11:12:41 +01:00
Richard Davey
e5ce83aebd
New direct tint value
2020-09-14 11:06:16 +01:00
Richard Davey
4ade25fc79
No longer read private values for tint
...
The `Multi Pipeline`, `Bitmap Text`, `Render Texture`, `Text`, `TileSprite` and `Camera` now all read the tint values from the public properties instead of the private `_tintTL` etc ones. They also now set the `tintEffect` value directly from the `tintFill` property, removing another conditional check.
2020-09-14 11:05:09 +01:00
Richard Davey
6d09f1fe40
Refactored Tint component
...
* `Tint.tintTopLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTL` which has now been removed.
* `Tint.tintTopRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTR` which has now been removed.
* `Tint.tintBottomLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBL` which has now been removed.
* `Tint.tintBottomRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBR` which has now been removed.
* The property `Tint._isTinted` has been removed as it's no longer required.
2020-09-14 10:59:32 +01:00
Richard Davey
25b5c2d1d1
Loads of new Mesh updates
...
* `Mesh.setVertices` is a new method that allows you to set the verts of a Mesh Game Object from the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage.
* The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays.
* You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the color for all vertices created.
* You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created.
* The `Mesh` Game Object now extends the `SingleAlpha` component and the alpha value is factored into the final alpha value per vertex during rendering. This means you can now set the whole alpha across the Mesh using the standard `setAlpha` methods. But, if you wish to, you can still control the alpha on a per-vertex basis as well.
* The `Mesh` Game Object now has the Animation State Component. This allows you to create and play animations across the texture of a Mesh, something that previously wasn't possible. As a result, the Mesh now adds itself to the Update List when added to a Scene.
* `Mesh.setDebug` is a new method that allows you to render a debug visualisation of the Mesh vertices to a Graphics Game Object. You can provide your own Graphics instance and optionally callback that is invoked during rendering. This allows you to easily visualise the vertices of your Mesh to help debug UV mapping.
* `Mesh.debugGraphic` is a new property that holds the debug Graphics instance reference.
* `Mesh.debugCallback` is a new property that holds the debug render callback.
* `Mesh.renderDebugVerts` is a new method that acts as the default render callback for `setDebug` if none is provided.
* `Mesh.preDestroy` is a new method that will clean-up the Mesh arrays and debug references on destruction.
2020-09-13 23:11:04 +01:00
Richard Davey
3fd52ecdd3
Added debug draw
2020-09-13 17:16:17 +01:00
Richard Davey
c76b084f2e
Merge branch 'master' of https://github.com/photonstorm/phaser
2020-09-13 15:17:13 +01:00
Richard Davey
cd0a27acfa
Fix #5308
2020-09-13 15:17:07 +01:00
Rex
0cb806c11e
Fix add.existing bug
...
Add game object to updateList if it dose not add to displayList.
( Group game object dose not have `renderCanvas` or `renderWebGL` method)
2020-09-13 17:05:55 +08:00