Coder Social home page Coder Social logo

starling-video's Introduction

Starling-Video

A Video is a Quad with a texture mapped onto it. The Video class is more or less a Starling equivalent of Flash's Video class with attached NetStream. The texture is written automatically if not specified otherwise. Never the less you can use other DisplayObjects for rendering as well and or handle the drawing and uploading yourself if you want to.

Note: There are no controls for starting/stopping the video source in this class. This has to be done by controlling the netStream. If you start/stop the netStream, the video will recieve the Events of the netStream and handle the rest.

As "Video" inherits from "Quad", you can give it a color. For each pixel, the resulting color will be the result of the multiplication of the color of the texture with the color of the quad. That way, you can easily tint textures with a certain color. Furthermore flipping is simply done by adjusting the vertexData.

Uploading textures to the GPU is very expensive. This may be no problem on desktop computers but it is a big problem on most mobile devices. Therefore it is very important to chose the right resolution and texture size, as well as the method for drawing and uploading. If you use Flash 11.8 / AIR 3.8 (-swf-version=21) RectangleTextures are supported if necessary. Versions below will always fall back to Textue, so make sure to use the cropping rect parameter to avoid the upload of unused bytes.

Read more about performance of POT/NPOT Textures here:

http://www.flintfabrik.de/blog/camera-performance-with-stage3d

http://www.flintfabrik.de/blog/webcam-performance-with-stage3d-part-ii-rectangletextures-in-air-3-8-beta

http://www.flintfabrik.de/blog/webcam-performance-with-stage3d-part-iii-rectangletextures-in-air-3-8-beta-mobile

starling-video's People

Contributors

shin10 avatar

Watchers

Adnan Sehic avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.