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

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

91. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 91%]

# Sprite3D添加组件或脚本 ###### *version :2.7.0beta Update:2020-6-12* **Component** 组件,是附加到所有3D对象的内容的基类。在给物体添加组件时,需要物体使用`addComponent`方法。 ![](img/1.png)(图1) **Script3D** 这是3D世界中的脚本,继承自组件,...

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

92. VR的demo有没有加载3D场景的啊,实在不知怎么加 [ 91%]

...e = Laya.TextureCube.load("res/sky/skyCube.ltc"); camera.sky = skyBox; var sprite3D = scene.addChild(Laya.Sprite3D.load("cj03/LastHopeScene.lh")); //sprite3D.transform.localScale = new Laya.Vector3(0.2, 0.2, 0.2); sprite3D.once(Laya.Event.HIERARCHY_LOADED, null, function(sprite) { //console.log(scen...

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

93. 屏幕适配-缩放-No Border [ 91%]

...Color = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rec...

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

94. 屏幕适配-缩放-No Scale [ 91%]

...Color = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rec...

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

95. 设置滤镜(ActionScript-LayaAir基础篇(AS3)-位图) [ 91%]

...色 var redFilter:ColorFilter = new ColorFilter(redMat); ``` 最后通过Spriter的filters属性将颜色滤镜效果叠加到位图中。下面我们创建一个Main.as入口类,并设置为默认应用程序(推荐用FlashBuilder),编写代码如下: ```java package { import laya.display...

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

96. 屏幕适配-缩放-Extract Fit [ 91%]

...Color = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rec...

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

97. 屏幕适配-缩放-Show All [ 91%]

...Color = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rec...

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

98. Sprite-旋转缩放 [ 91%]

...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Sprite_RoateAndScale { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.ali...

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

99. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 91%]

... > 图片的显示是游戏开发基础,本篇从API到示例分别介绍Sprite.loadImage与Graphics.drawTexture两种显示图片的方法。 ## 1、用loadImage方法显示与切换图片 ### 1.1 loadImage API概述 在API文档中搜索laya.display.Sprite,可以找到loadImage()方法,如...

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

100. webgl模式下对Panel组件旋转时Panel子对象显示错误的BUG! [ 91%]

...a.init(1280,720,Laya.WebGL);//有问题 console.log(Laya.version); var testSpriteRotation:PanelRotationTest = new PanelRotationTest(Laya.Sprite); testSpriteRotation.pos(300,260); Laya.stage.addChild(testSpriteRotation); var testPanelRotation:PanelRotationTest = new PanelRotationTest(Laya.Panel); tes...

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