|
@@ -12,9 +12,11 @@
|
|
|
<h1>视频纹理([name])</h1>
|
|
|
|
|
|
<p class="desc">
|
|
|
- 创建一个使用视频来作为贴图的纹理对象。<br /><br />
|
|
|
+ 创建一个使用视频来作为贴图的纹理对象。
|
|
|
+ </p>
|
|
|
|
|
|
- 它和其基类[page:Texture Texture]几乎是相同的,除了它总是将[page:Texture.needsUpdate needsUpdate]设置为*true*,以便使得贴图能够在视频播放时进行更新。自动创建[page:Texture.mipmaps mipmaps]也会被禁用。
|
|
|
+ <p>
|
|
|
+ Note: After the initial use of a texture, the video cannot be changed. Instead, call [page:.dispose]() on the texture and instantiate a new one.
|
|
|
</p>
|
|
|
|
|
|
<h2>代码示例</h2>
|
|
@@ -27,7 +29,13 @@ const texture = new THREE.VideoTexture( video );
|
|
|
|
|
|
<h2>例子</h2>
|
|
|
|
|
|
- <p>[example:webgl_materials_video materials / video ]</p>
|
|
|
+ <p>
|
|
|
+ [example:webgl_materials_video materials / video]<br />
|
|
|
+ [example:webgl_materials_video_webcam materials / video / webcam]<br />
|
|
|
+ [example:webgl_video_kinect video / kinect]<br />
|
|
|
+ [example:webgl_video_panorama_equirectangular video / panorama / equirectangular]<br />
|
|
|
+ [example:webxr_vr_video vr / video]
|
|
|
+ </p>
|
|
|
|
|
|
<h2>构造函数</h2>
|
|
|
<h3>[name]( [param:Video video], [param:Constant mapping], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Constant format], [param:Constant type], [param:Number anisotropy] )</h3>
|
|
@@ -47,7 +55,7 @@ const texture = new THREE.VideoTexture( video );
|
|
|
其默认值为[page:Textures THREE.LinearFilter]。请参阅[page:Textures magnification filter constants](放大滤镜常量)来了解其它选项。<br />
|
|
|
|
|
|
[page:Constant minFilter] -- 当一个纹素覆盖小于一个像素时,贴图将如何采样。
|
|
|
- 其默认值为[page:Textures THREE.LinearMipmapLinearFilter]。请参阅[page:Textures minification filter constants](缩小滤镜常量)来了解其它选项。<br />
|
|
|
+ 其默认值为[page:Textures THREE.LinearFilter]。请参阅[page:Textures minification filter constants](缩小滤镜常量)来了解其它选项。<br />
|
|
|
|
|
|
[page:Constant format] -- The default is [page:Textures THREE.RGBAFormat].
|
|
|
请参阅[page:Textures format constants](格式常量)来了解各个选项。<br />
|
|
@@ -69,7 +77,7 @@ const texture = new THREE.VideoTexture( video );
|
|
|
|
|
|
<h3>[property:Boolean generateMipmaps]</h3>
|
|
|
<p>
|
|
|
- Whether to generate mipmaps. False by default.
|
|
|
+ Whether to generate mipmaps. `false` by default.
|
|
|
</p>
|
|
|
|
|
|
<h3>[property:Boolean isVideoTexture]</h3>
|
|
@@ -79,7 +87,7 @@ const texture = new THREE.VideoTexture( video );
|
|
|
|
|
|
<h3>[property:Boolean needsUpdate]</h3>
|
|
|
<p>
|
|
|
- 在这里,你不必手动设置这个值,因为它是由[page:VideoTexture.update update]方法来进行控制的。
|
|
|
+ 在这里,你不必手动设置这个值,因为它是由[page:VideoTexture.update update]()方法来进行控制的。
|
|
|
</p>
|
|
|
|
|
|
<h2>方法</h2>
|