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

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

221. Sprite-旋转缩放 [ 78%]

...a.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.showApe(); } showApe() { th...

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

222. 2D物理-桥 [ 78%]

...static"; point1.addComponentIntance(pointRB1); let preBody = pointRB1; let width = 20, height = 2.5; for (let i = 0; i { let targetX = (300 + Math.random() * 400) / Laya.Physics.PIXEL_RATIO, targetY = 500 / Laya.Physics.PIXEL_RATIO; let newBall = new Laya.Sprite(); Laya.Laya.stage.addChild(newBall);...

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

223. laya.display.AnimationBase_API3.0 [ 78%]

...INGPONG WRAP_POSITIVE WRAP_REVERSE drawtocanvCtx Accessors _isHeightSet _isWidthSet active activeInHierarchy alpha anchorX anchorY blendMode cacheAs components count customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalSc...

来源: Laya3.0_api 发布时间: 20231115

224. hitTestPoint对象父容器rotation旋转之后检测不了碰撞 [ 78%]

...new Laya.Sprite() _fish.graphics.drawRect(this.are.x, this.are.y, this.are.width, this.are.height, "#00ff00"); _fish.x = 300 _fish.y = 200 this.addChild(_fish); Laya.timer.loop(100, this, function () { console.log(_fish.x, _fish.y, _fish.width, _fish.height, _fish.rotation); if (_fish.hitTestPoint(_...

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

225. HTMLDivElement使用滤镜时显示异常 [ 78%]

...lement(); text.style.lineHeight = 30; text.style.color = color; text.style.width = 500; text.style.align = "center"; text.style.weight = "bold"; text.innerHTML = "中华人民共和国"; text.filters = [new GlowFilter("#000", 4, 2, 2)]; text.x = (ClientConfig.displayWidth-text.width)/2; text.y = (Cl...

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

226. Clip属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 78%]

...lipX、竖向分隔数量 clipY,或横向分割每个切片的宽度 clipWidth、竖向分割每个切片的高度 clipHeight,从左向右,从上到下,分割组合为一个切片动画。 ​ Clip 组件可以用来播放切片动画,和显示切片动画的某一帧图片。 ​ 点击...

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

227. laya.display.Stage_API3.0 [ 78%]

... _skinBaseUrl _url autoSize canvasDegree canvasRotation designHeight designWidth focus hitTestPrior mouseThrough name renderingEnabled screenAdaptationEnabled tag useRetinalCanvas ALIGN_BOTTOM ALIGN_CENTER ALIGN_LEFT ALIGN_MIDDLE ALIGN_RIGHT ALIGN_TOP FRAME_FAST FRAME_MOUSE FRAME_SLEEP FRAME_SLOW SC...

来源: Laya3.0_api 发布时间: 20231115

228. Tree属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 78%]

..."clipY": "3"}}, {"type": "Label", "props": {"y": "1", "text": "treeItem", "width": "150", "left": "33", "height": "22", "name": "label", "color": "#ffff00", "right": "0", "x": "33"}}, {"type": "Clip", "props": {"x": "0", "name": "arrow", "y": "5", "skin": "ui/clip_tree_arrow.png", "clipY": "2"}}], "...

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

229. [LayaAir3]sprite.drawToTexture( ) 无法绘制容器内容 [ 78%]

...drawToTexture,例如     onEnable(): void {         const { x, y, width, height } = this.box         Laya.loader.load('comp/image.png').then(v=>{             const texture = this.box.drawToTexture(width, height, x, y) as Laya.Texture             this.snapshot.texture = tex...

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

230. 陀螺仪与加速计(ActionScript-LayaAir基础篇(AS3)-硬件设备相关) [ 78%]

... info.fontSize = 50;  info.color = "#FFFFFF";  info.size(Laya.stage.width, Laya.stage.height);  Laya.stage.addChild(info);     Gyroscope.instance.on(Event.CHANGE, this, onDeviceorientation); }   private function onDeviceorientation(absolute:Boolean, rotationInfo:RotationInfo):void...

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