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

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

1. 材质-BlinnPhong材质加载 [ 100%]

...更高效。Laya3D.init(0, 0, true); this.rotation = new Laya.Vector3(0, 0.01, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 10...

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

2. 高级应用-闪光 [ 99%]

...Loop(1, this, loop); function loop() { scaleValue = Math.sin(scaleDelta += 0.01); pos1.elements[0] = pos2.elements[0] = scaleValue * 13; pos1.elements[1] = Math.sin(scaleValue * 20) * 2; pos2.elements[1] = Math.sin(scaleValue * 20) * 2; glitter.addGlitterByPositions(pos1, pos2); }class GlitterDemo {...

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

3. 照相机-3D空间转2D空间 [ 96%]

... scaleDelta = 0; function animate() { _position.x = Math.sin(scaleDelta += 0.01); layaMonkey3D.transform.position = _position; camera.viewport.project(layaMonkey3D.transform.position, camera.projectionViewMatrix, _outPos); //获取的2d坐标必须做兼容屏幕适配操作 layaMonkey2D.pos(_outPos...

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

4. 鼠标交互-双指缩放(多点触控) [ 95%]

...距离与上次距离变化,确定是放大还是缩小 const factor = 0.01; sp.scaleX += (distance - lastDistance) * factor; sp.scaleY += (distance - lastDistance) * factor; lastDistance = distance; } function onMouseUp(e) { Laya.stage.off(Event.MOUSE_MOVE, this, onMouseMove); } /**计算两个...

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

5. 材质-BlinnPhong-漫反射贴图 [ 95%]

...更高效。Laya3D.init(0, 0, true); this.rotation = new Laya.Vector3(0, 0.01, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = (scene.addChild(new Laya.Camera(0, 0.1, 1...

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

6. 材质-BlinnPhong-反射贴图 [ 92%]

...更高效。Laya3D.init(0, 0, true); this.rotation = new Laya.Vector3(0, 0.01, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = (scene.addChild(new Laya.Camera(0, 0.1, 1...

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

7. 材质-BlinnPhong-高光贴图 [ 91%]

...更高效。Laya3D.init(0, 0, true); this.rotation = new Laya.Vector3(0, 0.01, 0); this.specularMapUrl = ["../../res/threeDimen/skinModel/dude/Assets/dude/headS.png", "../../res/threeDimen/skinModel/dude/Assets/dude/jacketS.png", "../../res/threeDimen/skinModel/dude/Assets/dude/pantsS.png", "../../r...

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

8. 材质-BlinnPhong-法线贴图 [ 91%]

...更高效。Laya3D.init(0, 0, true); this.rotation = new Laya.Vector3(0, 0.01, 0); this.normalMapUrl = ["../../res/threeDimen/staticModel/lizardCal/rock_norm.png", "../../res/threeDimen/staticModel/lizardCal/lizard_norm.png", "../../res/threeDimen/staticModel/lizardCal/lizard_norm.png"]; Laya.stage....

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

9. 自定义shader-简单shader [ 90%]

...Render.sharedMaterial = customMaterial; var rotation = new Laya.Vector3(0, 0.01, 0); Laya.timer.frameLoop(1, this, function () { layaMonkey.transform.rotate(rotation, false); }); function initShader() { var attributeMap = { 'a_Position': Laya.VertexElementUsage.POSITION0, 'a_Normal': Laya.VertexElem...

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

10. 动画-旧版骨骼动画 [ 65%]

...s Laya.Scene; var camera: Laya.Camera = (scene.addChild(new Laya.Camera(0, 0.01, 1000))) as Laya.Camera; camera.transform.translate(new Laya.Vector3(0, 1.5, 3)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); var directionLight: Laya.DirectionLight = scene.addChild(new Laya.Direc...

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