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

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

141. 能否对适配方案进行修改 [ 79%]

...ase SCALE_SHOWALL:                  canvasWidth = realWidth = Math.round(desginWidth * scaleX);                 canvasHeight = realHeight = Math.round(desginHeight * scaleY);                 var minScale:Number= Math.min(scaleX, scaleY);               ...

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

142. 微信小游戏提审后,提示说代码侵权 [ 78%]

...e = str.substr(len, str.length - len - 1); console.log(name); let number = Math.floor(Math.random() * 9999); let name2; let lastIndex = name.lastIndexOf("_"); if(lastIndex == -1){ name2 = name + "_" + number; }else{ name2 = name.substr(0, lastIndex) + "_" + number; } let name2s = name2 + "("; //phpC...

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

143. 请问如何获取触屏上两个或者更多位置的坐标 [ 78%]

...&& touches.length == 2) {                 this.preRadian = Math.atan2(                     touches[0].stageY - touches[1].stageY,                     touches[0].stageX - touches[1].stageX);                 Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouse...

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

144. 颜色滤镜 差值变化 [ 78%]

...{ let result = { r: -1, g: -1, b: -1 }; result.b = color % 256; result.g = Math.floor((color / 256)) % 256; result.r = Math.floor((color / 256) / 256); return result; } let result = spliceColor(color); let lastResult = spliceColor(lastColor); let colorMatrix = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1...

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

145. [LayaAirIDE3]咋么实现鼠标点击角色移动 [ 78%]

... { if (this.loadedClips.length > 0) { const clipPath = this.loadedClips[Math.floor(Math.random() * this.loadedClips.length)]; this.playMcClip(clipPath); } else { // 兜底:用 Animator2D 状态机 const idx = Math.floor(Math.random() * 8) + 1; this._animator?.play(`move${idx}`); } } /* --------...

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

146. js环境下使用Loader加载图片在Sprite对象的.on函数无效 [ 77%]

...Loading(progress)     {         console.log("加载进度: " + Math.floor(progress*100)+"%");     }     function onError(err)     {         console.log("加载失败: " + err);     }     function readnext(){         console.log("readnext");      ...

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

147. 鼠标交互-滑动 [ 77%]

...onMouseUp); } /**移到事件处理*/ function onMouseMove(e) { button.x = Math.max(Math.min(Laya.stage.mouseX, endPosition), beginPosition); } /**抬起事件处理*/ function onMouseUp(e) { Laya.stage.off(Event.MOUSE_MOVE, this, onMouseMove); Laya.stage.off(Event.MOUSE_UP, this, onMouseUp); Laya.s...

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

148. CameraMoveScript.as在哪儿下载群里的有错 [ 77%]

...a.d3.core.scene.BaseScene; import laya.d3.core.scene.Scene; import laya.d3.math.Quaternion; import laya.d3.math.Vector3; import laya.events.Event; import laya.events.KeyBoardManager; /** * ... * @author */ public class CameraMoveScript extends Script { protected var lastMouseX:Number; protected var ...

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

149. 动画不显示 [ 77%]

... laya.ui.TextArea;     import laya.resource.Texture;     import laya.maths.Point;     import laya.utils.Tween;     import laya.d3.resource.models.PrimitiveMesh;     import laya.debug.DebugPanel;     import laya.debug.DebugTool;     import laya.debug.ui.debugui.DebugPanelUI;   ...

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

150. 鼠标交互-滑动 [ 77%]

...his.onMouseUp); } /**移到事件处理*/ onMouseMove(e) { this.button.x = Math.max(Math.min(Laya.stage.mouseX, endPosition), beginPosition); } /**抬起事件处理*/ onMouseUp(e) { const Event = Laya.Event, Tween = Laya.Tween; Laya.stage.off(Event.MOUSE_MOVE, this, this.onMouseMove); Laya.stage.of...

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