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

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

1031. 请问node 在destroy的时候 不发出事件是否有什么特殊原因吗 [ 82%]

...来自: //开启节点destroy 事件 LayaPatch.Enable_NodeDestroyEvent = function(){ var oldDestroy = Laya.Node.prototype.destroy; Laya.Node.prototype.destroy = function(){ this.event('destroy'); oldDestroy.call(this); } } 2017-11-20 0 0 分享 微博 QZONE 微信 Monica - 知识达人 赞同来自:...

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

1032. 微信小游戏wxmin图片加载有点问题 [ 82%]

微信小游戏wxmin图片加载有点问题 MiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack){ var temp=tempFilePath.split("/"); var tempFileName=temp[temp.length-1]; var fileurlkey=readyUrl.split("?")[0]; var fileObj=null var fileObj=MiniFileMgr.getFileInfo(readyUrl); // 这行会导...

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

1033. 屏幕适配-对齐模式 [ 82%]

...ipt、TypeScript三种开发语言、LayaAirIDE让项目开发更高效。(function() { var Stage = Laya.Stage; (function() { Laya.init(100, 100); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.bgColor = "#232628...

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

1034. 引入Puremvc.js,编译没问题,运行时报错查不到 [ 82%]

...未被定义,需要把puremvc绑定到window上 if( typeof define === "function" ) {     define( "puremvc", [], function()     { var puremvc; (function (puremvc) { "use strict"; //... })(puremvc || (puremvc = {})); }) } //修改为: var puremvc=window.puremvc||(window.puremvc={}); (funct...

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

1035. "Background is not defined"怎么会没定义呢???求救 [ 82%]

...0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: Game.jsvar Game = (function(){ (function Game(){ Laya.init(600,800); this.bg = new window.Background(); Laya.stage.addChild(this.bg); })(); })();Background.js var Background = (function(_super){ function Background(){ Background.super(this); th...

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

1036. 移动Sprite时,边缘闪烁 [ 82%]

...imestamp = 0; var count = 0; var totale = 0; Laya.timer.frameLoop(1, this, function test() { var deltaTime = new Date().getTime() - lastTimestamp; lastTimestamp = new Date().getTime(); count++; totale += deltaTime; this.x += this.speed_x*deltaTime; this.y += this.speed_y*deltaTime; });用以上代...

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

1037. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 82%]

...创建一个MaskDemo.js入口程序,编写代码如下: ```javascript (function() { var Sprite = Laya.Sprite; var Texture = Laya.Texture; var Handler = Laya.Handler; var Res; var img; (function() { Laya.init(1136,640); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "...

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

1038. 缓动-时间线 [ 82%]

... var target:Sprite; private var timeLine:TimeLine = new TimeLine(); public function Tween_TimeLine() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Lay...

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

1039. laya.d3.component.AttachPoint [ 82%]

...否是鼠标事件。 EventDispatcher off(type:String, caller:*, listener:Function, onceOnly:Boolean = false):EventDispatcher 从 EventDispatcher 对象中删除侦听器。 EventDispatcher offAll(type:String = null):EventDispatcher 从 EventDispatcher 对象中删除指定事件类型的所有侦...

来源: laya_api 发布时间: 20170929

1040. laya.d3.math.Viewport [ 82%]

...public var y:NumberY轴坐标Constructor DetailViewport()Constructorpublic function Viewport(x:Number, y:Number, width:Number, height:Number) 创建一个 Viewport 实例。 Parameters x:Number — x坐标。  y:Number — y坐标。  width:Number — 宽度。  height:Number — 高度。 Method...

来源: laya_api 发布时间: 20170929