大约有 1,499 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0091 秒)
...始游戏,通过激活本脚本方式开始游戏*/ startGame(): void { if (!this._started) { this._started = true; this.enabled = true; } var ground=this.owner.getChildByName("ground"); //****新增代码*****, ground.addComponent(Laya.ChainCollider); ...
来源: Laya_社区 发布时间: 20181130
...比较烦躁 * 我的做法是建一个ts: ``` var Matter; var require; if(typeof require != 'undefined') // 之所以加这个判断是保证在laya这边也正常运行不保错 { Matter = require("./matter.js"); } ``` 然后index.html中在所有之前导入(因为laya会根据index.html顺序...
来源: Laya_社区 发布时间: 20180516
...ani.interval = (35 / speed) > 60 ? 60 : (35 / speed); ani.alpha = speed if ((cur_time / play_time) > 1) { return true; } else { return false; } } ``` 这里的update函数,delta是每一帧的时间,我去动态的改变ani的interval。这样做在1.7.6里面是没问题的。 qian • 20...
来源: Laya_社区 发布时间: 20180115
...() } public start() { this.timerLoop(2, this, this.draw) } public draw() { if (this.startY >= 270) { this.clearTimer(this, this.draw) } this.startY++ this.graphics.clear() this.graphics.drawPie(this.DEF_SIZE >> 1, this.DEF_SIZE >> 1, this.DEF_SIZE >> 1,-90,this.startY,'#ff0000')...
来源: Laya_社区 发布时间: 20180123
... Physics.rayCast(ray2, rayCastHit2, 300); if(rayCastHit2.sprite3D) { //这里取碰撞点的y值给角色重新赋值 var currPosition:Vector3 = new Vector3(_position.x, rayCastHit2.position.y, _position.z); roleModel.transform.po...
来源: Laya_社区 发布时间: 20170828
...h = Laya.Browser.clientWidth; var stageHeight = Laya.Browser.clientHeight; if (stageWidth < stageHeight) { console.log("one", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE_NOSCALE; //1 console.log("one1", Laya.stage.scaleMode) } else { console.log("two", Laya.stage.scaleMode) Laya...
来源: Laya_社区 发布时间: 20170920
...地址为资源地址,使用version版本匹配替换。 if (url.indexOf(":")> 0 && Laya.URL.customFormat !=null){ let a = url.replace(Laya.URL.basePath,""); url=Laya.URL.customFormat(a); } 4.恭喜你已经...
来源: Laya_社区 发布时间: 20190620
...Position获取阴影UV, 混合渲染在plane上 顶点着色器: #if defined(_RECEIVESHADOWS) vec4 uv = u_ShadowLightMatrix * position; uv.xy /= uv.w; v_shadow_data = uv; #endif片段着色器: gl_FragColor.rgb=saturate(texture2D(u_S...
来源: Laya_社区 发布时间: 20200229
...+ wasmFile, "arraybuffer").then(data => { if (data) { let module = new window.WebAssembly.Module(data); let instance = new window.WebAssembly.Instance(module, imports); ...
来源: Laya_社区 发布时间: 20250626
...惧 赞同来自: public function Main() { if (window["Laya3D"]) window["Laya3D"].init(GameConfig.width, GameConfig.height); else Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]); trace("Laya.stage",Laya.stage...
来源: Laya_社区 发布时间: 20191016