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

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

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

...逻辑代码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

62. Laya2.7.1 射线提示rayCast未定义 [ 69%]

Laya2.7.1 射线提示rayCast未定义 export default class click3d extends Laya.Script3D{ constructor() { super(); //创建场景 this.scene = Laya.stage.addChild(new Laya.Scene3D()); //添加相机 this.camera = (this.scene.addChild(new Laya.Camera(0, 0.1, 100))); this.camera.transform.translate(...

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

63. 分享一个Shader版的CoolDown实现 [ 68%]

...mport Shader = laya.webgl.shader.Shader;     export class coolDownShader extends Shader {         /**          * 当前着色器的一个实例对象。          */         public static shader: coolDownShader = new coolDownShader();         constructor() {             ...

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

64. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 68%]

...ild(this.text); } } //激活启动类 new MultiTouch(); class MonkeyScript extends Laya.Script3D{     private _scene:Laya.Scene3D;     private _text:Laya.Text;     private _camera:Laya.Camera;     private rotation:Laya.Vector3;     private lastPosition:Laya.Vector2;     priva...

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

65. 分享水波一个shader [ 68%]

... 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

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

...搜索无果,想请教如何做才能实现。 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

67. tiledmap 可以在图块层的指定格子上添加Sprite吗 [ 68%]

...owGridList不存在,需要在libs/LayaAir.d.ts里,找到class MapLayer extends Sprite这一行,在下面加上 _showGridList: Array<any>;即可 wu语 • 2018-08-07 19:51 1.7.19.1版本不行

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

68. 分享,扩展Laya.Text组件实现简单的富文本 [ 68%]

...和渲染函数以实现自定义的富文本类型) */ export class Label extends Laya.Text { constructor() { super(); } private typeList = {}; //取出文本里面的关键字 private typeIndexList = ; //关键字所在文本的位置 private typeLines = ; //利用关键字重新划分文本 priva...

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

69. Laya中的宏编译要怎么用啊 [ 68%]

...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

70. 扇形遮罩画不全画了一个很奇怪的形状但是矩形的就没问题。显示效果如下:版本号1.7.10 [ 67%]

...ize;     import laya.ui.Image;          public class ProcessTimer extends Sprite     {         public var img:Image;         public var maskSp:Sprite;         public var percent:Number;         public var type:String = "PROGRESS_TIMER_TYPE_RADIAL";         p...

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