大约有 2,023 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0063 秒)
Laya_社区(1419) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(39) Laya2.0_api(7) laya_api(6)
...String.prototype.format = function() { if (arguments.length == 0) { return this; } for (var str = this, index = 0; index < arguments.length; ++index) { str = str.replace("{" + index + "}", arguments[index]); } return str; }; var iframe = laya.utils.Browser.window.document.createElement('iframe');...
来源: Laya_社区 发布时间: 20170415
...ChangeMaterialDemo/Conventional/scene.ls")); //从场景获取球型精灵 this.sphere = scene.getChildByName("Sphere"); //获取球型精灵自带的BlinnPhong材质 billinMaterial = this.sphere.meshRenderer.material; ``` > 拿到材质之后,我们可以修改材质或者将这个材质给其他...
来源: Laya2.0_文档 发布时间: 20210715
...(x,y,width,height){ if (Render.isWebGL){ return RunDriver.getTexturePixels(this,x,y,width,height); }else { Browser.canvas.size(width,height); Browser.canvas.clear(); Browser.context.drawTexture(this,-x,-y,this.width,this.height,0,0); var info=Browser.context.getImageData(0,0,width,height); } return ...
来源: Laya_社区 发布时间: 20171201
... txt.color = "#ffffff"; Laya.stage.addChild(txt); txt.on(Event.MOUSE_DOWN, this, startScrollText); } /* 开始滚动文本 */ function startScrollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText)...
来源: Laya2.0_文档 发布时间: 20210714
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Sprite = Laya.Sprite, Tween = Laya.Tween; let terminalX = 200; let characterA = this.createCharacter("res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; let characte...
来源: Laya2.0_示例 发布时间: 20241118
...r WID = 375, HEI = 85; function RankListItem() { RankListItem.__super.call(this); this.size(WID, HEI); this.img = new Laya.Image(); this.addChild(this.img); this.setImg = function (src) { this.img.skin = src; } } Laya.class(RankListItem, "RankListItem", Laya.Box); //rankList var rankList = new Laya....
来源: Laya_社区 发布时间: 20180416
... 'clientWidth', get: function get() { var ret = parseInt(this.style.fontSize, 10) * this.innerHTML.length; return Number.isNaN(ret) ? this.width : ret; } }, { key: 'clientHeight', get: function get() { var ret = parseInt(this.st...
来源: Laya_社区 发布时间: 20180512
...码实现如下: var meshCollider=other; if (Collision.sphereContainsBox(this.boundSphere,meshCollider._boundBox)!==/*laya.d3.math.ContainmentType.Disjoint*/0){ var positions=meshCollider.mesh._positions; for (var i=0,n=positions.length;i < n;i++){ if (Collision.sphereContainsPoint(this.boundSp...
来源: Laya_社区 发布时间: 20181114
...r中使用Cannon.js** - 1.创建盒型MeshSprite3D ```typescript var box = this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(sX, sY, sZ))); ``` - 2.为精灵添加CannonRigidbody3D组件 ```typescript var rigidBody = box.addComponent(CannonRigidbody3D); ``` - 3.设置碰撞器形状 ```ty...
来源: Laya2.0_文档 发布时间: 20210715
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { this.createLabel("#FFFFFF", null).pos(30, 50); this.createLabel("#00FFFF", null).pos(290, 50); this.createLabel("#FFFF00", "#FFFFFF").pos(30, 100); this.createLabel("#000000", "#FFFFFF"...
来源: Laya_示例 发布时间: 20241118