1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-27 14:02:01 +08:00

vite/vue/three versions

This commit is contained in:
Kevin Levron 2021-02-11 23:50:57 +01:00
parent 61e1c0ecbd
commit 594290a96e
5 changed files with 19 additions and 13 deletions

View File

@ -8,12 +8,14 @@
},
"dependencies": {
"gsap": "^3.5.1",
"three": "^0.122"
"three": "^0.125",
"vue": "^3.0.5"
},
"devDependencies": {
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-replace": "^2.3.3",
"@vue/compiler-sfc": "^3.0.0",
"@vitejs/plugin-vue": "^1.1.4",
"@vue/compiler-sfc": "^3.0.5",
"eslint": "^7.7.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-standard": "^14.1.1",
@ -24,8 +26,7 @@
"eslint-plugin-vue": "^6.2.2",
"rollup-plugin-vue": "^6.0.0-beta.10",
"sass": "^1.26.10",
"vite": "^1.0.0-rc.9",
"vue": "^3.0.2"
"vite": "^2.0.0-beta.65"
},
"main": "build/trois.js",
"module": "build/trois.module.js",

View File

@ -1,12 +1,12 @@
<template>
<Slider1 :images="images" />
<Slider :images="images" />
</template>
<script>
import Slider1 from '../sliders/Slider1.vue';
import Slider from '../sliders/Slider1.vue';
export default {
components: { Slider1 },
components: { Slider },
data() {
return {
images: [

View File

@ -1,12 +1,12 @@
<template>
<Slider2 :images="images" />
<Slider :images="images" />
</template>
<script>
import Slider2 from '../sliders/Slider2.vue';
import Slider from '../sliders/Slider2.vue';
export default {
components: { Slider2 },
components: { Slider },
data() {
return {
images: [

View File

@ -1,9 +1,7 @@
import {
BufferGeometry,
DoubleSide,
Face3,
Geometry,
InstancedBufferAttribute,
InstancedMesh,
MathUtils,
@ -13,6 +11,8 @@ import {
Vector3,
} from 'three';
import { Geometry } from 'three/examples/jsm/deprecated/Geometry.js';
export default class AnimatedPlane {
constructor(params) {
Object.entries(params).forEach(([key, value]) => {
@ -144,7 +144,7 @@ export default class AnimatedPlane {
this.dy = this.wSize / 2;
geometry.translate(-this.dx, -this.dy, 0);
this.bGeometry = new BufferGeometry().fromGeometry(geometry);
this.bGeometry = geometry.toBufferGeometry();
}
initAnimAttributes() {

5
vite.config.js Normal file
View File

@ -0,0 +1,5 @@
import vue from '@vitejs/plugin-vue';
export default {
plugins: [vue()]
};