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

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

1. UI-FontClip [ 100%]

...mage; import WebGl=Laya.WebGL; export class Font_Clip{ private TestClipNum:string="res/comp/fontClip_num.png"; private _ClipNum:string="res/comp/fontClip_num.png"; private _ClipNum1:string="res/comp/fontClip_num.png"; private TestFontClip:string="res/comp/fontClip.png"; private _FontClip:string="res...

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

2. 混合模式-Lighter [ 95%]

...tage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, this.getHexColorString()); } getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChannels.g = 0; //obj.g = Math.floor(obj.g); bgColorChannels.b = Math.floor(bgColorChannels.b); var r = bgCol...

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

3. Sprite-切换纹理 [ 94%]

... WebGL = Laya.WebGL; export class Sprite_SwitchTexture { private texture1: string = "res/apes/monkey2.png"; private texture2: string = "res/apes/monkey3.png"; private flag: boolean = false; private ape: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, ...

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

4. 加载-多种类型资源加载 [ 93%]

... Laya.Handler; export class Loader_MultipleType { private ROBOT_DATA_PATH: string = "res/skeleton/robot/robot.bin"; private ROBOT_TEXTURE_PATH: string = "res/skeleton/robot/texture.png"; constructor() { Laya.init(100, 100); var assets: Array = []; assets.push({ url: this.ROBOT_DATA_PATH, type: Loade...

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

5. 网络和格式-XML [ 93%]

...source) { const Utils = Laya.Utils; let xml; try { xml = Utils.parseXMLFromString(source); } catch (e) { console.log(e.massage); return; } this.printDirectChildren(xml); } // 打印直接子级 printDirectChildren(xml) { let rootNode = xml.firstChild; let nodes = rootNode.childNodes; for (let i = 0;...

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

6. 缓动-逐字缓动 [ 90%]

... Laya.stage.width - w >> 1; let endY = Laya.stage.height / 2 - 50; let demoString = "LayaBox"; for (let i = 0, len = demoString.length; i > 1; var endY: number = Laya.stage.height / 2 - 50; var demoString: string = "LayaBox"; for (var i: number = 0, len: number = demoString.length; i > 1; var endY:i...

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

7. 网络和格式-Socket [ 89%]

...rate "; for (let i = 0; i "); // 使用output.writeByte发送 var message: string = "demonstrate "; for (var i: number = 0; i "); // 使用output.writeByte发送 var message:String = "demonstrate "; for (var i:int = 0; i < message.length; ++i) { output.writeByte(message.charCodeAt(i)); } socket.flus...

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

8. UI-Label [ 89%]

...ateLabel("#0080FF", "#00FFFF").pos(290, 150); } private createLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: Label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { la...

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

9. 文本-下划线 [ 88%]

...s.createText('right', 3, "#FF7F50", 210, 290); } private createText(align: string, underlineWidth: number, underlineColor: string, x: number, y: number): Text { var txt: Text = new Text(); txt.text = "Layabox\n是HTML5引擎技术提供商\n与优秀的游戏发行商\n 面向AS/JS/TS开发者提供...

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

10. UI-Clip [ 88%]

...ler; import WebGL = Laya.WebGL; export class UI_Clip { private buttonSkin: string = "res/ui/button-7.png"; private clipSkin: string = "res/ui/num0-9.png"; private bgSkin: string = "res/ui/coutDown.png"; private counter: Clip; private currFrame: number; private controller: Button; constructor() { // ...

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