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

大约有 741 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0055 秒)

51. Laya截图3D场景相关模型,导致模型透视! [ 83%]

...thographic = true; camera.orthographicVerticalSize = 5; this.effRes = Laya.Sprite3D.load(resUrl); this.effRes.on(Laya.Event.HIERARCHY_LOADED, this, function(){ this.eff1 = scene.addChild( Laya.Sprite3D.instantiate(this.effRes)); this.eff1.transform.position = new Laya.Vector3(0,0,50); this.eff1.tran...

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

52. Laya.Browser获取宽高数值会变化,iphone6第一次加载正确,刷新几次就变大了。 [ 83%]

...一个 private glow: Laya.GlowFilter = new Laya.GlowFilter; 然后给10个sprite用,当点击一个sprite时,在onclick事件中加上glow效果。但是运行就报错,都还没有点。 换个写发,给每个sprite设置滤镜时new 一个glow就可以。 debug 看到方法里面new出来...

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

53. this.bitmap.activeResource is not a function. [ 83%]

...; rankTexture.bitmap.alwaysChange = true;//小程序使用,非常费 let sprite = new Laya.Sprite(); sprite.graphics.drawTexture(rankTexture, 0, 0, rankTexture.width, rankTexture.height); this._content.addChild(sprite); sprite.pos(40, 190);报:this.bitmap activeResource is not a function 2019-09...

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

54. laya微信打包问题很多呀,就是加了一些绘图api,就报错 [ 83%]

...pi,报错如一楼图。添加绘图api代码如下 module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import WebGL = Laya.WebGL; export class Sprite_DrawShapes { private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.MiniAdpter.init(); Laya.init(740,...

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

55. 两个问题都关于LayaAir的ios真机 [ 83%]

... = stateMap[e.type]); } public static function addDark(target:laya.display.Sprite, isDark:Boolean = true):void { if (isDark) { // laya.ui.UIUtils.addFilter(target, DARK); target.filters=[ new ColorFilter([0.7, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 1, 0])]; } else { // laya.ui.UIUtil...

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

56. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 82%]

...办法降DrawCall package { import laya.display.Node; import laya.display.Sprite; import laya.maths.Rectangle; import laya.ui.Dialog; import laya.ui.Image; import laya.utils.Handler; import ui.TestDialogUI; import ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number ...

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

57. 用ide打包后的图片,Texture显示不出来? [ 82%]

用ide打包后的图片,Texture显示不出来? Sprite和Image可以显示出来,Texture报错、、、说找不到图片   代码 : Laya.loader.load([{url: "comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); function onLoaded(){     var aa = new Sprite();     Laya.sta...

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

58. js继承模式 [ 82%]

...ound'; window[className] = (function() { Laya.class(Class, className, Laya.Sprite); function Class() { Class.super(this); // this定义.. this.init(); } Class.prototype.init = function() { console.log(this); }; return Class; })(); } var __extends = (this && this.__extends) || function(d, b) ...

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

59. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 82%]

...eControlScript extends Laya.Script{ /*角色模型*/ public roleModel:Laya.Sprite3D; /*角色动画组件*/ public roleAni:Laya.Animator; /*角色当前动作*/ public currentAction:string = "stand"; /*角色动画是否完成*/ public aniComplete:Boolean = true; /*角色移动速度*/ public speed:...

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

60. Uncaught TypeError: Cannot read property 'XXX' of undefined [ 82%]

...ncaught TypeError: Cannot read property 'XXX' of undefined private var spe:Sprite; private function showApe():void {             spe = new Sprite();             spe.mouseEnabled = true;             spe.x = 100;             spe.y = 100;             spe.wid...

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