A simple HTML5 rendering engine
Run the following command inside your project directory to install
npm install zepr.ts
In your source code, simply add
import Zepr = require('zepr.ts');
API documentation is available here
Install TypeDoc
npm install --global typedoc
In the project, run
typedoc --out ./dist/docs/ --mode file --name "zepr.ts | An HTML5 rendering engine"
- BugFix Security (dependencies)
Major Refactoring of mouse events
- Core engine is now the
Core
class. It managesScreen
andSprite
with no controls -
Engine
is a derived class ofCore
that manages mouse/touch controls (Same scope as before) - New
Clickable
interface forSprite
s. Engine can now delegate click events toSprite
s (seeEngine.enableMouseControl()
) - Changed the way mouse events are managed : Events are taken into account when they occur (Used to be at next frame). Needed for next new feature
- Added helper for fullscreen mode. Must be called on user gesture (Should be in
Screen.onClick()
orSprite.onClick()
method) - BugFix No more passive events for mouse control
- Improvement for background image position
- BugFix Ignore unparsable json answer in
Zepr.Net
Refactoring of ImageSprite
- View centered on image rather than on underlying shape (In order to use other shapes than
Rectangle
) - Added
Circle
as a possible underlying shape - removed useless
getRect()
method (same usage as inheritedgetShape()
method)
Major refactoring. The goal is to simplify integration of the p2.js 2D physics engine
- New geometric functions (Mostly on
Vector
andRectangle
) -
Shape
implementations can now rotate, with updated collision detection between shapes -
Rectangle
is centered. The static methodRectangle.asRect()
was added to create aRectangle
with its upper-left vertice coords (as in Zepr 0.1.x) - All implementations of
Sprite
were updated accordingly. Collisions with rotatedImageSprite
are now properly managed - BugFix Coordinates were mistakenly rounded (Misuse of bit shift operations)
- BugFix Forgotten loader
Refactoring of sprite
-
Sprite
is now an interface - moved implementation to
RawSprite
abstract class -
Sprite
now useShape
rather thanRectangle
- Refactoring of geometry, new functions for
Vector
- Added centered background
- Added rotation to
Vector
- Added
Shape
interface andCircle
implementation - Added rotation to
ImageSprite
New elements for a new project
- Added overflow mode (scene is full screen and scrollable)
- Added simple
Sprite
wrapper forText
- Added accessors to unified cache (No more screen cache)
- BugFix NaN on direction for
TiledSprite
- Resource loader with default (basic) loader screen
- Improvements for Sound class, ready for Chrome 70 autoplay policy
- New method
setZoom()
- BugFix [again] Touch zoom (completely removed 'passive' Chrome warning)
- Prevents concurrent drag + zoom
- BugFix Touch zoom (no more zoom reset + removed browser warning)
- BugFix AudioContext problem with Safari
- Added support for typeDoc
- Minor API corrections
- New method
scale()
on Rectangle
- BugFix TouchEvent problem with Firefox
- Added zoom control
- Added screen cache
- Removed name for Screen and Sprite classes
- First published release