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

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

121. 骨骼动画-多纹理 [ 77%]

...n() { WebGL.enable(); Laya.init(Browser.width, Browser.height); Laya.stage.bgColor = "#ffffff"; Stat.show(); startFun(); })(); function startFun() { mAniPath = "../../res/spine/spineRes1/dragon.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, ...

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

122. 鼠标交互-自定义事件 [ 77%]

....alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createSprite(); })(); function createSprite() { sp = new Sprite(); sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); sp.pivot(100, 100); sp.x = Laya.stage.width / 2; sp.y = Laya.stage.height / 2; sp.size(2...

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

123. Sprite-轴心点 [ 77%]

....alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createApes(); })(); function createApes() { var gap = 300; sp1 = new Sprite(); sp1.loadImage("../../res/apes/monkey2.png", 0, 0); sp1.pos((Laya.stage.width - gap) / 2, Laya.stage.height / 2); //设置轴...

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

124. 骨骼动画-藤蔓 [ 77%]

...; (function() { Laya.init(Browser.width, Browser.height,WebGL); Laya.stage.bgColor = "#ffffff"; Stat.show(); startFun(); })(); function startFun() { mAniPath = "../../res/spine/spineRes5/vine.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, th...

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

125. 计时器-间隔循环 [ 77%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { let vGap = 100; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); this.rotateFrameRateBasedText...

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

126. 骨骼动画-橡胶人 [ 77%]

...; (function() { Laya.init(Browser.width, Browser.height,WebGL); Laya.stage.bgColor = "#ffffff"; Stat.show(); startFun(); })(); function startFun() { mAniPath = "../../res/spine/spineRes4/stretchyman.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ER...

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

127. Sprite-节点控制 [ 76%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; this.ape1 = new Sprite(); this.ape2 = new Sprite(); this.ape1.loadImage(monkey2Path); this.ape2.lo...

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

128. 骨骼动画-适配版Spine [ 76%]

...ser.height, WebGL); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; Stat.show(); this.startFun(); } startFun() { this.templet = new SpineTemplet(Laya.SpineVersion.v3_8); this.templet.loadAni(this.aniPath); this.templet.on(Event.COMPLETE, this, this.parseComplete); this.te...

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

129. 文本-字符限制 [ 76%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createTexts(); })(); function createTexts() { createLabel("只允许输入数字:").pos(50, 20); var input = createInput(); input.pos(50, 50); input.restrict = "0-9"; createLabel("只允许输入字母...

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

130. Sprite-切换纹理 [ 76%]

....alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(Laya.stage.width / ...

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