three-earth-vue
v0.1.11
Published
A 3d earth component developed based on Threejs, suitable for vue3.x.
Downloads
18
Maintainers
Readme
This is a library for implementing 3D earth based on ThreeJs, suitable for Vue3, which contains earth textures, muddy light, animation, background, halo, starry sky, clouds, light source, geojson, map border, beam of light, scatter, flight line etc.
Note: The size of the package itself is not large, mainly caused by geojson and base64, but don't worry, it will not go to jia'zai if it is not used
Installing
# three install
pnpm add [email protected]
# npm
npm install three-earth
# yarn
yarn add three-earth
# pnpm
pnpm add three-earth
Quick Start
<script lang="ts" setup>
import { ThEarth } from 'three-earth'
</script>
<template>
<th-earth style="height: 300px;" />
</template>
Documentation
Examples
Import separately
If you only want to import the components you need
, you can use the on-demand import method.
// main.ts
import App from './App.vue'
import { createApp } from 'vue'
import { ThEarth, ThEarthBorder, ThEarthLine, ThEarthBeam } from 'three-earth'
...