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

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

31. 鼠标交互-滑动 [ 96%]

...t WebGL = Laya.WebGL; export class Interaction_Swipe { //swipe滚动范围 private TrackLength: number = 200; //触发swipe的拖动距离 private TOGGLE_DIST: number = this.TrackLength / 2; private buttonPosition: number; private beginPosition: number; private endPosition: number; private button: S...

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

32. 输入设备-摇一摇 [ 96%]

... Laya.Handler; import Event = Laya.Event; export class InputDevice_Shake { private picW:number = 484; private picH:number = 484; private console:Text; private shakeCount:number = 0; constructor() { Laya.init(this.picW, Browser.height * this.picW / Browser.width); Laya.stage.scaleMode = Stage.SCALE_S...

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

33. 鼠标交互-滑动 [ 96%]

...t WebGL = Laya.WebGL; export class Interaction_Swipe { //swipe滚动范围 private TrackLength: number = 200; //触发swipe的拖动距离 private TOGGLE_DIST: number = this.TrackLength / 2; private buttonPosition: number; private beginPosition: number; private endPosition: number; private button: S...

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

34. 物理引擎-布 [ 96%]

...GL = Laya.WebGL; import Render = Laya.Render; export class Physics_Cloth { private stageWidth: number = 800; private stageHeight: number = 600; private Matter: any = Browser.window.Matter; private LayaRender: any = Browser.window.LayaRender; private mouseConstraint: any; private engine: any; constru...

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

35. 请大家帮助优化一下这个抛物线的代码 [ 96%]

...s://my.oschina.net/u/659068/blog/1564002  class Ball extends Laya.Sprite{ private static cached:boolean = false; private body:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.loadImage("war/ball.pn...

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

36. 性能测试-卡通人物2 [ 96%]

...tion; import Sprite = Laya.Sprite; export class PerformanceTest_Cartoon2 { private amount: number = 500; private character1: Array = [ "../../res/cartoon2/yd-6_01.png", "../../res/cartoon2/yd-6_02.png", "../../res/cartoon2/yd-6_03.png", "../../res/cartoon2/yd-6_04.png", "../../res/cartoon2/yd-6_05.p...

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

37. 性能测试-卡通人物2 [ 96%]

...tion; import Sprite = Laya.Sprite; export class PerformanceTest_Cartoon2 { private amount: number = 500; private character1: Array = [ "res/cartoon2/yd-6_01.png", "res/cartoon2/yd-6_02.png", "res/cartoon2/yd-6_03.png", "res/cartoon2/yd-6_04.png", "res/cartoon2/yd-6_05.png", "res/cartoon2/yd-6_06.png...

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

38. Sprite-屏幕截图 [ 96%]

...index = 0; index = ["res/button.png", "res/button.png", "res/button.png"]; private nameArr:Array = ["canvas截图","sprite截图","清理"]; private _canvas:HTMLCanvasElement; private aimSp:Sprite; private drawImage:Image; private drawSp:Sprite; private monkeyTexture:Texture; constructor() { Config....

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

39. Sprite3D-Sprite3D变换 [ 96%]

...ue); layaMonkey3.transform.localScale = _scale; }class Sprite3DTransform { private layaMonkey1: Laya.Sprite3D; private layaMonkey2: Laya.Sprite3D; private layaMonkey3: Laya.Sprite3D; private _position: Laya.Vector3; private _rotate: Laya.Vector3; private _scale: Laya.Vector3; private scene: Laya.Sce...

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

40. 输入设备-地图 [ 96%]

...ort Handler = Laya.Handler; export class InputDevice_Map { // 百度地图 private map; private marker; private BMap = Browser.window.BMap; private convertor = new this.BMap.Convertor(); // Div private mapDiv; private infoText:Text; constructor() { Laya.init(Browser.width, 255); Laya.stage.scaleMode...

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