大约有 3,979 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0081 秒)
Laya_社区(2827) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(53)
... defined ReferenceError: window is not defined 我在网上找到方法 var window = window || global; var document = document || (window.document = {}); 加在代码最前面试试 试添加的位置是生成的微信项目里面的code.js 顶端 试了试 不行,添加后 微信开发工...
来源: Laya_社区 发布时间: 20181217
...on 赞同来自: class TextRender getFontSizeInfo 函数,最后部分 var xoff:int = Math.max( orix - pixelBBX[0], 0); var yoff:int = Math.max( oriy - pixelBBX[1], 0); var bbxw:int = pixelBBX[2] - pixelBBX[0]; var bbxh:int = pixelBBX[3] - pixelBBX[1]+1; 原来没有+1,都可以...
来源: Laya_社区 发布时间: 20191231
...这两个body组合起来。测试代码如下: function createBody() { var size = 200, x = 200, y = 200; var sp = new Laya.Sprite(); var text = Laya.loader.getRes("res/bar.png"); var w = size, h = size/5; sp.pivot(w/2, h/2); sp.graphics.fillTexture(text, 0, 0, w, h); partA = Matter.Bodies.rectang...
来源: Laya_社区 发布时间: 20180625
...么呢?3D不支持取图片中的一个图片吗? //2D加载图集 var texture: Laya.Texture = Laya.loader.getRes("magic/sg.png"); var sp = new Laya.Sprite(); sp.graphics.drawTexture(texture, 0, 0); Laya.stage.addChild(sp); //3D加载图集 var box: Laya.MeshSprite3D = scene.addChild(new La...
来源: Laya_社区 发布时间: 20180331
...'normalizedViewport',function(){ if (!this._viewportExpressedInClipSpace){ var vp=this._viewport; var size=this.renderTargetSize; var sizeW=size.width; var sizeH=size.height; this._normalizedViewport.x=vp.x / sizeW; this._normalizedViewport.y=vp.y / sizeH; this._normalizedViewport.width=vp.width / s...
来源: Laya_社区 发布时间: 20170601
...获取到了,也赋值了但是页面没跟新,addChild好像无效果 var fooddata = []; for (var X = 0; X < res.data.length; X++) { var foodid = res.data[X]['n_food_id']; var foodtxt = res.data[X]['n_number']; fooddata[X] = { food: { skin: 'comp/food' + foodid + '.png' }, food_txt: { text: ...
来源: Laya_社区 发布时间: 20181221
...tentBelow is a rendering of the page up to the first error." (function() { var Stage = Laya.Stage; var Text = Laya.Text; var WebGL = Laya.WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(200, 300, WebGL); Laya.stage.alignV = "middle"; Laya.stage.alignH = "center...
来源: Laya_社区 发布时间: 20171113
tween有这个一个bug 先创建一个timeline循环按钮动画 var timeLine = new Laya.TimeLine(); timeLine.addLabel("ZoomIn",0).to(share.btShare,{scaleX:0.9, scaleY:0.9},400,Laya.Tween.cubicOut,0) .addLabel("ZoomOut",0).to(share.btShare,{scaleX:1.0, scaleY:1.0},400,Laya.Tween.cubicOut,0); timeL...
来源: Laya_社区 发布时间: 20180118
...指定 URL 的文件名。 URLProperty DetailbasePathpropertypublic static var basePath:String基础路径。customFormatproperty public static var customFormat:Function 自定义url格式化。例如: customFormat = function(url:String):String{} pathproperty path:String [read-only] 地址的...
来源: laya_api 发布时间: 20170929
...ort laya.webgl.WebGL; public class Bootstrapper extends Sprite { protected var _list:List; protected var _items:Array; protected var _loadingBg:Sprite; public function Bootstrapper() { Laya.init(696, 1118, WebGL); Laya.stage.bgColor = "#232628"; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage...
来源: Laya_社区 发布时间: 20170323