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

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

91. 我自己绘制的矩形如何以自身中心点旋转不能实现啊 [ 53%]

... sp.size(200,300); sp.pivot(sp.width/2,sp.height/2); sp.pos(200,200); Laya.timer.frameLoop(1,this,onLoopRotation,[sp]); } private function onLoopRotation(sp:Sprite):void { sp.rotation++; } } } 2017-09-05 0 0 分享 微博 QZONE 微信 pal 赞同来自: 这个方法不行啊 还是因为升级laya2.0...

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

92. 高级应用-闪光 [ 53%]

... new Laya.Vector3(0, 0, 0.5); var scaleDelta = 0; var scaleValue = 0; Laya.timer.frameLoop(1, this, loop); function loop() { scaleValue = Math.sin(scaleDelta += 0.01); pos1.elements[0] = pos2.elements[0] = scaleValue * 13; pos1.elements[1] = Math.sin(scaleValue * 20) * 2; pos2.elements[1] = Math.sin...

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

93. 输入设备-贪吃蛇(重力感应) [ 52%]

...ance.on(Laya.Event.CHANGE, this, monitorAccelerator); // 游戏循环 Laya.timer.frameLoop(1, this, animate); // 食物生产 Laya.timer.loop(3000, this, produceFood); // 游戏开始时有一个食物 produceFood(); })() function initSnake() { for (var i = 0; i 0) { var prevSeg = segments[segments....

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

94. 分享:IDE使用SWF动画的销毁与反复创建 [ 52%]

...          Laya.stage.addChild(testView);             Laya.timer.once(2000,this,onLoop,[testView]);         }         private function onLoop(testView:TestView):void         {             testView.mc.stop();             testView.mc.destroy();//销...

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

95. 灯光-方向光 [ 52%]

...play(null, 1.0, 40, 70); }); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); var _direction = directionLight.direction; Laya.Vector3.transformQuat(_direction, _quaternion, _direction); directionLig...

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

96. 输入设备-贪吃蛇(重力感应) [ 52%]

...ance.on(Event.CHANGE, this, this.monitorAccelerator); // 游戏循环 Laya.timer.frameLoop(1, this, this.animate); // 食物生产 Laya.timer.loop(3000, this, this.produceFood); // 游戏开始时有一个食物 this.produceFood(); } initSnake() { const Point = Laya.Point; for (let i = 0; i 0) { let...

来源: Laya2.0_示例 发布时间: 20251209

97. 新手的几个不解问题。 [ 52%]

...问题的说明 关于逻辑贞更新间隔机制、时间和其他一些Timer相关的问题 问题状态 最新活动: 2018-10-23 17:41 浏览: 4573 关注: 4 人

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

98. image.drawToCanvas方法获取的一直是空的png [ 51%]

...{ img=new Image(); img.skin="res/logo.png"; Laya.stage.addChild(img); Laya.timer.once(500,this,onClick); //Laya.stage.on(Event.CLICK,this,onClick); } private function onClick():void { var htmlCanvas:HTMLCanvas=img.drawToCanvas(100,100,0,0) as HTMLCanvas; var texture:Texture=new Texture(htmlCanvas); ...

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

99. 灯光-点光 [ 50%]

...sition = new Laya.Vector3(); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); Laya.Vector3.transformQuat(pointLight.transform.position, _quaternion, _position); pointLight.transform.position = _posi...

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

100. 材质-BlinnPhong-漫反射贴图 [ 50%]

...hreeDimen/texture/earth.png"); earth2.meshRender.material = material; Laya.timer.frameLoop(1, this, function () { earth1.transform.rotate(this.rotation, false); earth2.transform.rotate(this.rotation, false); });class BlinnPhong_DiffuseMap { private rotation: Laya.Vector3 = new Laya.Vector3(0, 0.01, ...

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