🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@cedar12/tezero

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cedar12/tezero

一款基于threejs三维组态编辑器

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

介绍

基于threejs

  • 支持快捷键
  • 支持自定义物体组件
  • 支持拖动添加物体组件到场景中
  • 内置场景大纲视图
  • 支持.dae.fbx.glb.gltf等模型导入

安装

通过 yarn

yarn add git+https://gitee.com/cedar12/tezero.git

通过 npm

npm install git+https://gitee.com/cedar12/tezero.git

使用

浏览器

<div id="container"></div>
<script>
// 实例化编辑器核心
const tz = new Tezero(document.getElementBy('container'));
</script>

内置编辑器布局

需要引入样式tezero/dist/style.css

// 实例化编辑器
const tl=new TezeroLayout(document.querySelector('#container'),/*物体组件数据*/,{theme:'light'});
// 编辑器核心
const tz=tl.tezero;

Vue3

<template>
<div id="container"></div>
</template>
<script setup>
import {ref,onMounted} from 'vue';
import {Tezero} from 'tezero';

const containerRef=ref(null);
onMounted(()=>{
  // 实例化编辑器核心 用于自定义编辑器布局
  const tz = new Tezero(containerRef.value);
})
</script>

快捷键

说明
Ctrl + c复制选中物体
Ctrl + v粘贴物体
Ctrl + z撤销
Ctrl + y重做
T切换到移动物体模式
S切换到缩放物体模式
R切换到旋转物体模式
DeleteBackspace

预览

image.png

Keywords

eidtor

FAQs

Package last updated on 27 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts