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

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

1051. DirectionLight介绍(JavaScript-3D基础(JS)-LayaAir3D之灯光) [ 87%]

...常用来模拟固定方向的太阳光。 ```typescript //创建方向光 this.directionLight = this.scene.addChild(new Laya.DirectionLight()); //设置灯光颜色 this.directionLight.color = new Laya.Vector3(1, 1, 1); //设置灯光方向 var mat = this.directionLight.transform.worldMatrix; mat.s...

来源: Laya2.0_文档 发布时间: 20210715

1052. t._addReference is not a function [ 87%]

...解决了,供参考: Laya.loader.load(chapterBG, Laya.Handler.create(this, this.onBGLoaded, [chapterBG])/* , Laya.Handler.create(this, this.onBGLoadProgress) */); 第三个参数打开在某些条件下会出t._addReference is not a function 可能是加载进度回调的时候跑到纹理回调...

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

1053. 文本-位图字体 [ 87%]

...apFont(); bitmapFont.loadFont("../../res/bitmapFont/test.fnt", new Handler(this, onFontLoaded, [bitmapFont])); } function onFontLoaded(bitmapFont) { bitmapFont.setSpaceWidth(10); Text.registerBitmapFont(fontName, bitmapFont); createText(fontName); } function createText(font) { var txt = new Text(); ...

来源: Laya_示例 发布时间: 20260303

1054. bind函数的作用 [ 87%]

...rotobuf.load(["proto/game.proto", "proto/user.proto"], this.onProtoLoaded.bind(this)); a15715740412 • 2018-01-30 16:31 /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated wit...

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

1055. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 87%]

...vents.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //list赋值,先获得一个数据源数组 var arr = ; for (var i = 0; i < 100; i++) { arr.push({label: "item " + i, clip: i % 9,btn:"btn"+i}); } //给list赋值更改list的显示 this.list.array = arr; //给lis...

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

1056. 如何动态获取image的宽高? [ 87%]

如何动态获取image的宽高? var thisp:Point=new Point((this.width*this.scaleX)/2,(this.height*this.scaleY)/2); //thisp=this.globalToLocal(this.localToGlobal(thisp)); //trace(thisp.x,thisp.y,"dddddddd") var tf:Matrix=new Matrix(); tf.translate(-thisp.x,-thisp.y); __jd+=jd; tf.rotate(__jd); t...

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

1057. laya 2.7.0 iOS 阴影巨大 [ 87%]

...的链接 提交 3 个回复 一&漠 赞同来自:   // 阴影部分 this.light.shadowMode = Laya.ShadowMode.Hard; this.light.shadowDistance = 10; this.light.shadowNearPlane = 5; this.light.shadowDepthBias = 1; this.light.shadowNormalBias = 5; this.light.shadowResolution = 2048;   // 小米8 i...

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

1058. laya.utils.Timer [ 87%]

... args:Array = null):void 延迟执行。 Parameters caller:* — 执行域(this)。  method:Function — 定时器回调函数。  args:Array (default = null) — 回调参数。 clear()method  public function clear(caller:*, method:Function):void 清理定时器。 Parameters caller:* — 执行...

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

1059. 在ide中创建的一个movieClip,在代码中改变该mc的url,报错:this.mc.url is not a function [ 87%]

...ide中创建的一个movieClip,在代码中改变该mc的url,报错:this.mc.url is not a function 附件 : --> 2018-03-06 1 条评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: 好的 有问题再...

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

1060. Animation 先clear当前的动画, 然后从浏览器缓存 加载下一个动画会闪一下,这个怎么解决? [ 87%]

...! 别抢小虎 • 2018-05-08 10:51 /// 加载的时候是这样写的 this.anim.loadAtlas(source , null, cacheName); this.anim.scaleX = 1; this.anim.scaleY = 1; this.anim.pivotX = 0; this.anim.pivotY = 0; this.anim.interval = 30; this.anim.play(); 在加载这个动作以前我会先清理上一...

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