大约有 4,671 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0119 秒)
Laya_社区(3819) Laya2.0_文档(255) Laya_示例(157) Laya3.0_文档(145) Laya3.0_api(132) Laya2.0_示例(119) Laya2.0_api(23) laya_api(21)
...varying vec3 v_Normal;\n" + "varying vec2 v_Texcoord;\n" + "uniform sampler2D u_texture;\n" + "void main(){\n" + "gl_FragColor=texture2D(u_texture, v_Texcoord);}\n";自定义材质class CustomMaterial extends Laya.BaseMaterial { static DIFFUSETEXTURE_ID: number = 1; constructor() { super(); this.set...
来源: Laya_社区 发布时间: 20170815
...oat; #endif varying vec3 v_Normal; varying vec2 v_Texcoord; uniform sampler2D u_Texture; void main() { gl_FragColor = texture2D(u_Texture, v_Texcoord); }` outlineShader.addShaderPass(outline_vs, outline_ps) outlineShader.addShaderPass(base_vs, base_ps) this.setShaderName("OutlineShader") this.getRen...
来源: Laya_社区 发布时间: 20180925
....js:39685) at Scene.__proto.renderSubmit (laya.d3.js:29827) at WebGLContext2D.__proto.submitElement (laya.webgl.js:5915) at WebGLContext2D.__proto.flush (laya.webgl.js:5937) at RenderContext.__proto.flush (laya.core.js:5982) at Stage.__proto.render (laya.core.js:18593) Utils3D._mulMatrixArray @ laya...
来源: Laya_社区 发布时间: 20180724
性能优化一、 内存优化方式1.1 通过对象池优化内存1.2 释放内存1.3 资源卸载1.4 关于滤镜、遮罩二、渲染优化方式2.1 优化Sprite2.2 优化DrawCall2.3 优化Canvas2.4 CacheAs2.5 文字描边2.6 跳过文本排版,直接渲染三、减少CPU使用量3.1 减少...
来源: Laya3.0_文档 发布时间: 20251010
# 屏幕适配的缩放模式详解 缩放模式是屏幕适配的重点内容,本篇从基础概念到参数说明,并结合代码实例帮助大家理解LayaAir引擎的屏幕缩放模式。在 API文档中,我们搜索laya.display.Stage,可以看到关于缩放模式的方法scaleMode...
来源: Laya2.0_文档 发布时间: 20200307
...moveEventListener(Event.ADDED_TO_STAGE, init); IFlash.setSize(960, 640); //2D项目中设置场景尺寸 IFlash.setOrientationEx(1); //是否为横屏模式 IFlash.setBgcolor("#000000"); //背景色 IFlash.showInfo(false); //是否显示帧率 //[IF-JS]value = 100; } } } 代码中使用LayaFlash...
来源: Laya_社区 发布时间: 20151218
...类,不允许实例。 Hierarchy Resource BaseTexture NativeRenderTexture2D RenderTexture2D RenderTexture TextureCube Texture2DArray Texture2D VideoTexture Index Constructors constructor Properties _id destroyedImmediately lock name url uuid DEBUG Accessors anisoLevel baseMipmapLevel compareMode c...
来源: Laya3.0_api 发布时间: 20231115
...2-1) 2.2 层级右键菜单中创建 层级管理(Hierarchy)面板的2D节点下,右键菜单里也可以直接创建UI组件,效果如图2-2所示。 (图2-2) 2.3 资源面板中拖拽 如果资源命名符合 UI 组件命名规则(具体规则可参见相关文档),则在将其拖拽...
来源: Laya3.0_文档 发布时间: 20251010
..._InfiniteBattleInfo = null; this._zombie_info_obj = null; this.m_fight_2d_root.destroy();//销毁场景 this.m_fight_2d_root = null; this.m_cur_scence.destroy();//销毁场景 this.m_cur_scence = null; Laya.Resource.destroyUnusedResources();//销毁无用资源(没有被场景树引用,并且没...
来源: Laya_社区 发布时间: 20191102
...e precision mediump float; #endif #include "Lighting.glsl"; uniform sampler2D u_MainTex; varying vec2 v_textcoord; void main() { vec4 col = texture2D(u_MainTex, v_textcoord); gl_FragColor = col; } `; var shader: Laya.Shader3D = Laya.Shader3D.add("CustomCurveShader"); var subShader: Laya.SubShader = ...
来源: Laya_社区 发布时间: 20201009