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

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

91. 使用3D精灵 · LayaAir3.0文档 · LAYABOX [ 97%]

... 节点对象。 */ getChildByName(name: string): Node { for (let child of this._children) { if (child && child.name === name) return child; } return null; } 当我们找到子节点时,也可以对节点做一些基础操作,比如删除掉自己方法 removeSelf() /** * 从父容器删...

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

92. http无响应 [ 97%]

...ar LoginView = (function (_super) { function LoginView() { LoginView.super(this); //调用父类构造函数 this.dlg; } function connect() { var hr = new Laya.HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequestComplete); hr.once(Event.ERR...

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

93. DOM元素-表单输入 [ 97%]

...; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#fff"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing...

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

94. 鼠标交互-双指旋转(多点触控) [ 97%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let ...

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

95. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 97%]

碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) if(this.outHitInfo.distance < 0)speedX = speedZ = 0;  这个判断中的this.outHitInfo.distance 一直等于-1?  -------------------------------- class RoleControlScript extends Laya.Script{ /*角色模型*/ public roleModel...

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

96. 其他引擎的Demo-Example_21 [ 97%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#3da8bb"; Stat.show(); this.createCanvases(); Laya.timer.frameLoop(1, this, this.animate); Laya.stage.on('mousedown', this, this.onMouseDown); Laya.stage.on('mousemove', this, this.onMouseMove); Laya.stage.on('mouseup', this, this.onMouseUp); } cre...

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

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

...r; var WebGL = Laya.WebGL; function Segment(width, height) { Segment.super(this); Segment.prototype.init = function() { this.graphics.drawRect(-height / 2, -height / 2, width + height, height, "#FF7F50"); } // 获取关节另一头位置 Segment.prototype.getPinPosition = function() { var radian = t...

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

98. 修改了Scene下的WebGL参数导致渲染3D对象出现局部透明 [ 97%]

... 1 个回复 大饼干 赞同来自: /** * Renders the quad */ render() { this.gl.useProgram(this.program); this.gl.bindBuffer(Laya.WebGLContext.ARRAY_BUFFER, this.vertexPositionBuffer); this.gl.enableVertexAttribArray(this.vertexPositionAttribute); this.gl.vertexAttribPointer( this.vertexPositionAt...

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

99. 骨骼动画-多纹理 [ 97%]

...pineRes1/dragon.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { trace("error"); } function parseComplete() { //创建模式为1,可以启用换装 mArmature = mFactory.build...

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

100. "TS语言开发H5游戏微信飞机大战"中,为什么是用this.bg1.y+this.y来做判断呢? [ 97%]

"TS语言开发H5游戏微信飞机大战"中,为什么是用this.bg1.y+this.y来做判断呢? 如题,正确的代码是:onLoop():void{ this.y+=50; if (this.bg1.y+this.y>=852) { this.bg1.y-=852*2; } if (this.bg2.y+this.y>=852) { this.bg2.y-=852*2; } }我尝试的代码是: onLoop():...

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