• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 356 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0038 秒)

311. 屏幕适配-屏幕适配 [ 51%]

...", "fixedwidth", "fixedheight"]; //当前适配模式索引 private index: number = 0; //全局文本信息 private txt: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.sc...

来源: Laya_示例 发布时间: 20251130

312. 动画-新版骨骼动画 [ 51%]

...Laya.Button; private zombieAnimator: Laya.Animator; private curStateIndex: number = 0; private clipName: Array = ["walk", "attack", "left_fall", "right_fall", "back_fall"]; constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREE...

来源: Laya_示例 发布时间: 20251130

313. httpRequest send返回Request failed Status:0 [ 51%]

...URL, id, data) { // private completeHandler(data: Object, URL: string, id: number): void { //加载完成返回的data是arraybuffer; //......这里处理我们加密的图片数据,假设我们的图片加密数据是在图片的前面写入了四个字节的数据 //......解密逻辑开始处...

来源: Laya_社区 发布时间: 20180629

314. 2D物理-仿生机器人 [ 51%]

...bVV(p6, p4)).concat(B2Math.SubVV(p5, p4)).join(","); } const dampingRatio: number = 0.5; const frequencyHz: number = 10.0; let distanceJoint1: DistanceJoint = new DistanceJoint(); distanceJoint1.otherBody = legBody2; distanceJoint1.selfAnchor = p2; distanceJoint1.otherAnchor = B2Math.SubVV(p5, p4); ...

来源: Laya2.0_示例 发布时间: 20251130

315. setSubPixels画布擦除不掉 [ 51%]

...ath.random()); let tex:Laya.Texture = Laya.Loader.getRes(this.bUrl); let x:number = this._testStatus == true ? 0:50;//Math.random()>0.5 ? 50 : 0; this._testStatus = !this._testStatus; // let canvasInfo = this.getCanvasWidthHeight(); let ctx = new Laya.Context(); // let w = canvasInfo.w//tex.width...

来源: Laya_社区 发布时间: 20230328

316. 屏幕适配-屏幕适配 [ 51%]

...", "fixedwidth", "fixedheight"]; //当前适配模式索引 private index: number = 0; //全局文本信息 private txt: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.sc...

来源: Laya2.0_示例 发布时间: 20251130

317. SCALE_FIXED_WIDTH适配屏幕的问题 [ 51%]

...s Main {         private _roomId = 0;         constructor(roomId?: number) {             this._roomId = roomId;             Laya.init(750, 1218, Laya.WebGL);             Laya.Browser.document.title = 'GG游戏;             if (Laya.Browser.onPC) {              ...

来源: Laya_社区 发布时间: 20181208

318. Laya.Browser获取宽高数值会变化,iphone6第一次加载正确,刷新几次就变大了。 [ 50%]

...刷新几次就变大了。 class GameMain{     public static pxTimes: number = Laya.Browser.height / Laya.Browser.clientHeight;     constructor()     {         console.log('ch=' + Laya.Browser.clientHeight + ', h=' + Laya.Browser.height + ', pxTimes=' + GameMain.pxTimes);         Laya...

来源: Laya_社区 发布时间: 20170403

319. 材质-BlinnPhong-高光贴图 [ 50%]

...dude2.getChildAt(0).getChildAt(0) as Laya.SkinnedMeshSprite3D; for (var i: number = 0; i < skinnedMeshSprite3d.skinnedMeshRender.materials.length; i++) { var mat: Laya.StandardMaterial = skinnedMeshSprite3d.skinnedMeshRender.materials[i] as Laya.StandardMaterial; //高光贴图 mat.specularTexture =...

来源: Laya_示例 发布时间: 20251130

320. 材质-BlinnPhong-法线贴图 [ 50%]

....transform.localScale = new Laya.Vector3(0.002, 0.002, 0.002); for (var i: number = 0; i < monster2._childs.length; i++) { var meshSprite3D: Laya.MeshSprite3D = monster2._childs[i] as Laya.MeshSprite3D; var material: Laya.BlinnPhongMaterial = meshSprite3D.meshRender.material as Laya.BlinnPhongMateri...

来源: Laya_示例 发布时间: 20251130