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

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

161. Mesh网格-网格加载 [ 79%]

...key.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.7071067); class MeshLoad { constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; var scene = Laya.stage.addChild(new Laya.Scene()); var camera: Laya.Camer...

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

162. Sprite-新手引导 [ 79%]

...ontainer, maskArea, interactionArea, hitArea, tipContainer, guideStep = 0; class Sprite_Guide { constructor() { const WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(1285, 727, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN...

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

163. 鼠标交互-拖动 [ 79%]

...开发更高效。const ApePath = "res/apes/monkey2.png"; let dragRegion; class Interaction_Drag { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, ...

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

164. 这样的panel请问如何实现比较好? [ 79%]

...: 1、定义一个Item,界面分两层(可用两个Sprite进行划分) class Item extends ui.itemUI { private state = 0; constructor() { super(); //点击最先出来的按钮,会显示下一层界面,同时隐藏自己 this.btnFirst.on(Laya.Event.CLICK, this, this.change, [0]); //点击上面...

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

165. 性能测试-虫子(慎入) [ 79%]

...Stat; import Rectangle = Laya.Rectangle; import WebGL = Laya.WebGL; export class PerformanceTest_Maggots { private texturePath:string = "../../res/tinyMaggot.png"; private padding:number = 100; private maggotAmount:number = 5000; private tick:number = 0; private maggots:Array = []; private wrapBound...

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

166. 骨骼动画-多纹理 [ 79%]

...。let mFactory, mArmature, mStartX = 400, mStartY = 500, mCurrIndex = 0; class Skeleton_MultiTexture { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeigh...

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

167. 骨骼动画进阶(TypeScript-2D进阶篇(TS)-动画进阶) [ 79%]

...上显示多个动画。 代码示例: ```typescript module laya{ export class SkeletonTempletSample { templet: Laya.Templet; constructor() { Laya.WebGL.enable(); Laya.init(1000, 900); //创建动画模板 this.templet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComp...

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

168. 鼠标交互-自定义事件 [ 79%]

...发语言、LayaAirIDE让项目开发更高效。const ROTATE = "rotate"; class Interaction_CustomEvent { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.client...

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

169. js进度,进度,js场景进度效果 [ 79%]

js进度,进度,js场景进度效果 new function() { var className = 'Game'; window[className] = (function(original) { function Class() { this.arr = [ "res/atlas/lucky8.json", "res/atlas/lucky8/lewinlineicons.json", "res/atlas/lucky8/setting.json", "res/atlas/lucky8/setView.json", "res/atlas/lucky...

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

170. 骨骼动画-藤蔓 [ 79%]

...。let mFactory, mArmature, mStartX = 200, mStartY = 500, mCurrIndex = 0; class Skeleton_SpineVine { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Sprite = Laya.Sprite; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, ...

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