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

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

1. 混合模式-Lighter [ 100%]

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

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

2. Sprite-切换纹理 [ 99%]

... 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.c...

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

3. 网络和格式-XML [ 98%]

...mlValue); } function proessXML(source) { try { var xml = Utils.parseXMLFromString(source); } catch (e) { console.log(e.massage); return; } printDirectChildren(xml); } function printDirectChildren(xml) { var rootNode = xml.firstChild ; var nodes = rootNode.childNodes; for (var i = 0; i item aitem bso...

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

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

... 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,...

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

5. 网络和格式-Socket [ 95%]

...rate "; for (var 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...

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

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

... Laya.stage.width - w >> 1; var endY = Laya.stage.height / 2 - 50; var demoString = "LayaBox"; for (var 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...

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

7. UI-Label [ 93%]

...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...

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

8. 文本-下划线 [ 93%]

...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开发者提供...

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

9. UI-Clip [ 92%]

...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; c...

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

10. UI-ComboBox [ 92%]

...ndler; import WebGL = Laya.WebGL; export class UI_ComboBox { private skin: string = "../../res/ui/combobox.png"; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode ...

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