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

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

811. 真机调试 开启子域后 提示出现window is not defined [ 84%]

... defined ReferenceError: window is not defined   我在网上找到方法 var window = window || global; var document = document || (window.document = {}); 加在代码最前面试试 试添加的位置是生成的微信项目里面的code.js 顶端   试了试 不行,添加后 微信开发工...

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

812. LayaRender渲染含有多个part的Body存在Bug [ 84%]

...这两个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

813. 3D支持图集吗? [ 84%]

...么呢?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

814. normalizedViewport修改问题 [ 84%]

...'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

815. dialog 里的数据已经获取到了,也赋值了但是页面没跟新,addChild好像无效果 [ 84%]

...获取到了,也赋值了但是页面没跟新,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

816. 如何加载一个HTML页面 [ 84%]

...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

817. tween有这个一个bug [ 84%]

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

818. laya.net.URL [ 84%]

...指定 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

819. 鼠标穿透问题 [ 84%]

...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

820. laya.d3.component.AnimatorState [ 84%]

...public function set clip(value:AnimationClip):voidclipEndproperty public var clipEnd:Number = 1.0动作播放结束时间。clipStartproperty public var clipStart:Number = 0.0动作播放起始时间。nameproperty public var name:String名称。speedproperty public var speed:Number = 1.0动画...

来源: Laya2.0_api 发布时间: 20190513