zepr.ts
v0.3.1
Published
A simple HTML5 rendering engine
Downloads
2
Readme
zepr.ts v0.3.0
A simple HTML5 rendering engine
Installation
Run the following command inside your project directory to install
npm install zepr.ts
Usage
In your source code, simply add
import Zepr = require('zepr.ts');
API Documentation
Online
API documentation is available here
Do it yourself (from source code)
Install TypeDoc
npm install --global typedoc
In the project, run
typedoc --out ./dist/docs/ --mode file --name "zepr.ts | An HTML5 rendering engine"
Changelog
0.3.1 - 2019.05.01
- BugFix Security (dependencies)
0.3.0 - 2019.04.20
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
0.2.3 - 2019.03.25
- Improvement for background image position
0.2.2 - 2019.03.17
- BugFix Ignore unparsable json answer in
Zepr.Net
0.2.1 - 2019.02.08
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)
0.2.0 - 2019.02.07
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 shapesRectangle
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)
0.1.5 - 2018.11.25
- BugFix Forgotten loader
0.1.4 - 2018.11.25
Refactoring of sprite
Sprite
is now an interface- moved implementation to
RawSprite
abstract class Sprite
now useShape
rather thanRectangle
0.1.3 - 2018.11.04
- Refactoring of geometry, new functions for
Vector
- Added centered background
0.1.2 - 2018.10.28
- Added rotation to
Vector
0.1.1 - 2018.10.27
- Added
Shape
interface andCircle
implementation - Added rotation to
ImageSprite
0.1.0 - 2018.10.20
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
0.0.9 - 2018.09.09
- Resource loader with default (basic) loader screen
0.0.8 - 2018.09.05
- Improvements for Sound class, ready for Chrome 70 autoplay policy
- New method
setZoom()
0.0.7 - 2018.08.16
- BugFix [again] Touch zoom (completely removed 'passive' Chrome warning)
- Prevents concurrent drag + zoom
0.0.6 - 2018.08.15
- BugFix Touch zoom (no more zoom reset + removed browser warning)
0.0.5 - 2018.07.01
- BugFix AudioContext problem with Safari
0.0.4 - 2018.06.18
- Added support for typeDoc
- Minor API corrections
- New method
scale()
on Rectangle
0.0.3 - 2018.06.11
- BugFix TouchEvent problem with Firefox
0.0.2 - 2018.06.09
- Added zoom control
- Added screen cache
- Removed name for Screen and Sprite classes
0.0.1 - 2018.06.03
- First published release