@beanthealien/phantomjs
v1.0.25
Published
Phantom.js is a web API to simplify the webgame development proccess. Phantom.js supports both 2D and 3D games with readable and simple scripting!
Readme
PhantomJS
Phantom.js is a web API to simplify the webgame development proccess.
Phantom.js is a 2D game development API with readable and simple scripting.
Phantom.js is a side project, most of my focus is directed to GhostScript, so sorry for lack of attention on this. <3
Download
Avalible with npm!
npm install @beanthealien/phantomjsPhantom 2D v1.0.2 LEGACY
1.0.1
- Added PlayableCharacter.unbindAll().
1.0.2
- Fixed some errors of legacy usage of Scene.width(), Scene.height(), replaced with Scene.width, Scene.height. Docs
Phantom 2D v1.0.16 BETA
v1.0.1
- Open beta now open!
- Ported most legacy content
v1.0.2
- New
Localclass.
v1.0.3
- Added
wait,random.
v1.0.4
- Updated handling to use
PhantomEventType/EventType,PhantomEventHandle[]/EventHandle[]for event stores. - Deprecated
AudioMIME,Soundnow uses regularHTMLAudioElement(noHTMLSourceElement). (Note: you can still clarify themimeproperty to use the deprecated version)
v1.0.5
- Adjusted
Phantom2dEntity.setPosto have 2 overloads,(Vector)and(number, number). - Adjusted
Soundto serve a constructor withSoundOptionsand a constructor withSoundOptionsDeprecated(can test for deprecated opts withSoundOptionsIsSOD). - Added
SceneOptions.canvas: ... | string. Retrieves element, throwsNoCanvasErrorif it does not get an element. - Added
Phantom2dOptions,Presetoverloads forPhantom2dEntity.fromcalls. - Added
ErrRootclass. - Enhanced
randomto add(),(number)and(number, number).
v1.0.6
- Expanded
Cooldownto construct with(),(number),(boolean)and(number, boolean). - Added
Cookiesclass. - Minor structure changes.
v1.0.7
- Added
objIs. - The start to
Configare here! FilePicker,DirPickerto handle picking files/dirs.- (Most) classes have a static
ismethod that runsobjIs<PARENT_CLASS_TYPE>. SceneConfignow hasresolution,master,musicandsfxproperties.ImgConfignow hasrootproperty.
v1.0.8
- Minor structure changes to pickers.
- Added
ItemBox. - Fixed
Callback, addedPredicate,CallbackBase. Fixed descriptions accordingly. - Implemented
Img.config.root. - Added
Img.rebuild(string)to rebuild thesrc.
v1.0.9
- Added
EventManager,SceneEventManager,PhantomEventManagerfor optimization. - Added
Scene.__listenOn(EventType, EventHandle)andScene.__listenOff(EventType, EventHandle).
v1.0.10
- Added
chance(number),chance(number, number). - Added
bin/.
v1.0.11
- Changed
Phantom2dEntityto justEntity. - Added
LocalandSessionobjects (derived fromStorageRoot). DeprecatedLocal(nowLocalDeprecated).
v1.0.12
- Added
WallObject. (+published)
v1.0.13
- Added
Entity.initState,Entity.restoreInitState().
v1.0.14
- Added
Scene.screenshot(string, string?, number?). - Added
Clipboard. - Added
Tag,TagList.
v1.0.15
- Added further tag support (in
ScenewithfindByTag,hasByTag). - Added
Scene.some(PredicateEntity). - Added
ItemBox.filter(Predicate<T>),ItemBox.find(FindPredicate<T>),ItemBox.some(Predicate<T>). - Added
Items.find(FindPredicateEntity),Items.some(PredicateEntity).
v1.0.16
- Added
Vector.rotBtwn(Vector, Vector). - Added
Scene.rotBtwn(Entity, Entity). - Added
Scene.rotToMouse(Entity). - Added
SavedState,Entity.saveState(),Entity.restoreState(SavedState). - Changed
Entity.restoreInitState(and the associatedinitState) to use aSavedStatewithrestoreState. - Added
shallow<T>().
v1.0.17
- Added
PointAtComp,PointAtMouseComp. - Scene no longer assigns default
style="width: ...; height: .... (don't ask why it set it to "0px" before, I don't know) - Fixed some translation issues, fixed some handler function references.
- Fixed an error that caused
Runtimeto not discard its proccess ID. - Fixed an error that caused incorrect mouse position calculations.
- Fixed an error that caused the wrong angle to be returned when comparing entity-to-mouse. (originally mouse-to-entity)
- Updated documentation regarding the usage of
Sound.
v1.0.18
- Added
Scene.config.osnd = boolean. Checks for off-screen position before drawing. - Fixed an oversight in
Characterthat caused: no gravity updates to occur, no strength to be assigned and the gravity speed to not be updated. - Fixed an oversight in
Custom. - Need to fix an error that causes
Characters to fall throughWallObjects.
v1.0.18.1
- Fixed issue #2.
v1.0.18.2
- Fixed an oversight to properly cancel out
gravspdwhen grounded. - Added
get/setpropertyalphatoScene. - Updated
initcommand.
v1.0.19
- Added
onValueSetevent trigger to configs. - Added
ErrorEventlistener for scene.
v1.0.20
- Fixed
Character.onGroundissues. - Added
FloorObject. - Added
SceneOptions.border. - Updated
Sceneconstructor to not assigncanvas.widthandcanvas.heightto 0 if they are not passed. - Added
Scene.style(CSSStyleDeclaration)to streamline adding styles. - Added
Scene.center(),Scene.clientCenter().
v1.0.21
- Added
PhantomDestroyedEvent. BulletObjectnow firesPhantomDestroyedEventupon being destroyed.
v1.0.22
- Fixed the usage of
objIsto properly accept a constructor.
v1.0.23
- Added
EnhancedPhysicsComp. - Added
PhantomCompOptionsMapto enforce correctCompOptionsinstead of serving the defaultCompOptions. - Added
EnhancedPhysicsComp.fricto dampen velocity output. - Added cooldowns for key presses.
v1.0.23.1
- Fixed some oversights in
PlayabaleCharacter.bindCDhandling.
v1.0.24
- Updated some handling for components.
v1.0.24.1
- Updated
SoundOptionsIsSODto useo: SoundOptionsinstead ofo: any. - Added
tolproperty toBulletObject. - Added
Scene.onScrn.
v1.0.25
- FIxed
PlayableCharacter.bindCDhandling. - Published latest.
