• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 79 项符合查询结果, 库内数据总量为 30,958 项。 (搜索耗时: 0.0047 秒)

51. 分享水波一个shader [ 66%]

... import BaseTexture = Laya.BaseTexture; export default class Test1Material extends BaseMaterial { public readonly MAIN_TEX:number = Shader3D.propertyNameToID("u_MainTex"); public readonly NOISE_TEX:number = Shader3D.propertyNameToID("u_NoiseTex"); public readonly Time:number = Shader3D.propertyNameT...

来源: Laya_社区 发布时间: 20190923

52. 微信小游戏加载资源问题 [ 66%]

...niFileMgr.DESCENDING = 2; MiniFileMgr.NUMERIC = 16; class MiniSoundChannel extends Laya.SoundChannel { constructor(audio, miniSound) { super(); this._audio = audio; this._miniSound = miniSound; this._onEnd = MiniSoundChannel.bindToThis(this.__onEnd, this); audio.onEnded(this._onEnd); } static bindTo...

来源: Laya_社区 发布时间: 20200103

53. FontChip不能显示 [ 65%]

...ue = "a1326";//显示"a1326"文字      */     public class FontClip extends Clip {         /**数值*/         protected var _valueArr:String;         /**文字内容数组**/         protected var _indexMap:Object;         /**位图字体内容**/         ...

来源: Laya_社区 发布时间: 20180414

54. LayaAir能做RPG吗?不要问我能不能,因为我已经在做 - 杀意来袭 [ 65%]

...错,这个时候借用下any吧,如: classA implements IA{ } classB extends classA{ } var items:IA = ; function(item:classB):void {  //items.push(item);//报错,提示类型错误  //方案一  items.push(<any>item);  //方案二  var temp:IA = <IA>item;  items.push(temp); ...

来源: Laya_社区 发布时间: 20161109

55. 分享:简单聊天室 [ 63%]

...port laya.utils.Browser; import ui.test.HtmlPageUI; public class HtmlView1 extends HtmlPageUI { private var str:String; private var str2:String; private var isSend:Boolean=false; public function HtmlView1() { super(); // 文本样式一 str="<span color='blue' style=' font" + ":18px 华文琥珀'...

来源: Laya_社区 发布时间: 20170107

56. Laya中的宏编译要怎么用啊 [ 63%]

...flash.display.StageScaleMode; import flash.events.Event; public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); this.stage.s...

来源: Laya_社区 发布时间: 20151106

57. LayaAir IDE 1.4.0新增功能 附加(扩展)脚本的使用 [ 63%]

...逻辑代码package game { import laya.display.Animation; public class Ani extends Animation { private var _isSlow:Boolean=true; public function Ani() { } public function get isSlow():Boolean { return _isSlow; } //isSlow:是否放慢速度 public function set isSlow(value:Boolean):void { _isSlow=v...

来源: Laya_社区 发布时间: 20161014

58. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 62%]

...搜索无果,想请教如何做才能实现。 export default class CMat extends Laya.BaseMaterial { public static _mainTex : number; public static _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); ...

来源: Laya_社区 发布时间: 20190814

59. 角色模型的材质列表切换后,不播放动作了 [ 61%]

...=texture2D(u_texture, v_Texcoord);}\n";自定义材质class CustomMaterial extends Laya.BaseMaterial { static DIFFUSETEXTURE_ID: number = 1; constructor() { super(); this.setShaderName("CustomShader"); } public getDiffuseTexture(): Laya.BaseTexture { return this._getTexture(CustomMaterial.DIFFUSETEX...

来源: Laya_社区 发布时间: 20170815

60. 描边Shader,使用了两个Pass [ 61%]

...截图如下:   核心代码如下 export default class OutlineMaterial extends Laya.BaseMaterial { constructor() { super() var attributeMap = { 'a_Position': Laya.VertexMesh.MESH_POSITION0, 'a_Normal': Laya.VertexMesh.MESH_NORMAL0, 'a_Texcoord': Laya.VertexMesh.MESH_TEXTURECOORDINATE0, } var uni...

来源: Laya_社区 发布时间: 20180925