C .
ODE
G
AMELET
# PixiGif Add [GIF](https://en.wikipedia.org/wiki/GIF) 89a (animated GIF) support for pixi.js. ## Getting Started Add GIF image alias to resourceManager as regular resources, and create a GifSprite by CG.PixiGif.createGifSprite(); ```typescript let resourceAlias = 'PixiGif.anim'; CG.Base.resourceManager.addAppResource(alias); CG.Base.resourceManager.load(() => { CG.Base.pixi.initialize(300, 300); // create a GifSprite, attach to pixi.root and play the animation let sprite = CG.PixiGif.createGifSprite(resourceAlias); CG.Base.pixi.root.addChild(sprite); sprite.play(); }); ``` You can setup custom sequences by any combination of frames. ```typescript let sprite = CG.PixiGif.createGifSprite(resourceAlias); sprite.addSequence('jump', [1,3,5]); // define a sequence named jump sprite.setSequence('jump', true); // set jump as the current sequence, and play ``` You can listen to events from GifSprite ```typescript let sprite = CG.PixiGif.createGifSprite(resourceAlias); sprite.on('frameChanged', (sp) => console.log('the frame is just changed')); sprite.on('complete', (sp) => console.log('the animation is complete and stopped')); sprite.on('play', (sp) => console.log('just starts playing the animation')); sprite.on('stop', (sp) => console.log('the animation is stopped')); sprite.on('end', (sp) => console.log('the animation plays to the end of the sequence')); ``` #### References - [GIF reader by Dean McNamee](https://github.com/deanm/omggif) - [GIF Format](http://www.onicos.com/staff/iz/formats/gif.html)
# TestFilePond A Test project for filepond. # FilePond (v1.8.8) A JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience. ### Basic Usage Make sure to load the css before creating FilePond Apps. ```typescript CG.Base.linkCSSFile(CG.Base.getAppResourceFileUrl('[YourProjectCode.Alias]', 'react-filepond-0/filepond.min.css')) ``` Create FilePond App. ```typescript let app: FilePond.AppAPI = FilePond.create(); document.body.appendChild(app.element); ``` Create FilePond with existing element. ```typescript let app: FilePond.AppAPI = FilePond.create(document.getElementById('theIdOfTheInput')); ``` With React Component ```typescript export class FilePondComp extends React.Component { render() { return ( <div> <FilePond.FilePond allowMultiple={true} maxFiles={3}> </FilePond.FilePond> </div> ); } } ``` ### Demo Project - [TestPondFile](https://code.gamelet.com/edit/TestFilePond) ## References [Official Site](https://pqina.nl/filepond) This lib includes the following github repositories - [filepond](https://github.com/pqina/filepond) - [react-filepond](https://github.com/pqina/react-filepond) - [filepond-plugin-file-encode](https://github.com/pqina/filepond-plugin-file-encode) - [filepond-plugin-file-metadata](https://github.com/pqina/filepond-plugin-file-encode) - [filepond-plugin-file-poster](https://github.com/pqina/filepond-plugin-file-poster) - [filepond-plugin-file-rename](https://github.com/pqina/filepond-plugin-file-rename) - [filepond-plugin-file-validate-size](https://github.com/pqina/filepond-plugin-file-validate-size) - [filepond-plugin-file-validate-type](https://github.com/pqina/filepond-plugin-file-validate-type) - [filepond-plugin-image-crop](https://github.com/pqina/filepond-plugin-image-crop) - [filepond-plugin-image-exif-orientation](https://github.com/pqina/filepond-plugin-image-exif-orientation) - [filepond-plugin-image-preview](https://github.com/pqina/filepond-plugin-image-preview) - [filepond-plugin-image-resize](https://github.com/pqina/filepond-plugin-image-resize) - [filepond-plugin-image-transform](https://github.com/pqina/filepond-plugin-image-transform) - [filepond-plugin-image-validate-size](https://github.com/pqina/filepond-plugin-image-validate-size)
ⒸCode.Gamelet.com | Privacy Policy | Terms of Service