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

大约有 40 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0061 秒)

31. laya.display.Sprite [ 47%]

...节点。 注意: Sprite 默认没有宽高,可以通过getBounds函数获取;也可手动设置宽高;还可以设置autoSize=true,然后再获取宽高。Sprite的宽高一般用于进行碰撞检测和排版,并不影响显示图像大小,如果需要更改显示图像大小,请...

来源: laya_api 发布时间: 20170929

32. 2.x引擎项目升级指南 · LayaAir3.0文档 · LAYABOX [ 45%]

...载Texture还是Texture2D,他们在内存中都只有一份,但可以获取不同类型。 Laya.loader.load("1.png").then((res)=> { /* res是Texture */ }); Laya.loader.load("1.png", Loader.Texture2D).then((res)=> { /* res是Texture2D */ }); Laya.loader.getRes("1.png"); //res是Texture Laya...

来源: Laya3.0_文档 发布时间: 20230406

33. 材质编辑模块 · LayaAir3.0文档 · LAYABOX [ 38%]

...可以设置两个光滑度来源,分别从AlbedoTexture的alpha通道去获取、从MetallicGloassTexture的alpha通道去获取。实际上是将物体表面材质的光滑度映射到AlbedoTexture贴图的alpha通道、或者映射到MetallicGloass贴图的alpha通道上,这样可以根据物...

来源: Laya3.0_文档 发布时间: 20230714

34. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 31%]

...clickHandler():void{ var url:string = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个延时在获取。 this.qrcodeSp.loadImage(url,0,0,100,100); } } new Main; ``` 编译运行上面的代码,然后点击舞台可以看到,二维码已经显示到...

来源: Laya2.0_文档 发布时间: 20210715

35. LayaAir和原生DOM交互(JavaScript-2D进阶篇(JS)-扩展模块) [ 31%]

...); function clickHandler(){ var url = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个延时在获取。 this.qrcodeSp.loadImage(url,0,0,100,100); } ``` 编译运行上面的代码,然后点击舞台可以看到,二维码已经显示到了舞台上...

来源: Laya2.0_文档 发布时间: 20210714

36. 网络通信 · LayaAir3.0文档 · LAYABOX [ 30%]

...和服务器之间传输数据的功能。它提供了一个通过 URL 来获取数据的简单方式,并且不会使整个页面刷新。这使得网页只更新一部分页面而不会打扰到用户。 1,属性 属性 类型 描述 onreadystatechange function 一个JavaScript函数对象,...

来源: Laya3.0_文档 发布时间: 20230719

37. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 28%]

...ion clickHandler():void { var url:String = qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个延时在获取。 qrcodeSp.loadImage(url,0,0,100,100); } } } ``` ​ 编译运行上面的代码,然后点击舞台可以看到,二维码已经显示到了舞台...

来源: Laya2.0_文档 发布时间: 20210715

38. laya.d3.physicscannon.CannonRigidbody3D_API3.0 [ 26%]

... Inherited from Component.owner Defined in laya/components/Component.ts:24 获取所属Node节点。 Optional runInEditor runInEditor: boolean Inherited from Component.runInEditor Defined in laya/components/Component.ts:34 是否可以在IDE环境中运行 Optional scriptPath scriptPath: string Inhe...

来源: Laya3.0_api 发布时间: 20231102

39. 和原生Dom交互 · LayaAir3.0文档 · LAYABOX [ 25%]

... //初始化引擎 Laya.init(0,0); var Hls:any = Laya.Browser.window.Hls;//获取对Hls的引用。 var plyr:any = Laya.Browser.window.plyr;//获取对plyr的引用 //获取video对象,就是页面上命名为“player”的标签 var video:any = Laya.Browser.document.querySelector('#player'); if(...

来源: Laya3.0_文档 发布时间: 20230629

40. laya.d3.physics.Rigidbody3D_API3.0 [ 24%]

... Inherited from Component.owner Defined in laya/components/Component.ts:24 获取所属Node节点。 Optional runInEditor runInEditor: boolean Inherited from Component.runInEditor Defined in laya/components/Component.ts:34 是否可以在IDE环境中运行 Optional scriptPath scriptPath: string Inhe...

来源: Laya3.0_api 发布时间: 20231115