todo
- vuejs
- threejs
- typescript
TODO
TODO
Using npm:
npm i cubestack
Using yarn:
yarn add cubestack
<cubesample></cubesample>
cube sample<cubestack></cubestack>
custom cube
main.js/main.ts
import cubefrom 'cubestack'
Vue.config.productionTip = false
Vue.use(cube)
yourcomponment.vue
<template>
<div id="app" style="background-color:#9C27B0">
<cubesample></cubesample>
</template>
main.js/main.ts
import cube, {packageDefaultConfig} from 'cubestack'
const options: packageDefaultConfig = {
renderconfig: {
order: 2,
},
}
Vue.use(cube, options)
yourcomponment.vue
<template>
<div id="app" style="background-color:#9C27B0">
<cubesample></cubesample>
</template>
main.js/main.ts
import cube, {packageDefaultConfig} from 'cubestack'
const options: packageDefaultConfig = {
renderconfig: {
alg: 'RURUFB'
},
}
Vue.use(cube, options)
yourcomponment.vue
<template>
<div id="app" style="background-color:#9C27B0">
<cubesample></cubesample>
</template>
renderconfig,
preferanceconfig,
themeconfig,
playerconfig,
bottomlayer
- renderconfig
order | cube order |
alg | scramble |
scene | working scene |
masktype | the masktype of cube |
size | size of cube |
coverImgNotModel | the first frame is img or model |
- preferanceconfig
version | version |
scale | scale |
perspective | perspective |
angle | Horizontal perspective |
gradient | Vertical perspective |
frames | frames rate |
sensitivity | sensitivity of touch control |
mirror | mirror show or hide |
hollow | hollow or solid |
shadow | shadow |
- themeconfig
version | |
dark | dark or light |
colors | cube colors |
- playerconfig
autoplay | |
loop | |
hoverplay | |
lock | |
breath | |
autorotate |
- bottomlayer set the color of bottomlayer default bottom layer is white color
- U yellow
- D white
- R red
- L orange
- F green
- B blue
todo
- setting pannel
- player pannel
- record pannel
- API
- support html file