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

大约有 311 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0084 秒)

121. 输入设备-指南针 [ 76%]

...esText.pos(0, compassImg.y + 400); degreesText.fontSize = 100; degreesText.color = "#FFFFFF"; } // 方位指示器指向当前所朝方位。 function createDirectionIndicator() { directionIndicator = new Sprite(); Laya.stage.addChild(directionIndicator); directionIndicator.alpha = 0.8; directionInd...

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

122. Socket连接不上(已解决) [ 76%]

...            txt.text = "This is a demo";             txt.color = "#FF0000";             txt.fontSize = 50;             txt.stroke = 3;             txt.strokeColor = "#FFFFFF";             txt.pos(50, 100);             Laya.stage.addChild...

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

123. FlashDevelop中第一个程序“Hello Layabox”(ActionScript-LayaAir基础篇(AS3)-快速上手) [ 76%]

...      //设置文本颜色为白色,默认颜色为黑色    txt.color = '#ffffff';         //将文本内容添加到舞台     Laya.stage.addChild(txt);   }  } } ``` ​ **步骤三**:完成代码编写后,使用之前定义的编译快捷键(Alt+F5),把AS3代...

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

124. 输入设备-指南针 [ 76%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.create...

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

125. laya.display.cmd.StrokeTextCmd [ 76%]

...TextCmd Object 绘制描边文字 Public Properties PropertyDefined By  color : String 定义文本颜色,比如"#ff0000"。 StrokeTextCmd  font : String 定义字体和字号,比如"20px Arial"。 StrokeTextCmd  lineWidth : Number 线条宽度。 StrokeTextCmd  text : String 在画布...

来源: Laya2.0_api 发布时间: 20190513

126. laya绘制图形进行缩放的时候有问题 [ 75%]

...y) { sp.graphics.drawPoly( 0, 0, [-35, -35, -35, 35, 35, 35, 35, -35], cfg.color, "#000000", 3 ); } public static LongCube(sp: Laya.Sprite, cfg: any) { sp.graphics.drawPoly( 0, 0, [-70, -35, -70, 35, 70, 35, 70, -35], cfg.color, "#000000", 3 ); } public static TiltedCube(sp: Laya...

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

127. 为什么这个ui中给这个TextInput组件runtime属性绑定了一个类 [ 75%]

...色. if (!this.initText) { this.initText = this.textField.text ; this.initColor = this.textField.color ; }  // 如果是初始提示字符串, 就设置为空, 同时设置颜色和斜体. if (this.textField.text === this.initText) { this.textField.text = "" ; this.textField.color = "#000000" ; thi...

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

128. drawToCanvas截屏为何画不出Text文本呢? [ 75%]

...d(txt); txt.text = "玉树临风"; txt.pos(86, 15); txt.fontSize = 45; txt.color = "#000000";   var htmlCanvas:HTMLCanvas = p6_work.drawToCanvas(575, 1472, 0, 0);             var canvas = htmlCanvas.getCanvas();             var base64 = canvas.toDataURL("image/png");   为什么...

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

129. 加载.lh文件 运行后黑屏 无法显示 [ 75%]

...d(new Laya.Scene3D()) as Laya.Scene3D;         //this.scene.ambientColor = new Laya.Vector3(1, 1, 1);         camera.transform.translate(new Laya.Vector3(0,0.8,1.5));         camera.transform.rotate(new Laya.Vector3( -15, 0, 0), true, false);     //  var camera:Laya.Cam...

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

130. 输入设备-地图 [ 75%]

...ew Text(); Laya.stage.addChild(infoText); infoText.fontSize = 50; infoText.color = "#FFFFFF"; infoText.size(Laya.stage.width, Laya.stage.height); } // 更新设备位置 function updatePosition(p) { // 转换为百度地图坐标 var point = new BMap.Point(p.longitude, p.latitude); // 把原始坐...

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