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

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

71. 材质-BlinnPhong-法线贴图 [ 57%]

...material.normalTexture = Laya.Texture2D.load(this.normalMapUrl[i]); } Laya.timer.frameLoop(1, this, function () { monster1.transform.rotate(this.rotation); monster2.transform.rotate(this.rotation); }); }class BlinnPhong_NormalMap { private scene:Laya.Scene; private rotation:Laya.Vector3 = new Laya.V...

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

72. 脚本组件继承于 Laya.Script。 其中的_update方法,多长时间会调用一次? 可以设置调用时间吗? [ 57%]

... 2017-11-09 1 2 分享 微博 QZONE 微信 ymsdandan 赞同来自: 你在Timer方法中可以找到这个只读方法可以知道调用间隔,但是不能设置调用时间 2017-11-09 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添...

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

73. 鼠标交互-键盘交互 [ 56%]

...; setup(); })(); function setup() { listenKeyboard(); createLogger(); Laya.timer.frameLoop(1, this, keyboardInspector); } function listenKeyboard() { keyDownList = []; //添加键盘按下事件,一直按着某按键则会不断触发 Laya.stage.on(Event.KEY_DOWN, this, onKeyDown); //添加键盘抬...

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

74. 内存优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 56%]

...E_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1, this, onFrame); this.createTime = 0; function onFrame() { //如果创建对象时间为100帧间隔后 if (this.createTime >= 100) { //每200帧间隔创建30个雪花 for (var i = 0; i 640 + 20 || img1.sca...

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

75. 2D物理-桥 [ 56%]

...cleBody.linearVelocity = { x: velocityX * 3, y: velocityY * 3 }; Laya.Laya.timer.frameOnce(120, this, function () { newBall.destroy(); }); }); let label = this.label = Laya.Laya.stage.addChild(new Laya.Label("单击屏幕产生新的小球刚体,击向bridge的随机位置")); label.top = 20; labe...

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

76. 我用as3调试的matter.js,刚体发生碰撞后不会旋转,我的代码在附件里 [ 56%]

...e.world, [   ground1,ground2,ground3,ground4]);             Laya.timer.loop(1000, this, add_F);         }         private function add_F():void         {             var rockOptions:Object = {                 stiffness: 1,                 ...

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

77. 内存优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 56%]

...E_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1, this, this.onFrame); } onFrame(): void { //如果创建对象时间为100帧间隔后 if (this.createTime >= 100) { //每200帧间隔创建30个雪花 for (var i: number = 0; i 640+20||img1.scaleX 在一些...

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

78. VR场景-VR地球 [ 56%]

... vrCamera.sky = skyBox; var rotation = new Laya.Vector3(0, 0.002, 0); Laya.timer.frameLoop(1, null, function() { earth.transform.rotate(rotation, true); });class VRScene1 { private rotation: Laya.Vector3; constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.sta...

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

79. 正交相机要怎么控制啊,坐标什么的全部懵!看了这个官方示例表示不懂,为什么还要转化为2D坐标? [ 55%]

...ord(translate, translate); layaMonkey.transform.position = translate; Laya.timer.frameLoop(1, this, function () { layaMonkey.transform.rotate(rotation); }); }); Laya.stage.on(Laya.Event.RESIZE, null, function () { camera.orthographicVerticalSize = Laya.RenderState.clientHeight; }); 2017-08-08 0 0 ...

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

80. 【简单跑酷--JS版】---Lv.3 添加地板 [ 55%]

...pe; _proto.init = function(type){ //创建一个帧循环处理函数 Laya.timer.frameLoop(1, this, this.onLoop); } //在地板上面添加物品 _proto.addItem = function(){ } _proto.onLoop = function(){ } })(); 因为是一个跑酷的游戏 所以 我们之前提到过 这个地板最好有一个...

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