You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG-v3.50.md
+9-39Lines changed: 9 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -399,45 +399,8 @@ The Animation API has had a significant overhaul to improve playback handling. I
399
399
400
400
### Mesh Game Object - New Features, Updates and API Changes
401
401
402
-
The Mesh Game Object has been rewritten in v3.50 with a lot of changes to make it more useful and able to handle 3D objects:
403
-
404
-
*`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.
405
-
*`GameObject.Face` is a new micro class that consists of references to the three `Vertex` instances that construct the single Face.
406
-
* The Mesh constructor and `MeshFactory` signatures have changed to `scene, x, y, texture, frame, vertices, uvs, indicies, colors, alphas`. Note the way the Texture and Frame parameters now comes first. `indicies` is a 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. The `indicies` array is optional. If your data is not indexed, then simply pass `null` or an empty array for this parameter.
407
-
* 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.
408
-
* 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.
409
-
*`Geom.ParseObj` is a new function that will parse a triangulated Wavefront OBJ file into model data that can be consumed by the Mesh Game Object.
410
-
*`Loader.OBJFile` is a new File Loader type that can load triangulated Wavefront OBJ files, which are then parsed and stored in the OBJ Cache.
411
-
*`Mesh.hideCCW` is a new boolean property that, when enabled, tells a Face to not render if it isn't counter-clockwise. You can use this to hide backward facing Faces.
412
-
*`Mesh.addOBJ` is a new method that will add the model data from a loaded Wavefront OBJ file to a Mesh. You load it via the new `OBJFile` with a `this.load.obj` call, then you can use the key with the `addOBJ` method. This method also takes an optional scale and position parameters to control placement of the created model within the Mesh.
413
-
*`Mesh.addModel` is a new method that will add the model data to a Mesh. You can prepare the model data yourself, pull it in from a server, or get it by calling `Geom.ParseObj`, or a similar custom function. This method also takes an optional scale and position parameters to control placement of the created model within the Mesh.
414
-
*`Mesh.rotateX` is a new method that will rotate all vertices of the Mesh around the x axis, by the amount given. It then depth sorts the faces.
415
-
*`Mesh.rotateY` is a new method that will rotate all vertices of the Mesh around the y axis, by the amount given. It then depth sorts the faces.
416
-
*`Mesh.rotateZ` is a new method that will rotate all vertices of the Mesh around the z axis, by the amount given. It then depth sorts the faces.
417
-
*`Mesh.depthSort` is a new method that will run a depth sort across all Faces in the Mesh by sorting them on their average depth.
418
-
*`Mesh.addVertex` is a new method that allows you to add a new single Vertex into the Mesh.
419
-
*`Mesh.addFace` is a new method that allows you to add a new Face into the Mesh. A Face must consist of 3 Vertex instances.
420
-
*`Mesh.addVertices` is a new method that allows you to add vertices to a Mesh Game Object based on the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage.
421
-
*`Mesh.getFaceCount` new is a new method that will return the total number of Faces in the Mesh.
422
-
*`Mesh.getVertexCount` new is a new method that will return the total number of Vertices in the Mesh.
423
-
*`Mesh.getFace` new is a new method that will return a Face instance from the Mesh based on the given index.
424
-
*`Mesh.getFaceAt` new is a new method that will return an array of Face instances from the Mesh based on the given position. The position is checked against each Face, translated through the optional Camera and Mesh matrix. If more than one Face intersects, they will all be returned but the array will be depth sorted first, so the first element will be that closest to the camera.
425
-
*`Mesh.vertices` is now an array of `GameObject.Vertex` instances, not a Float32Array.
426
-
*`Mesh.faces` is a new array of `GameObject.Face` instances, which is populated during a call to methods like `addVertices` or `addModel`.
427
-
*`Mesh.clearVertices` is a new method that will destroy all Faces and Vertices and clear the Mesh.
428
-
*`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.
429
-
* 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. Or, for a 3D model, you can now depth sort the Faces.
430
-
* The Mesh renderer will now check to see if the pipeline capacity has been exceeded for every Face added, allowing you to use Meshes with vertex counts that exceed the pipeline capacity without causing runtime errors.
431
-
* You can now supply just a single numerical value as the `colors` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the color for all vertices created.
432
-
* You can now supply just a single numerical value as the `alphas` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created.
433
-
*`Mesh.debugGraphic` is a new property that holds the debug Graphics instance reference.
434
-
*`Mesh.debugCallback` is a new property that holds the debug render callback.
435
-
*`Mesh.renderDebugVerts` is a new method that acts as the default render callback for `setDebug` if none is provided.
436
-
*`Mesh.preDestroy` is a new method that will clean-up the Mesh arrays and debug references on destruction.
437
-
* The `Mesh.uv` array has been removed. All UV data is now bound in the Vertex instances.
438
-
* The `Mesh.colors` array has been removed. All color data is now bound in the Vertex instances.
439
-
* The `Mesh.alphas` array has been removed. All color data is now bound in the Vertex instances.
440
-
* The `Mesh.tintFill` property is now a `boolean` and defaults to `false`.
402
+
// TODO
403
+
// Include RGB class
441
404
442
405
### Input / Mouse Updates and API Changes
443
406
@@ -569,6 +532,7 @@ Since v3.0.0 the Game Object `render` functions have received a parameter called
569
532
*`Quaternion` now has a new property `onChangeCallback` which, if set, will be invoked each time the quaternion is updated. This allows you to link change events to other objects.
570
533
* The `Quaternion.set` method has a new optional boolean parameter `update` (defaults to `true`), which will call the `onChangeCallback` if set.
571
534
*`Quaternion.setFromEuler` is a new method that will set the quaternion from the given `Euler` object, optionally calling the `onChangeCallback` in the process.
535
+
*`Quaternion.setFromRotationMatrix` is a new method that will set the rotation of the quaternion from the given Matrix4.
572
536
*`Vector3.setFromMatrixPosition` is a new method that will set the components of the Vector3 based on the position of the given Matrix4.
573
537
*`Vector3.setFromMatrixColumn` is a new method that will set the components of the Vector3 based on the specified Matrix4 column.
574
538
*`Vector3.fromArray` is a new method that will set the components of the Vector3 based on the values in the given array, at the given offset.
@@ -578,7 +542,13 @@ Since v3.0.0 the Game Object `render` functions have received a parameter called
578
542
*`Vector3.addScalar` is a new method that will multiply the components of the Vector3 by the scale value given.
579
543
*`Vector3.applyMatrix3` is a new method that will take a Matrix3 and apply it to the Vector3.
580
544
*`Vector3.applyMatrix4` is a new method that will take a Matrix4 and apply it to the Vector3.
545
+
*`Vector3.projectViewMatrix` is a new method that multiplies the Vector3 by the given view and projection matrices.
546
+
*`Vector3.unprojectViewMatrix` is a new method that multiplies the Vector3 by the given inversed projection matrix and world matrix.
581
547
*`Matrix4.getMaxScaleOnAxis` is a new method that will return the maximum axis scale from the Matrix4.
548
+
*`Matrix4.lookAtRH` is a new method that will generate a right-handed look-at matrix from the given eye, target and up positions.
549
+
*`Matrix4.transform` is a new method that will generate a transform matrix from the given position and scale vectors and a rotation quaternion.
550
+
*`Matrix4.multiplyMatrices` is a new method that multiplies two given Matrix4 objects and stores the results in the Matrix4.
551
+
*`Matrix4.premultiply` is a new method that takes a Matrix4 and multiplies it by the current Matrix4.
0 commit comments