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

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

91. UI-List [ 95%]

...= Laya.Image; var WID = 373, HEI = 85; function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box); // 主要逻辑代码 var Stage = Laya.Stage; var List = Laya....

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

92. UI-RadioGroup [ 95%]

...../../res/ui/radioButton (3).png"]; Laya.loader.load(skins, Handler.create(this, initRadioGroups)); })(); function initRadioGroups() { for (var i = 0; i ; constructor(){ // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = ...

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

93. UI-Button [ 95%]

... COLUMNS - 1) - BUTTON_HEIGHT) / 2; Laya.loader.load(skins, Handler.create(this, this.onUIAssetsLoaded)); } onUIAssetsLoaded() { for (let i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya....

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

94. 鼠标交互-自定义事件 [ 95%]

...tage.height / 2; sp.size(200, 200); Laya.stage.addChild(sp); sp.on(ROTATE, this, onRotate); // 侦听自定义的事件 sp.on(Event.CLICK, this, onSpriteClick); } function onSpriteClick(e) { var randomAngle = Math.random() * 180; //发送自定义事件 sp.event(ROTATE, [randomAngle]); } // 触发...

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

95. 材质-BlinnPhong-法线贴图 [ 94%]

...发语言、LayaAirIDE让项目开发更高效。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/liz...

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

96. 源码List的一次代码错误 [ 94%]

...变量。__proto._createItems = function (startY, numX, numY) { var box = this._content; var cell = this._getOneCell(); var cellWidth = cell.width + this._spaceX; var cellHeight = cell.height + this._spaceY; if (this.cacheContent) { var cacheBox = new Box(); cacheBox.cacheAsBitmap = true; cacheBox.p...

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

97. 其他引擎的Demo-Example_21 [ 94%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#3da8bb"; Stat.show(); this.createCanvases(); Laya.timer.frameLoop(1, this, this.animate); Laya.stage.on('mousedown', this, this.onMouseDown); Laya.stage.on('mousemove', this, this.onMouseMove); Laya.stage.on('mouseup', this, this.onMouseUp); } cre...

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

98. 动画-旧版骨骼动画 [ 94%]

...kinModel/Zombie/old/Zombie.lh")); zombie.once(Laya.Event.HIERARCHY_LOADED, this, function () { zombie.transform.rotation = new Laya.Quaternion(-0.7071068, 0, 0, -0.7071068); zombie.transform.position = new Laya.Vector3(0.3, 0, 0); addSkinComponent(zombie); loadUI(); }); var skinAniUrl = [ "../../res...

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

99. 动画-新版骨骼动画 [ 94%]

...kinModel/Zombie/new/Zombie.lh")); zombie.once(Laya.Event.HIERARCHY_LOADED, this, function () { //获取Animator动画组件 zombieAnimator = zombie.getChildAt(0).getComponentByType(Laya.Animator); loadUI(); }); function loadUI() { var clipName = ["walk","attack","left_fall","right_fall","back_fall"]...

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

100. 灯光-聚光 [ 94%]

.../LayaMonkey/LayaMonkey.lh")); layaMonkey.once(Laya.Event.HIERARCHY_LOADED, this, function () { var aniSprite3d = layaMonkey.getChildAt(0); var animator = aniSprite3d.getComponentByType(Laya.Animator); animator.play(null, 1.0, 115, 150); }); var _quaternion = new Laya.Quaternion(); var _position = ne...

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