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

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

1. 输入设备-地图 [ 100%]

...osition); var errorHandler = new Handler(this, onError); // 使用高精度位置 Geolocation.enableHighAccuracy = true; Geolocation.watchPosition(successHandler, errorHandler); // 绑定作用域 convertToBaiduCoord = convertToBaiduCoord.bind(this); })(); function createDom() { mapDiv = Browser.cre...

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

2. UI-Slider [ 93%]

...aya.stage.addChild(vs); } function onChange(value) { console.log("滑块的位置:" + value); } })();module laya { import Stage = Laya.Stage; import HSlider = Laya.HSlider; import VSlider = Laya.VSlider; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_Slider { constructor...

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

3. UI-ScrollBar [ 92%]

....stage.addChild(vs); } function onChange(value) { console.log("滚动条的位置: value=" + value); } })();module laya { import Stage = Laya.Stage; import HScrollBar = Laya.HScrollBar; import VScrollBar = Laya.VScrollBar; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_S...

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

4. 照相机-正交相机 [ 81%]

... Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; /** * (pos.x pos.y) 屏幕位置 * pos.z 深度取值范围(-1,1); * */ var pos = new Laya.Vector3(310,500,0); var _translate = new Laya.Vector3(0, 0, 0); var dialog = Laya.stage.addChild(new Laya.Image("../../res/cartoon2/background.jpg")); var scene...

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

5. 射线检测-射线检测 [ 76%]

...ouseY; camera.viewportPointToRay(point, ray); //变化小飞龙的缩放和位置,并更新其模拟碰撞器 if (_scale >= 1) _scaleIndex = -1; else if (_scale ,最大检测距离30米,只检测第10层 Laya.Physics.rayCastAll(ray, _outHitAllInfo, 30, 10); for (var i = 0; i ,最大检测距离30...

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

6. 高级应用-寻路导航 [ 59%]

...opfun():void { if (_everyPath && index < _everyPath.length) { //AStar寻路位置 _position.x = _everyPath[index][0]; _position.z = _everyPath[index++][1]; //HeightMap获取高度数据 _position.y = terrainSprite.getHeight(_position.x, _position.z); if (isNaN(_position.y)){ _position.y = moveSprite...

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