大约有 6 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0049 秒)
...ntLight.addComponent(Laya.PointLightCom); pointLightCom.range = 2.0 + Math.random() * 8.0; pointLightCom.color.setValue(Math.random(), Math.random(), Math.random(), 1); pointLightCom.intensity = 6.0 + Math.random() * 8; moverLights[i] = pointLight; offsets[i] = new Vector3((Math.random() - 0.5) * 10...
来源: Laya3.0_文档 发布时间: 20251010
...lt; this._colorNums; i++) { let offset = i * 4; colorBuffer[offset] = Math.random(); colorBuffer[offset + 1] = Math.random(); colorBuffer[offset + 2] = Math.random(); colorBuffer[offset + 3] = 1; } //设置uniformbuffer this.batchMat.setBuffer("colormap", colorBuffer); } //随机生成_spriteNums数...
来源: Laya3.0_文档 发布时间: 20251010
... window.onclick = function() { // Fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // This gives us the actual ArrayBuffer that contains the data var nowBuffering = myArrayBuffer.getChannelData(channel); for (var i ...
来源: Laya3.0_文档 发布时间: 20251010
...(var i=0;i<10000;i++) { this.text=new Laya.Text(); this.text.text=(Math.random()*100).toFixed(0); this.text.color="#CCCCCC"; this.text.x=Math.random()*550; this.text.y=Math.random()*400; textBox.addChild(this.text); } Laya.stage.addChild(textBox); } } 下面是笔者电脑上的运行时截图,...
来源: Laya3.0_文档 发布时间: 20251010
...private addCone(): void { //生成随机值半径和高 let raidius = Math.random() * 0.2 + 0.2; let height = Math.random() * 0.5 + 0.8; //创建圆锥形3D模型节点对象 let cone = new Laya.Sprite3D; let coneMesh = cone.addComponent(Laya.MeshFilter); let coneRender = cone.addComponent(Laya.Mesh...
来源: Laya3.0_文档 发布时间: 20251010
.../组件被启用后执行 onEnable(): void { this._level = Math.round(Math.random() * 5) + 1; this._text = this.owner.getChildByName("levelTxt") as Laya.Text; this._text.text = this._level + ""; } //每帧更新时执行 onUpdate(): void { //让持续盒子旋转 (this.owner as Laya.Sprite).rotation...
来源: Laya3.0_文档 发布时间: 20251010