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

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

1051. 批量销毁释放内存(ActionScript-3D基础(AS3)-LayaAir3D的内存管理) [ 81%]

...scene:Scene3D):void { _scene = Laya.stage.addChildAt(scene, 0) as Scene3D; var camera:Camera = scene.addChild(new Camera(0, 0.1, 100)) as Camera; camera.transform.translate(new Vector3(0, 1, 0)); camera.addComponent(CameraMoveScript); })); } ``` 我们点击加载场景,再来看状态。 ![](img/...

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

1052. laya.d3.core.render.BloomEffect [ 81%]

...ublic function set anamorphicRatio(value:Number):voidclampproperty public var clamp:Number = 65472.0限制泛光像素的数量,该值在伽马空间。colorproperty public var color:Color泛光颜色。diffusionproperty diffusion:Number 获取扩散值,改变泛光的扩散范围,最好使用整...

来源: Laya2.0_api 发布时间: 20190513

1053. AS3与JS混合编码(ActionScript-2D进阶篇(AS3)-扩展模块) [ 81%]

...ass JSDemo { public function JSDemo() { //初始化引擎 Laya.init(0, 0); var Height:int = Browser.window.innerHeight; var width:int = Browser.window.innerWidth; Browser.window.console.log("Console Log:浏览器高:"+ Height + " 浏览器宽:" + width); } } } ``` **方式二:** ```java pack...

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

1054. SCALE_FIXED_WIDTH适配屏幕的问题 [ 81%]

...));         }         private loadGame(): void {             var resArray = [                 { url: "res/atlas/lobby/create_room.atlas", type: Laya.Loader.ATLAS },                                 .......             ];             let create...

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

1055. 火狐花屏问题 [ 80%]

...问题,onFireFox的判断laya2去掉了, 我自己从laya1找回来; var onload = function (imageData) {                 clear();                 if (imageData) {                     var image = imageData;                     if (type !== "nativeimage") {  ...

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

1056. 超出文本区域的处理&滚动文本(TypeScript-LayaAir基础篇(TS)-文本) [ 80%]

...e.bgColor = "#232628"; this.createTexts(); } private createTexts(): void { var t1: Text = this.createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); var t2: Text = this.createText(); t2.overflow = Text.SCROLL; t2.pos(10, 110); var t3: Text = this.createText(); t3.overflow = Text.HIDDEN; t3.pos(1...

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

1057. 除了用“+"拼接,如何创建格式化字符串? [ 80%]

...人 赞同来自: 除了AS,JS和TS都可以做到 以js为例: // ES6: var h = 'Hello'; var w = 'World'; var helloWorld = `${h} ${w}`; console.log(helloWorld); // 用在console console.log("%s%d", "one plus one equals ", 2) 2017-10-26 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回...

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

1058. RenderTexture的像素读取(TypeScript-3D基础(TS)-LayaAir3D之纹理) [ 80%]

... Laya.BlinnPhongMaterial).albedoTexture = renderTargetCamera.renderTarget; var boxMaterial = box.meshRenderer.material as Laya.BlinnPhongMaterial; //获取BlinnPhong材质的纹理 var tex = boxMaterial.albedoTexture as Laya.Texture2D; //获取相机渲染目标的像素数据,默认renderTarget的...

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

1059. 鼠标交互-修正交互区域 [ 80%]

...(Event.MOUSE_DOWN, this, this.onDown); } private createCoralRect(): void { var coralRect: Sprite = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.size(Laya.stage.width, Laya.stage.heigh...

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

1060. u3d 插件导出 简单场景,用最新引擎无法加载成功 [ 80%]

...nit(600,400); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; //创建场景 var scene  = new Laya.Scene(); Laya.stage.addChild(scene); //创建摄像机 var camera = new Laya.Camera(); scene.addChild(camera); camera.transform.localPosition = new Laya.Vector3(0,4,10); //载入并显示3D建筑 var ma...

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