大约有 3,979 项符合查询结果, 库内数据总量为 30,902 项。 (搜索耗时: 0.0078 秒)
Laya_社区(2827) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(53)
...rototype.onButtonLogin = function (){ console.log ('按了登录按钮') var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.once(Event.PROGRESS,this,processHandler); var se...
来源: Laya_社区 发布时间: 20180824
两个构造函数怎么相互调用,使用对方的变量? A.js:var A=(function(){ function A(){ this.a=0; } })(); var a=new A(); B.js: var B=(function(){ function B(){ this.b=1; } })(); 我想在B.js文件中用A.js的属性a,该怎么操作,请大神帮帮小...
来源: Laya_社区 发布时间: 20190129
给mesh添加物理组件就报错 var mesh: Laya.MeshSprite3D = this.track._children[this.track.numChildren - 1]; var collider: Laya.PhysicsCollider = mesh.addComponent(Laya.PhysicsCollider); var shape: Laya.MeshColliderShape = new Laya.MeshColliderShape(); shape.mesh = mesh.meshFilter.sharedMes...
来源: Laya_社区 发布时间: 20190715
...同来自: zhang92tong Box,label,image都可以通过代码来创建 var box=new Laya.Box(); var image=new Laya.Image(); image.skin='res/001.png'; var label=new Laya.label(); label.text=' I am a Label!' box.addChild(image); box.addChild(label); Laya.stage.addChild(box); 2017-04-21 1 3 分享...
来源: Laya_社区 发布时间: 20170421
动画添加了 滤镜,drawcall 次数暴增,这是为啥???? var url = App.animManager.getUrl(id); this.ani.loadAtlas(url,null,id); this.ani.alpha = 0.5; this.ani.play(0, true); var grayMat = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]; //创建一个颜色滤镜对象...
来源: Laya_社区 发布时间: 20180515
...al as BlinnPhongMaterial).albedoTexture = renderTargetCamera.renderTarget; var boxMaterial:BlinnPhongMaterial = box.meshRenderer.material as BlinnPhongMaterial; //获取BlinnPhong材质的纹理 var tex:Texture2D = boxMaterial.albedoTexture as Texture2D; //获取相机渲染目标的像素数据,默...
来源: Laya2.0_文档 发布时间: 20210714
为什么动态设置聚光灯朝向无效呢 var tar = new Laya.Vector3(); var dir = new Laya.Vector3(); var src = model.transform.position; spotLight.transform.position = camera.transform.position; Laya.Vector3.subtract(src, camera.transform.position,tar); Laya.Vector3.normalize(tar, dir); spotLi...
来源: Laya_社区 发布时间: 20171105
为什么动态设置聚光灯朝向无效呢 var tar = new Laya.Vector3(); var dir = new Laya.Vector3(); var src = model.transform.position; spotLight.transform.position = camera.transform.position; Laya.Vector3.subtract(src, camera.transform.position,tar); Laya.Vector3.normalize(tar, dir); spotLi...
来源: Laya_社区 发布时间: 20171105
...4000,this,function(){ console.log(Browser.window.sharedCanvas) var rankTexture=new Texture(Browser.window.sharedCanvas); rankTexture.bitmap.alwaysChange=true; console.log(rankTexture) LayaUISample.scoreview.graphics.drawTexture(rankTexture,5,78,rankTexture.width,r...
来源: Laya_社区 发布时间: 20180310
直接new sprite 跟graphics.drawTexture 有什么区别 var downScoreTexture = Laya.loader.getRes("img/game/kc/score.png"); var _downScore = new Sprite(); _downScore.pos(150,130); _downScore.graphics.drawTexture(downScoreTexture); touPane.addChild(_downScore); 这个东西,跟 直接new sprite ...
来源: Laya_社区 发布时间: 20170811