Socket
Book a DemoInstallSign in
Socket

@candelas/vue_three_components

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@candelas/vue_three_components

## 文档地址

latest
npmnpm
Version
0.1.7
Version published
Maintainers
1
Created
Source

快速上手

文档地址

https://tomgou.github.io/vue-three-components/

npm 地址

https://www.npmjs.com/package/@candelas/vue_three_components

标准开发

实际项目中,往往会使用 webpackrollup 或者 gulp 的工作流,大多可以做到按需加载页面用到的组件,所以不推荐直接使用 <script> 标签全局引入的方式使用。

全局组件使用

可以在项目的入口文件中引入所有组件或所需组件

import tools from '@candelas/vue_three_components' // 引入组件库
const WaveMesh = tools.createWaveMesh(20, 0x00ff00)
WaveMesh.position.z = 0
WaveMesh.rotateX(Math.PI / 2)
scene.add( WaveMesh );

单个组件按需使用

可以局部注册所需的组件,适用于与其他框架组合使用的场景

import { createWaveMesh } from '@candelas/vue_three_components' // 引入组件库
const WaveMesh = createWaveMesh(20, 0x00ff00)
WaveMesh.position.z = 0
WaveMesh.rotateX(Math.PI / 2)
scene.add( WaveMesh );

Keywords

three

FAQs

Package last updated on 09 Sep 2023

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