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

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

111. 灯光-方向光 [ 53%]

...directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.7, 0.6, 0.6); directionLight.direction = new Laya.Vector3(0, -1.0, -1.0); var grid = scene.addChild(Laya.Sprite3D.load("../../res/threeDimen/staticModel/grid/plane.lh")); var layaMonkey = scene.addC...

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

112. 鼠标交互-键盘交互 [ 53%]

...lignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { listenKeyboard(); createLogger(); Laya.timer.frameLoop(1, this, keyboardInspector); } function listenKeyboard() { keyDownList = []; //添加键盘按下事件,一直按着...

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

113. 自定义shader-地形shader [ 52%]

...fuseScale4(new Laya.Vector2(13.96364, 13.96364)); customMaterial.setAmbientColor(new Laya.Vector3(1, 1, 1)); customMaterial.setDiffuseColor(new Laya.Vector3(1, 1, 1)); customMaterial.setSpecularColor(new Laya.Vector4(1, 1, 1, 8)); customMaterial.setLightMapScaleOffset(new Laya.Vector4(0.8056641, 0.8...

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

114. 灯光-点光 [ 51%]

...光源 var pointLight = scene.addChild(new Laya.PointLight()); pointLight.color = new Laya.Vector3(0.1189446, 0.5907708, 0.7352941); pointLight.transform.position = new Laya.Vector3(0.4, 0.4, 0.0); pointLight.attenuation = new Laya.Vector3(0.0, 0.0, 3.0); pointLight.range = 3.0; var grid = scene.add...

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

115. 材质-BlinnPhong-漫反射贴图 [ 51%]

...; directionLight.direction = new Laya.Vector3(0, -0.8, -1); directionLight.color = new Laya.Vector3(1, 1, 1); var skyBox = new Laya.SkyBox(); skyBox.textureCube = Laya.TextureCube.load("../../res/threeDimen/skyBox/skyBox2/skyCube.ltc"); camera.sky = skyBox; var earth1 = scene.addChild(new Laya.MeshS...

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

116. 鼠标交互-修正交互区域 [ 50%]

...lignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { buildWorld(); createLogger(); } function buildWorld() { createCoralRect(); createDeepSkyblueRect(); createDarkOrchidRect(); // 设置舞台 Laya.stage.name = "暗灰色舞...

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

117. 灯光-聚光 [ 50%]

.../聚光灯 var spotLight = scene.addChild(new Laya.SpotLight()); spotLight.color = new Laya.Vector3(1, 1, 0); spotLight.transform.position = new Laya.Vector3(0.0, 1.2, 0.0); spotLight.direction = new Laya.Vector3(0.15, -1.0, 0.0); spotLight.attenuation = new Laya.Vector3(0.0, 0.0, 0.8); spotLight.ra...

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

118. 超出文本区域的处理&滚动文本(ActionScript-LayaAir基础篇(AS3)-文本) [ 50%]

...商,面向AS/JS/TS开发者提供HTML5开发技术方案!"; txt.borderColor = "#FFFF00"; //设置宽高以后自动裁剪会按照这个区域裁剪 txt.size(300, 50); txt.fontSize = 20; txt.color = "#ffffff"; Laya.stage.addChild(txt); return txt; } } } ``` ![2](img/2.png) 可以看到3种方法...

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

119. 鼠标交互-修正交互区域 [ 49%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.buildWorld(); this.createLogger(); } buildWorld() { const Event = Laya.Event; this.createCoralRect(); this.createDeepSkyblueRect(); this.createDarkOrchidRect(); /...

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

120. 缓动 · LayaAir3.0文档 · LAYABOX [ 49%]

...a.Text{ var letter:Laya.Text = new Laya.Text(); letter.text = char; letter.color = "#ffffff"; letter.font = "Impact"; letter.fontSize = 180; this.owner.addChild(letter); return letter; } (动图3-1) 结合实例代码,然后通过动图3-1的运动效果,我们可以看出,文本”Layabox...

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