大约有 698 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0063 秒)
Laya_社区(336) Laya3.0_api(89) Laya2.0_api(69) Laya2.0_文档(65) laya_api(61) Laya3.0_文档(44) Laya2.0_示例(19) Laya_示例(15)
...assets/comp/haoyuobang-hui.png"; var img = new Laya.Sprite(); //实例 img.width = 300; //宽高 img.height = 200; switchImg(); img.on(Laya.Event.CLICK, this, switchImg) //点击事件 Laya.stage.addChild(img); function switchImg() { img.graphics.clear(); //清除绘制 var imgUrl = (this.flag = !th...
来源: Laya_社区 发布时间: 20180502
...s/tiledMap/orthogonal-test-movelayer.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this,onLoaded)); } //切记:设置tiledMap的宽高,需要在地图创建完成之后 private function onLoaded():void { var sp:Sprite=tiledMap.mapSprite() as Sprite;//为tiledMap...
来源: Laya_社区 发布时间: 20170419
...orld(input:Laya.Vector2):Laya.Vector2 { let ratioX = (input.x / Laya.stage.width); let ratioY = (input.y / Laya.stage.height); let clientWidth = Laya.stage.clientScaleX * Laya.stage.width let clientHeight = Laya.stage.clientScaleY * Laya.stage.height // let singleX = (Laya.Browser.width - clientW...
来源: Laya_社区 发布时间: 20180201
...ring;// = canvas.toTempFilePathSync(); canvas.toTempFilePath({ x: 0, y: 0, width: 1280, height: 720, destWidth: 1280, destHeight: 720, success:function(res:Object):void{ imagePath = res.tempFilePath;//这个就是截屏的图片地址,可以将图片生成到相册,也可以使用这个地址用...
来源: Laya_社区 发布时间: 20190515
...pe.loadImage("res/star.png"); Laya.stage.addChild(ape); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; ape.scale(0.3,0.3); ape.pivot(628,613); Laya.Tween.to(ape,{rotation:360},60000); 其中转一圈的时间设置为60s或者更长,native下卡顿是非常明显的,但在web下非常...
来源: Laya_社区 发布时间: 20180423
... vbArray = new Array<number>(); var texWidth: number = texture.width; var texHeight: number = texture.height; //定义颜色值,取值范围0~1 浮点。 const red: number = 1; ...
来源: Laya_社区 发布时间: 20170606
...); //适配模式 宽度100% Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_WIDTH; Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.stage.bgColor = "#ffffff";我暂时就是上面这么干的 让高度多一些满足iphoneX 这样点击区域就没 问题...
来源: Laya_社区 发布时间: 20180718
...tmapData(960, 640, false, 0xcccccc); var bmp:Bitmap = new Bitmap(bmd); bmp.width = 960; bmp.height = 640; var sp:Sprite = new Sprite(); sp.addChild(bmp); this.addChildAt(sp, 0); Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; sp.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin); } prote...
来源: Laya_社区 发布时间: 20160122
...到原因了, //var bounds = ani.getGraphicBounds(); //ani.pivot(bounds.width / 2, bounds.height / 2); 加了这个,第次创建会you有问题 2018-04-11 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 zjwytqm 相关问题 看了...
来源: Laya_社区 发布时间: 20180411
... = new Sprite(); mask.alpha = 0.3; mask.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); mask.on(Laya.Event.CLICK,this,chick); function chick(){ mask.destroy(); gameContainer.destroy(); } gameContainer.mask=mask; Laya.stage.addChild(gameContainer); })(); })(); 附...
来源: Laya_社区 发布时间: 20200603