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

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

841. 模拟石头下落过程不明抖动 [ 68%]

...se.linearOut,Laya.Handler.create(this,this.removeball,[ball])); Laya.stage.addChild( ball ); } } public removeball( ball:Laya.Sprite ){ Laya.stage.removeChild(ball); // console.log("rmove ball") } public getObj():Laya.Sprite { for( let i:number = 0 ; i < this.balls.length;i++ ){ if( !this.balls[i...

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

842. 天空穹不显示 [ 68%]

...loadScene("test/TestScene.scene"); //添加3D场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //添加照相机 var camera = (scene.addChild(new Laya.Camera(0, 0.1, 100))); camera.transform.translate(new Laya.Vector3(0, 3, 3)); camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, fa...

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

843. 使用laya官方示例代码制作微信小游戏无法显示 [ 67%]

...label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor; } Laya.stage.addChild(label); return label; } } } //初始化微信小游戏 Laya.MiniAdpter.init(); //程序入口 Laya.init(600, 400, WebGL); //激活资源版本控制 Laya.ResourceVersion.enable("version.json", Handler.create(null, be...

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

844. [LayaAir3]创建自由光源,形状是否有错误? [ 67%]

...      freelightLayer.y = startY + gap * 2;             this.owner.addChild(freelightLayer);              let freeStartX = 0;//startX + gap * 2;             let freeStartY = 0;//startY + gap * 2;             let freeformLight2D = freelightLayer.addComponent(Laya.FreeformLi...

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

845. 分享-js资源进度加载 [ 67%]

....onProgress)); } onProgress() { this.Progress = new Progress(); Laya.stage.addChild(this.Progress); //加载资源进度并且监听 Laya.loader.load(this.arr, Laya.Handler.create(this, this.onAssetsLoaded), Laya.Handler.create(this, this.onAssetsLoading, null, false)); } onAssetsLoading(progress) {...

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

846. webgl模式下对Panel组件旋转时Panel子对象显示错误的BUG! [ 67%]

...anelRotationTest(Laya.Sprite); testSpriteRotation.pos(300,260); Laya.stage.addChild(testSpriteRotation); var testPanelRotation:PanelRotationTest = new PanelRotationTest(Laya.Panel); testPanelRotation.pos(1000,260); Laya.stage.addChild(testPanelRotation); Laya.Tween.to(testPanelRotation,{rotation:720...

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

847. 怎么实现一个Timer的loop的delay时间越来越短? [ 67%]

...; sp=new Sprite(); sp.graphics.drawRect(0,0,200,200,"#FF0000"); Laya.stage.addChild(sp); Laya.timer.loop(delay,this,onLoop); } private function onLoop():void { delay-=50; sp.x+=20; Laya.timer.clear(this,onLoop); Laya.timer.loop(delay,this,onLoop); } 2017-06-26 0 0 分享 微博 QZONE 微信 为什...

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

848. 请问这是原因? [ 67%]

...hics.drawCircle(0,0,100,"#00CC33"); sprite.graphics = graphics; Laya.stage.addChild(sprite); //画一条直线,添加进圆 var sprite2:Sprite = new Sprite(); var graphics2:Graphics = new Graphics(); graphics2.drawLine(500,500,500,400,"#000000",2); sprite2.graphics = graphics2; Laya.stage.addChild...

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

849. 基于Cannon.js的物理系统(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 67%]

...annon.js** - 1.创建盒型MeshSprite3D ```typescript var box = this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(sX, sY, sZ))); ``` - 2.为精灵添加CannonRigidbody3D组件 ```typescript var rigidBody = box.addComponent(CannonRigidbody3D); ``` - 3.设置碰撞器形状 ```typescript //...

来源: Laya2.0_文档 发布时间: 20210715

850. laya.display.Sprite_API3.0 [ 67%]

...otY = 0;//设置 sprite 对象的垂直方法轴心点坐标。 Laya.stage.addChild(sprite);//将此 sprite 对象添加到显示列表。 sprite.on(Event.CLICK, this, onClickSprite);//给 sprite 对象添加点击事件侦听。 shape = new Sprite();//创建一个 Sprite 类的实例对象 sprite ...

来源: Laya3.0_api 发布时间: 20231115