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

大约有 4,111 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0211 秒)

751. 引用的类库问题 [ 90%]

...用的类库问题 var ViewStack=(function(_super){ function ViewStack(){ this._items=null; this._selectedIndex=0; ViewStack.__super.call(this); this._setIndexHandler=Handler.create(this,this.setIndex,null,false); } __class(ViewStack,'laya.ui.ViewStack',_super); 1. ViewStack.__super.call(this); 2. _...

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

752. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 90%]

...rite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(laya.physics.BoxCollider); box.height =...

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

753. 获取动态更新的文本内容 [ 90%]

...用frameloop重复执行加载文本资源函数 1 Laya.stage.frameLoop(1,this,this.Repeat,null,true); 这是加载资源的函数内的代码 1 2 3 4 5 6 7 8 loadPosition():void{ /* let resArray:Array<any>=[ {url:"eyeimf.txt",type:Laya.Loader.TEXT} ] Laya.loader.load(resArray,Laya.Handler.cre...

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

754. JQ集成到Laya二次封装 [ 90%]

...===================== JQ(aWater).on('click', function () { console.log( JQ(this).index() );//不传 匹配父级元素下的子元素开始算索引 // console.log( JQ(this).index(aWater) );//传数组,从当前数组开始算索引 // console.log( JQ(this).siblings(aWater).remove() );//指定数...

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

755. Laya2.7.1 射线提示rayCast未定义 [ 90%]

...ass 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(new Laya.Vector3(0, 0.7, 5)); this.camera.transform.rotat...

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

756. 微信小游戏截图问题 [ 90%]

...ight: canvas.height, destWidth: canvas.width, destHeight: canvas.height }) this.ctx.graphics.loadImage(wxhtmlC, 0, 0,this.ctx.width,this.ctx.height); 然后用drawTextture,很多问题都是有这个,可以带到下面那些东西怎么转成图片呢? var htmlC = Laya.stage.drawToTexture(Laya...

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

757. 3D场景跳转到2D场景问题 [ 90%]

...代码: onCollisionEnter(other){ if(other.other.owner.name==="end"){ // this.owner.parent.removeSelf(); //删除自身场景 console.log(this.owner.parent) console.log(this.owner.parent.parent); //创建胜利的UI界面 let victoryScene=new VictoryScene(); Laya.stage.addChild(victoryScene);   th...

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

758. 单选框组容器组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 90%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.radiogroup.pos(100, 100); this.radiogroup.labels = "label0,label1,label2"; this.radiogroup.space = 20; this.radiogroup.selectedIndex = 0; this.radiogroup.direction = "vertical"; } } 二、创建自定义的RadioGroup组件...

来源: Laya3.0_文档 发布时间: 20251016

759. UI-Input [ 90%]

...ng", "../../res/ui/input (4).png"]; Laya.loader.load(skins, Handler.create(this, onLoadComplete)); //加载资源。 })(); function onLoadComplete() { for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Lay...

来源: Laya_示例 发布时间: 20260303

760. LayaAir2.6.0版阴影系统如何使用,请教请教! [ 90%]

...请教请教! 我添加了方向光: //添加方向光         this.m_light = this.m_scene3D.addChild(new Laya.DirectionLight()) as Laya.DirectionLight;         this.m_light.color = new Laya.Vector3(0.8, 0.8, 0.8);         this.m_light.transform.worldMatrix.setF...

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