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

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

541. UI-Clip [ 35%]

... string = "res/ui/coutDown.png"; private counter: Clip; private currFrame: number; private controller: Button; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = ...

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

542. 屏幕适配-屏幕适配 [ 35%]

...", "fixedwidth", "fixedheight"]; //当前适配模式索引 private index: number = 0; //全局文本信息 private txt: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.sc...

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

543. 动画-新版骨骼动画 [ 35%]

...Laya.Button; private zombieAnimator: Laya.Animator; private curStateIndex: number = 0; private clipName: Array = ["walk", "attack", "left_fall", "right_fall", "back_fall"]; constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREE...

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

544. 屏幕适配-屏幕适配 [ 35%]

...", "fixedwidth", "fixedheight"]; //当前适配模式索引 private index: number = 0; //全局文本信息 private txt: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.sc...

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

545. 材质-BlinnPhong-高光贴图 [ 34%]

...dude2.getChildAt(0).getChildAt(0) as Laya.SkinnedMeshSprite3D; for (var i: number = 0; i < skinnedMeshSprite3d.skinnedMeshRender.materials.length; i++) { var mat: Laya.StandardMaterial = skinnedMeshSprite3d.skinnedMeshRender.materials[i] as Laya.StandardMaterial; //高光贴图 mat.specularTexture =...

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

546. 材质-BlinnPhong-法线贴图 [ 34%]

....transform.localScale = new Laya.Vector3(0.002, 0.002, 0.002); for (var i: number = 0; i < monster2._childs.length; i++) { var meshSprite3D: Laya.MeshSprite3D = monster2._childs[i] as Laya.MeshSprite3D; var material: Laya.BlinnPhongMaterial = meshSprite3D.meshRender.material as Laya.BlinnPhongMateri...

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

547. 自定义shader-简单shader [ 33%]

...ya.Sprite3D.WORLDMATRIX, Laya.Shader3D.PERIOD_SPRITE] }; var customShader: number = Laya.Shader3D.nameKey.add("CustomShader"); var vs: string = "attribute vec4 a_Position;\n" + "uniform mat4 u_MvpMatrix;\n" + "uniform mat4 u_WorldMat;\n" + "attribute vec3 a_Normal;\n" + "varying vec3 v_Normal;\n" + ...

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

548. 自定义shader-地形shader [ 31%]

...)); meshSprite3D.meshRender.sharedMaterial = customMaterial; } for (var i: number = 0, n: number = spirit3D._childs.length; i < n; i++) this.setCustomMaterial(spirit3D._childs[i]); } private initShader(): void { var attributeMap = { 'a_Position': Laya.VertexElementUsage.POSITION0, 'a_Normal': Laya.V...

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

549. LAYABOX游戏实时语音之APP版本 [ 30%]

...in"); var YIMMain = YIMChat.newObject(); var randomString = function (len: number) { //随机码  len = len || 32; var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678oOLl9gqVvUuI1'; var maxPos = $chars.length; var str = ''; for (var i = 0; i &lt; len; i++) { str += $chars.charAt(Math.fl...

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

550. 射线检测-选取物体 [ 23%]

...vent.MOUSE_UP, this, function (): void { var str: String = ""; for (var i: number = 0; i = new Vector.(); private var camera:Camera; private var label:Label; public function RayPicking01() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Stage.SCALE_FULL; Laya.stage.screenMode = Stage.SCREEN_NONE; ...

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