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

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

121. 鼠标交互-双指旋转(多点触控) [ 69%]

...nMouseUp); } function createSprite() { sp = new Sprite(); var w = 200, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onM...

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

122. UI-FontClip [ 69%]

...lipnum1.sheet = "0123456789"; clipnum1.value = "223388"; fontClip.pos(240, 300); fontClip.sheet = "鼠牛虎兔龙蛇马羊 猴鸡狗猪年快乐"; fontClip.value = "猪年快乐"; fontClip.spaceY = 10; TestFontClip.pos(200, 200); TestFontClip.sheet = "鼠牛虎兔龙蛇马羊猴鸡狗猪年快乐";...

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

123. 使用mask后,只要调用 Laya.Resource.destroyUnusedResources() 就会引起报错 [ 69%]

...e(); bgSprite.graphics.drawRect(0, 0, 200, 200, "#0xFFFF00"); bgSprite.pos(300, 300); Laya.stage.addChild(bgSprite); let mask = new Laya.Sprite(); bgSprite.mask = mask; mask.graphics.drawCircle(0, 0, 100, "0x0000FF"); window.onblur = function() { console.log("onblur....?"); Laya.timer.once(2000, nul...

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

124. 绘制圆形与扇形(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 69%]

...ite_DrawShapes()         {             Laya.init(500, 300);             drawSomething();         }            private function drawSomething():void         {             sp = new Sprite();             Laya.stage....

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

125. 2D物理-碰撞过滤器 [ 69%]

...232628"; this.createHouse(); for (var i = 1; i <= 3; i++) { this.createBox(300, 300, 20, 20, i); this.createTriangle(500, 300, 20, i); this.createCircle(700, 300, 10, i); } } private function createHouse() { var house= new Sprite(); Laya.stage.addChild(house); var rigidbody: RigidBody = house.addCom...

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

126. 请问laya2.0 2d物理有射线检测功能吗 [ 69%]

...point) console.log("normal",normal) console.log("fraction",fraction) },{ x:300, y:100 },{ x:300, y:1000 }) //每碰到一个物体就会触发一次回调函数,没碰到物体就不会触发 //在回调函数里加上renturn 0 ,可以中断检测,比如只想检测碰到的第一个物体时...

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

127. 绘制圆形与扇形(TypeScript-LayaAir基础篇(TS)-矢量图) [ 69%]

... constructor()         {             Laya.init(500, 300, WebGL);             this.drawSomething();         }            private drawSomething(): void {             this.sp = new Sprite();             Laya.stage.addChi...

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

128. textinput(type=password)手机打开华为安全键盘后,无法关闭(官网的例子) [ 68%]

...var WebGL = Laya.WebGL;     var SPACING = 100;     var INPUT_WIDTH = 300;     var INPUT_HEIGHT = 50;     var Y_OFFSET = 50;     var skins;     (function()     {         // 不支持WebGL时自动切换至Canvas         Laya.init(800, 600, WebGL);         Laya.s...

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

129. BackGround.super(this);这个报错 Cannot read property 'call' of undefined [ 68%]

...11 赞同来自: var shouye=(function(){ (function shouye(){ Laya.init(100,300); this.bgimg=new BackGround(); Laya.stage.addChild(this.bgimg); })(); return shouye; })(); var BackGround = (function (_super) { function BackGround() { BackGround.super(this); this.bg=new Laya.sprite; this.bg.loaImage(...

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

130. 富文本:LayaAir下 HtmlDivElement的使用汇总 [ 68%]

...Element=new HTMLDivElement(); html3.style.lineHeight=30; html3.style.width=300; html3.style.align="center"; html3.innerHTML="&lt;br/&gt;&lt;span&gt;  我的第一行要换行&lt;/span&gt;"; Laya.stage.addChild(html3); var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,300,30,null,"#999999"); Lay...

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