@lancercomet/dancefloor

Use Three with Vue.
845 1
Install
npm install @lancercomet/dancefloor
Latest Version:0.9.0
Vue:3
License:Apache-2.0
Last Updated:May 7, 2024
Links: GitHub  ·  npm
Maintainer: pwch

DanceFloor

This is a Vue binding for ThreeJS, just like a Vue version of ReactThreeFiber.

Quick start

import { BoxGeometry, BasicMaterial, Mesh, useScene, PerspectiveCamera, OrbitControls } from '@lancercomet/dancefloor'
import { defineComponent } from 'vue'

const MyApp = defineComponent({
  name: 'MyApp',

  setup () {
    const { Scene } = useScene()

    return () => (
      <Scene>
        <PerspectiveCamera position={{ x: 5, y: 5, z: 5 }}>
          <OrbitControls />
        </PerspectiveCamera>

        <Mesh>
          <BoxGeometry width={1} height={1} depth={1} />
          <BasicMaterial params={materialParamsRef.value} />
        </Mesh>
      </Scene>
    )
  }
})

export {
  MyApp
}

Related Packages

@lancercomet/vue2-jsx-runtime

JSX runtime for Vue 2.

3,372 25

Version History

Version Released Vue License
0.9.0 ^3.2.47 Apache-2.0
0.8.1 ^3.2.47 Apache-2.0
0.8.0 ^3.2.47 Apache-2.0
0.7.1 ^3.2.47 Apache-2.0
0.7.0 ^3.2.47 Apache-2.0
Pre-releases (7)
Version Released Vue License
0.1.3-test-6
0.1.3-test-5
0.1.3-test-4
0.1.3-test-3 ^3.2.39
0.1.3-test-2 ^3.2.39