大约有 4,102 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0325 秒)
Laya_社区(3323) Laya2.0_文档(296) Laya_示例(141) Laya2.0_示例(117) Laya3.0_文档(116) Laya3.0_api(94) Laya2.0_api(9) laya_api(6)
...请: 与内容相关的链接 提交 1 个回复 183*****755 赞同来自: this.scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; this.camera = (this.scene.addChild(new Laya.Camera(0, 1, 1000))) as Laya.BaseCamera; this.camera.transform.translate(new Vector3(0, 0, 500)); 这样用即可...
来源: Laya_社区 发布时间: 20161017
...ect(0,0,100,100,'#ff0000'); Laya.stage.addChild(redBox); redBox.on("click",this,function(){ trace("click redbox"); }); redBox.on("mouseover",this,function(){ redBox.graphics.clear(); redBox.graphics.drawRect(0,0,100,100,'#00ff00'); }); redBox.on("mouseout",this,function(){ redBox.graphics.clear(); r...
来源: Laya_社区 发布时间: 20170710
...; constructor() { super(); } //组件被启用后执行 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....
来源: Laya3.0_文档 发布时间: 20251010
...数执行两次!!! Laya.loader.create("Main/SMain.ls",Laya.Handler.create(this,this.on3DComplete),Laya.Handler.create(this,this.onProgress,null,false)); Manager.prototype.onProgress = function(value) { console.log("value=="+Math.floor(value*100)+"%"); } 输出结果: 0.19186599730944645 0.52519...
来源: Laya_社区 发布时间: 20180620
...pe.DestroyJoint=function(a){ box2d.ENABLE_ASSERTS&&box2d.b2Assert(!this.IsLocked()); if(!this.IsLocked()){ var b=a.m_collideConnected; a.m_prev&&(a.m_prev.m_next=a.m_next); a.m_next&&(a.m_next.m_prev=a.m_prev); a===this.m_jointList&&(this.m_jointList=a.m_next); var c=...
来源: Laya_社区 发布时间: 20181213
...itTestPrior进行鼠标事件监测: viewStack.on(Laya.Event.MOUSE_DOWN, this, this.onStageMouseDown); img.on(Laya.Event.MOUSE_DOWN, this, this.onImageMouseDown); viewStack.addChild(img); 然而不管设置是true还是false,都是子元素先检测到mousedown事件,请问是不是hitTestP...
来源: Laya_社区 发布时间: 20170917
物理引擎中更换刚体贴图的方法 this.ball = Matter.Bodies.circle(400, 600,34, { //密度 density: 1, //弹力 restitution:0.4, container:this.ballBox, render: { sprite: { texture: "comp/basketball.png", xOffset: 34, yOffset: 34, } } }); 我想通过代码随时更改这个刚体上的tex...
来源: Laya_社区 发布时间: 20180716
...码把绘制过程理了一遍,找到了实现方式,这是代码: this.canvas = Laya.Render.canvas; this.context = this.canvas.getContext('2d'); var my_gradient = this.context.createLinearGradient(0,0,0,1136); //创建一个线性渐变 my_gradient.addColorStop(0,"#FF0000"); my_gradient.addCo...
来源: Laya_社区 发布时间: 20180803
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.createCamera2D(); } createCamera2D() { //2D相机必须添加在2D区域节点下,因此需要先创建一个2D区域节点 this.area2D = new Laya.Area2D(); //设置2D区域节点的位置和大小 this.area2D.pos(100, 1...
来源: Laya3.0_文档 发布时间: 20251010
1.7.19beta版播放音乐异常 if (this.gain.gain.setTargetAtTime){ this.gain.gain.setTargetAtTime(this._volume,this.context.currentTime,0);一跑起来就在这里异常 "Failed to execute 'setTargetAtTime' on 'AudioParam': Time constant must be a finite positive number: 0" 在chrome里调试...
来源: Laya_社区 发布时间: 20180519