大约有 6,598 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0148 秒)
Laya_社区(5247) Laya3.0_api(482) Laya2.0_文档(363) Laya_示例(154) Laya2.0_示例(116) Laya3.0_文档(105) Laya2.0_api(67) laya_api(64)
...同来自: for (var i=0;i<100;i++) { var layaMonkey = scene.addChild(new Laya.MeshSprite3D(xxxx)); //加载材质 layaMonkey.meshRender.material = mat; layaMonkey.transform.localScale = new Laya.Vector3(0.3, 0.3, 0.3); layaMonkey.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.7071...
来源: Laya_社区 发布时间: 20180329
...leration = eventData.accelerationIncludingGravity'); __JS__('var curTime = new Date().getTime()'); __JS__('if ((curTime - last_update) > 100 && canShake == 1){var diffTime = curTime - last_update'); __JS__('last_update = curTime'); __JS__('x = acceleration.x'); __JS__('y = acceleration.y'...
来源: Laya_社区 发布时间: 20160110
...is.onLoadComplete)); } private onLoadComplete(): void { this.progressBar = new ProgressBar("res/ui/progressBar.png"); this.progressBar.width = 400; this.progressBar.x = (Laya.stage.width - this.progressBar.width) / 2; this.progressBar.y = Laya.stage.height / 2; this.progressBar.sizeGrid = "5,5,5,5";...
来源: Laya2.0_文档 发布时间: 20210715
...虚方法,使用时重写覆盖即可 */ onAwake(): void { this.curpos = new Laya.Vector3(); } /** * 第一次执行update之前执行,只会执行一次 * 此方法为虚方法,使用时重写覆盖即可 */ onStart(): void { this.camera = this.owner as Laya.Camera; if (this.target) { this.ta...
来源: Laya3.0_文档 发布时间: 20251010
对象引用问题 var aa:Sprite = new Sprite(); var bb:Sprite = aa; aa = null; trace(bb); 这种情况 bb 不是应该也为null?输出的bb不是null! 2017-03-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回...
来源: Laya_社区 发布时间: 20170302
...; module.exports = (pth, hash) => { if (!(pth && hash)) { throw new Error('`path` and `hash` required'); } return modifyFilename(pth, (filename, ext) => `${filename}-${hash}${ext}`); }; module.exports.revert = (pth, hash) => { if (!(pth && hash)) { throw new Error('`path` an...
来源: Laya_社区 发布时间: 20200831
... 在此文件中发送事件,如: this.event("TEST"); 在其他类中,new 出此类,但监听不到。如: var t:test = new test(); t.on("TEST", this, this.onTest); 是写法上有问题么? 2018-01-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...
来源: Laya_社区 发布时间: 20180105
...属性。 ```javascript //创建点光源 var pointLight = scene.addChild(new Laya.PointLight()) as Laya.PointLight; //设置点光源位置 pointLight.transform.position = new Laya.Vector3(0.4, 0.4, 0.0); //设置点光源的范围 pointLight.range = 6.0; ``` **range** 为设置点光源的范围...
来源: Laya2.0_文档 发布时间: 20210714
...片不可见,具体代码如下: let sp = new Laya.Sprite; sp.size(nImageWidth, nImageHeight); let b = new Laya.Texture2D(nImageWidth, nImageHeight); b.setPixels(data); ...
来源: Laya_社区 发布时间: 20200422
...cript //代码创建一个球体 var sphere2:MeshSprite3D = scene.addChild(new MeshSprite3D(PrimitiveMesh.createSphere(0.5))) as MeshSprite3D; //将创建的球放置在导出球的同一点 sphere2.transform.position = sphere.transform.position; //将创建的球平移 sphere2.transform.translate(n...
来源: Laya2.0_文档 发布时间: 20210715