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

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

81. 物理碰撞器(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 69%]

...//新建材质 var planeMat:BlinnPhongMaterial = new BlinnPhongMaterial(); Texture2D.load("res/threeDimen/Physics/grass.png", Handler.create(null, function(tex:Texture2D):void { planeMat.albedoTexture = tex; })); //设置纹理平铺和偏移 planeMat.tilingOffset = new Vector4(10, 10, 0, 0); //设...

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

82. timer无法执行 [ 69%]

...ball1mat: Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial();   Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function(layabox: Laya.Texture2D): void{ ball1mat.albedoTexture = layabox; })); //ball1mat.tilingOffset = new Laya.Vector4(10, 10, 0, 0); ball1.meshRenderer.material...

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

83. 百度小游戏的5M本地包与动态资源加载(TypeScript-小游戏适配文档-百度小游戏) [ 69%]

...本地路径,比如示例中引用的就是本地路径, ```json Laya.Texture2D.load("res/layabox.png"); ``` 如果项目的目录中,全部大小加起来不超过5M的话,只要能找到本地的资源,怎么写也没问题。 但是, 百度小游戏的本地包有5M的限制,一旦...

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

84. 通过canvas的缩放来实现清晰度是什么意思呢? [ 69%]

...erial();                     material.diffuseTexture = Texture2D.load("res/test4.png");   sphere.meshRender.material = material;   test4.png是一张1024*512的图,我想提高贴图的清晰度 有人说可以通canvas缩放来实现 具体怎么做? 不用Texture2D.load(...

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

85. 微信小游戏的4M本地包与动态资源加载(TypeScript-小游戏适配文档-微信小游戏) [ 69%]

...本地路径,比如示例中引用的就是本地路径, ```json Laya.Texture2D.load("res/layabox.png"); ``` 如果项目的目录中,全部大小加起来不超过4M的话,只要能找到本地的资源,怎么写也没问题。 但是, 微信小游戏的本地包有4M的限制,一旦...

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

86. 资源加载(ActionScript-3D基础(AS3)-LayaAir3D之资源加载) [ 69%]

...。 ![](img/2.png)(图2) #### 3. 纹理加载加载单个纹理使用Texture2D.load方法。这里我们创建了一个正方体,并且将加载的纹理设置为他的纹理。这个操作实际上和3D简单示例的操作是相同的。 ```typescript //加载纹理 Texture2D.load("res/thre...

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

87. png使用base64显示异常 [ 67%]

...n () { // image.onload = null; // image.onerror = null; // var data = Laya.Texture2D._parse(image); // data._url = "sdfasf" // _this.onLoaded(data); img=HTMLImage.create(image.width,image.height,1); img.loadImageSource(image,true); img._setCreateURL(url); _this.onLoaded(img); }; var url = _this.arra...

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

88. 资源加载 · LayaAir3.0文档 · LAYABOX [ 67%]

...H MESH Mesh资源 Laya.Loader.MATERIAL MATERIAL Material资源 Laya.Loader.TEXTURE2D TEXTURE2D Texture2D资源 Laya.Loader.TEXTURECUBE TEXTURE2D TextureCube资源 Laya.Loader.SPINE SPINE Spine资源 二、加载多个资源 有很多时候,我们需要把大量的资源在Loading界面进行预加...

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

89. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 67%]

...戏正常可用 private static _sp: Laya.Sprite = null; private static tempTexture2D: Laya.Texture2D; private static tempTexture: Laya.Texture; /**截图 */ public static drawScreenshot(width, height, x, y) { if (!SwitchHelper.screenDraw) { return null; }  if (!this.tempTexture2D) { this.tempTextur...

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

90. 场景环境反射(ActionScript-3D基础(AS3)-LayaAir3D之场景渲染配置) [ 67%]

...尽量高点,反射效果更明显 pbrMat.metallic = 1; //加载纹理 Texture2D.load("res/threeDimen/pbr/jinshu.jpg", Handler.create(null, function(tex:Texture2D):void { //pbrMat.albedoTexture = tex; teapot.meshRenderer.material = pbrMat; })); ``` ![](img/5.png)(图5)

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