- Introduced the useBilinear setting in FontTexture.GetCachedFontTexture
- Introduced the useBilinearFiltering setting in Text2D, default value should cover the expected behavior
Big boring but necessary work was done to make the positioning engine supporting scale/rotation of primitives... with a little side effect.
The side effect: before the positioning engine would round the aligned position to ensure the rendered primitive to be aligned on the rendering target's pixel. This can't be done anymore due to scaling (an aligned position of 10.5 with a scale of 2 would be aligned correctly). That's why primitive alignment was introduced and is forced for Text2D.
Bonus Developments:
- Introduced an AOP style of logging system using TypeScript decorators to log the execution of methods and properties getter/setter. Main methods/properties of the Canvas2D rendering pipeline are using it now.
- Prim2DBase has now an alignToPixel property to align the primitive render to the render target's pixel.
- Text2D rendering was not using premultiplied alpha as it should be.
- BaseFontTexture has now a isPremultipliedAlpha property and Text2D is using accordingly.
- FontTexture.GetCachedFontTexture is now generating a texture using NEAREST_SAMPLINGMODE when SDF is not used.
- A **Breaking change** is introduced in the constructor of BitmapFontTexture because the premultipliedAlpha argument was inserted before the onLoad one.
- BoundingInfo2D now has a worldAABB, with dirty/update mechanism
- Canvas2D now support a Primitive Collision Manager (PCM)
- A ModelRenderCache now supports update of its model data
- Prim2DBase has a default Collision Shape which is the bounding rect of the prim.
- SmartPropertyPrim has a uid property that returns a unique id.
- New type of Primitive: WireFrame2D to render a multiple group of Wire Lines List.
- math2D.ts file added in the Tools, contains a Math2D class with static helpers
- fix a bug in ObservableDictionary
PreviewBuilds of all lib is updated
Fix bug on Engine.createTexture when no onLoad callback where passed.
Web.config now support .fnt file loading
Fix issue in config.json (.ts instead of .js for babylon.fontTexture)