当前位置: 首页 > news >正文

重庆的企业网站企业网站自助建设

重庆的企业网站,企业网站自助建设,一建 专业,廊坊网站自助建站纹理#xff08;Texture#xff09; 创建一个纹理贴图#xff0c;将其应用到一个表面#xff0c;或者作为反射/折射贴图。 构造函数 Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) // load a texture, set wrap…纹理Texture 创建一个纹理贴图将其应用到一个表面或者作为反射/折射贴图。 构造函数 Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) // load a texture, set wrap mode to repeat const texture new THREE.TextureLoader().load( textures/water.jpg ); texture.wrapS THREE.RepeatWrapping; texture.wrapT THREE.RepeatWrapping; texture.repeat.set( 4, 4 ); 属性 .id : Integer 只读 - 表示该纹理实例的唯一数字。 .uuid : String 该对象实例的UUID。 这个值是自动分配的因此不应当对其进行编辑。 .name : String 该对象的名称可选且无需唯一。默认值是一个空字符串。 .image : Image 一个图片对象通常由TextureLoader.load方法创建。 该对象可以是被three.js所支持的任意图片例如PNG、JPG、GIF、DDS或视频例如MP4、OGG/OGV格式。 要使用视频来作为纹理贴图你需要有一个正在播放的HTML5 Video元素来作为你纹理贴图的源图像 并在视频播放时不断地更新这个纹理贴图。——VideoTexture 类会对此自动进行处理。 .mipmaps : Array 用户所给定的mipmap数组可选。 .mapping : number 图像将如何应用到物体对象上。默认值是THREE.UVMapping对象类型 即UV坐标将被用于纹理映射。 请参阅texture constants映射模式常量来了解其他映射类型。 .wrapS : number 这个值定义了纹理贴图在水平方向上将如何包裹在UV映射中对应于U。 默认值是THREE.ClampToEdgeWrapping即纹理边缘将被推到外部边缘的纹素。 其它的两个选项分别是THREE.RepeatWrapping和THREE.MirroredRepeatWrapping。 请参阅texture constants来了解详细信息。 .wrapT : number 这个值定义了纹理贴图在垂直方向上将如何包裹在UV映射中对应于V。 可以使用与.wrapS : number相同的选项。 请注意纹理中图像的平铺仅有当图像大小以像素为单位为2的幂2、4、8、16、32、64、128、256、512、1024、2048、……时才起作用。 宽度、高度无需相等但每个维度的长度必须都是2的幂。 这是WebGL中的限制不是由three.js所限制的。 .magFilter : number 当一个纹素覆盖大于一个像素时贴图将如何采样。默认值为THREE.LinearFilter 它将获取四个最接近的纹素并在他们之间进行双线性插值。 另一个选项是THREE.NearestFilter它将使用最接近的纹素的值。 请参阅texture constants页面来了解详细信息。 .minFilter : number 当一个纹素覆盖小于一个像素时贴图将如何采样。默认值为THREE.LinearMipmapLinearFilter 它将使用mipmapping以及三次线性滤镜。 请参阅texture constants页面来了解所有可能的选项。 .anisotropy : number 沿着轴通过具有最高纹素密度的像素的样本数。 默认情况下这个值为1。设置一个较高的值将会产生比基本的mipmap更清晰的效果代价是需要使用更多纹理样本。 使用renderer.getMaxAnisotropy() 来查询GPU中各向异性的最大有效值这个值通常是2的幂。 .format : number 默认值为THREE.RGBAFormat 但TextureLoader将会在载入JPG图片时自动将这个值设置为THREE.RGBFormat。 请参阅texture constants页面来了解其它格式。 .internalFormat : String The default value is obtained using a combination of .format and .type. The GPU format allows the developer to specify how the data is going to be stored on the GPU. See the texture constants page for details regarding all supported internal formats. .type : number 这个值必须与.format相对应。默认值为THREE.UnsignedByteType 它将会被用于绝大多数纹理格式。 请参阅texture constants来了解其它格式。 .offset : Vector2 How much a single repetition of the texture is offset from the beginning, in each direction U and V. Typical range is 0.0 to 1.0. The below texture types share the first uv channel in the engine. The offset (and repeat) setting is evaluated according to the following priorities and then shared by those textures: color mapspecular mapdisplacement mapnormal mapbump maproughness mapmetalness mapalpha mapemissive mapclearcoat mapclearcoat normal mapclearcoat roughnessMap map The below texture types share the second uv channel in the engine. The offset (and repeat) setting is evaluated according to the following priorities and then shared by those textures: ao maplight map .repeat : Vector2 How many times the texture is repeated across the surface, in each direction U and V. If repeat is set greater than 1 in either direction, the corresponding Wrap parameter should also be set to THREE.RepeatWrapping or THREE.MirroredRepeatWrapping to achieve the desired tiling effect. Setting different repeat values for textures is restricted in the same way like .offset. .rotation : number 纹理将围绕中心点旋转多少度单位为弧度rad。正值为逆时针方向旋转默认值为0。 .center : Vector2 旋转中心点。(0.5, 0.5)对应纹理的正中心。默认值为(0,0)即左下角。 .matrixAutoUpdate : Boolean 是否从纹理的.offset、.repeat、.rotation和.center属性更新纹理的UV变换矩阵uv-transform .matrix。 默认值为true。 如果你要直接指定纹理的变换矩阵请将其设为false。 .matrix : Matrix3 纹理的UV变换矩阵。 当纹理的.matrixAutoUpdate属性为true时 由渲染器从纹理的.offset、.repeat、.rotation和.center属性中进行更新。 当.matrixAutoUpdate属性为false时该矩阵可以被手动设置。 默认值为单位矩阵。 .generateMipmaps : Boolean 是否为纹理生成mipmap如果可用。默认为true。 如果你手动生成mipmap请将其设为false。 .premultiplyAlpha : Boolean If set to true, the alpha channel, if present, is multiplied into the color channels when the texture is uploaded to the GPU. Default is false. Note that this property has no effect for ImageBitmap. You need to configure on bitmap creation instead. See ImageBitmapLoader. .flipY : Boolean If set to true, the texture is flipped along the vertical axis when uploaded to the GPU. Default is true. Note that this property has no effect for ImageBitmap. You need to configure on bitmap creation instead. See ImageBitmapLoader. .unpackAlignment : number 默认为4。指定内存中每个像素行起点的对齐要求。 允许的值为1字节对齐、2行对齐到偶数字节、4字对齐和8行从双字边界开始。 请参阅glPixelStorei来了解详细信息。 .encoding : number 默认值为THREE.LinearEncoding。 请参阅texture constants来了解其他格式的详细信息。 请注意如果在材质被使用之后纹理贴图中这个值发生了改变 需要触发Material.needsUpdate来使得这个值在着色器中实现。 .version : Integer 这个值起始值为0计算.needsUpdate : Boolean被设置为true的次数。 .onUpdate : Function 一个回调函数在纹理被更新后调用。 例如当needsUpdate被设为true且纹理被使用。 .needsUpdate : Boolean 将其设置为true以便在下次使用纹理时触发一次更新。 这对于设置包裹模式尤其重要。 方法 EventDispatcher方法在这个类上可以使用。 .updateMatrix () : null 从纹理的.offset、.repeat、 .rotation和.center属性来更新纹理的UV变换矩阵uv-transform .matrix。 .clone () : Texture 拷贝纹理。请注意。这不是“深拷贝”图像是共用的。 .toJSON ( meta : Object ) : Object meta -- 可选包含有元数据的对象。 将Texture对象转换为 three.js JSON Object/Scene formatthree.js JSON 物体/场景格式。 .dispose () : null 使用“废置”事件类型调用EventDispatcher.dispatchEvent。 .transformUv ( uv : Vector2 ) : Vector2 基于纹理的.offset、.repeat、 .wrapS、.wrapT和.flipY属性值来变换uv。 深度纹理DepthTexture 构造函数 DepthTexture( width : Number, height : Number, type : Constant, wrapS : Constant, wrapT : Constant, magFilter : Constant, minFilter : Constant, anisotropy : Number, format : Constant ) width -- 纹理的宽度。height -- 纹理的高度。type -- Default is THREE.UnsignedShortType when unsing DepthFormat and THREE.UnsignedInt248Type when using DepthStencilFormat. 请参阅type constants类型常量来了解其他选项。mapping -- 请参阅mapping mode constants映射模式常量来了解其他选项。wrapS -- 默认值是THREE.ClampToEdgeWrapping. 请参阅wrap mode constants包裹模式常量来了解其他选项。wrapT -- 默认值是THREE.ClampToEdgeWrapping. 请参阅wrap mode constants包裹模式常量来了解其他选项。magFilter -- 当一个纹素覆盖大于一个像素时贴图将如何采样。 其默认值为THREE.LinearFilter。请参阅magnification filter constants放大滤镜常量来了解其它选项。minFilter -- 当一个纹素覆盖小于一个像素时贴图将如何采样。 其默认值为THREE.LinearMipMapLinearFilter。请参阅minification filter constants缩小滤镜常量来了解其它选项。anisotropy -- 沿着轴通过具有最高纹素密度的像素的样本数。 默认情况下这个值为1。设置一个较高的值将会产生比基本的mipmap更清晰的效果代价是需要使用更多纹理样本。 使用renderer.getMaxAnisotropy() 来查询GPU中各向异性的最大有效值这个值通常是2的幂。format -- 这个值必须是DepthFormat默认值或者DepthStencilFormat。 请参阅format constants格式常量来了解详细信息。 属性 共有属性请参见其基类Texture。 —— 以下属性也是texture类中的一部分但在这里默认值不同。 .format DepthFormat默认值或者DepthStencilFormat中的一个。 请参阅format constants来了解详细信息。 .type Default is THREE.UnsignedShortType when unsing DepthFormat and THREE.UnsignedInt248Type when using DepthStencilFormat. 请参阅format constants来了解详细信息。 .magFilter 当一个纹素覆盖大于一个像素时贴图将如何采样。 其默认值为THREE.NearestFilter。 请参阅magnification filter constants放大滤镜常量来了解其他选项。 .minFilter 当一个纹素覆盖小于一个像素时贴图将如何采样。 其默认值为THREE.NearestFilter。 请参阅minification filter constants缩小滤镜常量来了解其他选项。 .flipY 深度贴图不需要被翻转因此其默认值为false。 .generateMipmaps 深度贴图不使用mipmap。 方法 共有方法请参见其基类Texture。 视频纹理VideoTexture 创建一个使用视频来作为贴图的纹理对象。 它和其基类Texture几乎是相同的除了它总是将needsUpdate设置为true以便使得贴图能够在视频播放时进行更新。自动创建mipmaps也会被禁用 // assuming you have created a HTML video element with idvideo const video document.getElementById( video ); const texture new THREE.VideoTexture( video ); 构造函数 VideoTexture( video : Video, mapping : Constant, wrapS : Constant, wrapT : Constant, magFilter : Constant, minFilter : Constant, format : Constant, type : Constant, anisotropy : Number ) video -- 将被作为纹理贴图来使用的Video元素。mapping -- 纹理贴图将被如何应用映射到物体上它是THREE.UVMapping中的对象类型。 请参阅mapping constants映射模式常量来了解其他选项。wrapS -- 默认值是THREE.ClampToEdgeWrapping. 请参阅wrap mode constants包裹模式常量来了解其他选项。wrapT -- 默认值是THREE.ClampToEdgeWrapping. 请参阅wrap mode constants包裹模式常量来了解其他选项。magFilter -- 当一个纹素覆盖大于一个像素时贴图将如何采样。 其默认值为THREE.LinearFilter。请参阅magnification filter constants放大滤镜常量来了解其它选项。minFilter -- 当一个纹素覆盖小于一个像素时贴图将如何采样。 其默认值为THREE.LinearMipmapLinearFilter。请参阅minification filter constants缩小滤镜常量来了解其它选项。format -- 在纹理贴图中使用的格式。 请参阅format constants格式常量来了解各个选项。type -- 默认值是THREE.UnsignedByteType. 请参阅type constants类型常量来了解其他选项。anisotropy -- 沿着轴通过具有最高纹素密度的像素的采样数。 默认情况下这个值为1。设置一个较高的值将会比基本的mipmap产生更清晰的效果代价是需要使用更多纹理样本。 使用renderer.getMaxAnisotropy() 来查询GPU中各向异性的最大有效值这个值通常是2的幂。   属性 共有属性请参见其基类Texture。 .needsUpdate : Boolean 在这里你不必手动设置这个值因为它是由update方法来进行控制的。 方法 共有方法请参见其基类Texture。 .update () : null 在每一次新的一帧可用时这个方法将被自动调用 并将.needsUpdate : Boolean设置为true。
http://www.hkea.cn/news/14445345/

