Tags: khalla/phoria.js
Tags
Merge branch 'master' of https://github.com/kevinroast/phoria.js
Changed minified phoria to not include gl-matrix-min.js directly. Cha… …nged minify script to not munge var names to avoid problems with additions to gl-matrix. NOTE! This means you must include the minified gl-matrix-min.js before phoria-min.js if you are using it.
NOTE API change! What has changed: - 'sprite' style is now index value not a reference to an Image element - instead references textures list on parent emitter. Why did it change: - Because it ensures 'style' objects are always serialisable (plain JavaScript string/int/boolean properties only) and can be merged by a simple object combine. How to migrate: - Find and Replace use of: obj.style.sprite = bitmaps[0]; with: obj.style.sprite = 0; obj.textures.push(bitmaps[0]); Implemented emit light polygons and object style (glowing). Live debug example test scene - see test1d.html obj.style.geometrysortmode implemented. 'sprite' style is now index value not a reference to an Image element - instead references textures list on parent emitter. Added static helper to generate a basic entity 'style' structure. (svn r636)
NOTE API change! What has changed: - Sorting mode Entity API refactor - entity style "sortmode" property renamed to "objectsortmode". The "objectsortmode" now supports 3 values of "sorted", "front", "back" - the 'front' and 'back' values allow objects to be forced to the front or back of the display list. Why did it change: - Because a future version of Entity will introduce "geometrysortmode" as a way of overriding the default behaviour for sorting of the points/edges/polygons for an entity, renaming sortmode will help avoid confusion with this new property. How to migrate: - Find and Replace use of "sortmode" property with "objectsortmode" Improved x2 performance quicksort routine for sorting points coords/worldcoords lists. Fix to not apply perspective division to z component of NDC coords - improves coarse object sorting so particles always appear in correct depth position relative to other objects. Simplified and optimized scene processing loop for entity matrix processing. Clearer comments for rendering pipeline calculations. (svn r631)
Merge branch 'master' of https://github.com/kevinroast/phoria.js
Refactored global math constants into Phoria namespace (e.g. RADIANS … …is now Phoria.RADIANS) Normal matrix calculation fixes related to transformed normals - fixes issues with non-uniform object scaling and translation of objects messing up lighting. Optimized some related normal calculations. Improved documentation related to Distant light direction (i.e. normalized direction vector) Improved code comments related to object->world->camera space calculations. Allow a texture index to be set on the 'style' for an Entity - to avoid having to set texture index per polygon when all polygons are using same texture. Tweaked test0uv to demonstrate. Fixed scene JSON serialisation (prototype) related to objects with textures applied. Fixed top and bottom generated cube face orientation (for uv coords).
New lower quality but much higher performant polygon inflation algori… …thm. Fixed issue where textured quads need each tri t o be inflated individually. Fix normals for scaled objects with inverted transposed normal matrix. Added uv coord test case for it. Fix to issue found by nenek - plain shaded solid objects should not be excluded from sorting. Added uv coord test case for it. Minor tweaks to hidden line angle defaults.
PreviousNext