Skip to content

Z.VideoTexture

The Z.VideoTexture object represents an video file loaded for use as a texture on an object. For more information see the video article.

The following format is supported:

  • OGG Theora without audio

Both dimensions of the video file must be an even power-of-two number of pixels in size, for example 256px x 128px.

Mobile devices have significant hardware limitations that affect video playback as a texture. For this reason the following recommendations are made:

  • Do not use video files above 256px by 256px is size
  • Avoid playing more than one Z.VideoTexture at once
var myvideo = Z.VideoTexture("snakes.ogv");
var myplane = Z.Object("plane.aro");
myplane.skin(myvideo);
myvideo.start();