相关文章:

  • 本科专业建设网站深情密码免费观看网站
  • 国外网站建设嫣语赋wordpress的视频封面能动
  • 新手做网站起步教程提供网站制作公司哪家好
  • 雅茂道网站建设做企业的网站的如何推广
  • 番禺定制型网站建设手机建立网站app
  • 通信公司网站建设惠州城市建设建筑网站
  • 江阳建设集团网站wordpress 怎么上传头像
  • 腾讯云 门户网站建设百度装修网站
  • 郑州制作网站价格网站更换服务器影响
  • 做外贸网站软工毕设做网站
  • 阜宁网站制作具体报价网站 栏目
  • pathon做网站wordpress图片不能居中
  • 网站设计一个页多少钱apache php mysql wordpress
  • 做色流网站在哪买网络科技公司logo设计
  • 网站开发维护任职要求美间在线设计平台
  • 网站的pdf预览是怎么做的17做网站广州新塘
  • 怎样在建设部网站查资质证书手机如何建设网站首页
  • 网站怎么防k中国十大策划公司排名
  • 秦皇岛营销式网站制作工信部网站报备
  • 做棋牌网站要什么源码最好的网站模板网站
  • 网站建设pad版本是什么wordpress 网站静态页面
  • 天津市建设教育培训中心网站wordpress 在线安装插件
  • 怎么在服务器上部署网站中国建设银行2024版本
  • 用asp.net做的网站网页设计实训报告
  • 微信分享的h5网站开发商城app开发价格
  • html5商城网站开发邯郸市城市建设局网站
  • 怎么样销售关于网站建设代备案网站
  • 霸州做网站shijuewang合肥百度关键词优化
  • dede学校网站番禺推广优化
  • dede做电影网站免费网站建设平台 iis