npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

alibaba-lyj-js-marktool

v0.0.21

Published

临云镜标注工具SDK

Downloads

87

Readme

背景介绍

临云镜标注工具 SDK 主要提供了基于全景图像的空间标注能力,包括空间结构、墙线、门、窗、虚拟墙、凹凸墙、特征区等标注行为,整个 SDK 包括以下几个组成部分:

  1. Canvas: 提供了全景图像的二维空间结构渲染,包含空间结构、墙线、门、窗、虚拟墙等标注操作,以及标注的样式配置及事件监听。
  2. Pano:提供了全景图像的三维空间结构渲染,包含墙线、门、窗、凹凸墙,以及墙高、空间旋转、垂直矫正等操作。
  3. Plane: 提供了对标注空间的二维平面图预览。
  4. Preview: 提供了对标注空间的三维模型预览。

该 SDK 与框架无关,您可在 React 框架中使用,也可嵌入到 Angular\Vue 等任何框架中使用。本文档将以嵌入 React 的方式演示如何利用该 SDK 进行标注

快速上手

获取

  • npm 安装
  npm i --save alibaba-lyj-js-marktool
  • script 安装
  <script src=' https://g.alicdn.com/sail-fe/aoding-marktool-sdk-umd/0.0.2/bundle.js'></script>
  <script>
    var { MarkTool, DrawPano } = window.SailLib
  </script>

引入 MarkTool

import { MarkTool } from 'alibaba-lyj-js-marktool'

准备容器

MarkTool 中包含三维视图二维视图预览图平面图,根据你的需要准备相应的 div 容器

<body>
  <div id="Pano" />
  <div id="Canvas" style={{ height: 600, width: 600 }} />
  <div id="Preview" />
  <div id="Plane" style={{ height: 500, width: 500 }} />
</body>

初始化 MarkTool

  • 创建 MarkTool 对象
const mark = new MarkTool()

const { Pano, Preview, Plane, Canvas } = mark
  • 注册 Dom 容器 & 初始化组件
Pano.registerDom(document.getElementById('Pano'))
Preview.registerDom(document.getElementById('Preview'))
Plane.registerDom(document.getElementById('Plane'))
Canvas.registerDom(document.getElementById('Canvas'))
  • 注册配置 & 监听事件
Pano.registerConfig({
  minWallHeight: 0.3, // 调整墙高最大值
  maxWallHeight: 5,
})
Pano.registerEvent({
  onLoad: () => {
    console.log(111)
  },
})
  • 加载数据 & 创建视图

mark.setLayoutData(mockData)

详细 API 信息请查看docs