Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krilnon/as3lytro
An ActionScript library for all things Lytro.
https://github.com/krilnon/as3lytro
Last synced: about 2 months ago
JSON representation
An ActionScript library for all things Lytro.
- Host: GitHub
- URL: https://github.com/krilnon/as3lytro
- Owner: krilnon
- Created: 2011-11-09T09:28:48.000Z (about 13 years ago)
- Default Branch: main
- Last Pushed: 2020-07-17T17:10:18.000Z (over 4 years ago)
- Last Synced: 2024-08-03T05:05:27.402Z (5 months ago)
- Language: ActionScript
- Homepage:
- Size: 238 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-actionscript-sorted - as3lytro - An ActionScript library for all things Lytro. (Unsorted / Other API)
README
# An ActionScript library for all things Lytro
Right now, it reads .lft files and you can display the various bitmaps within in Flash Player.
In the future, it'll hopefully be able to do more than Lytro's own viewer.
Based off of the two existing, open-source .lfp parsers that were around when this AS3 version began:
* [https://github.com/DamonOehlman/lytroview](https://github.com/DamonOehlman/lytroview)
* [https://github.com/nrpatel/lfptools](https://github.com/nrpatel/lfptools)## Usage
### Synchronous Decoding
```actionscript
var pic:LightFieldPicture = LFPDecoder.decode(bytes)
var s:LightFieldSprite = new LightFieldSprite(pic)
addChild(s)
```### Asynchronous Decoding
```actionscript
LFPDecoder.decodeAsync(bytes, onLFPComplete)function onLFPComplete(picture:LightFieldPicture):void {
var s:LightFieldSprite = new LightFieldSprite(picture)
addChild(s)
}
```