mirror of
https://github.com/troisjs/trois.git
synced 2024-11-23 20:02:32 +08:00
vite/vue/three versions
This commit is contained in:
parent
61e1c0ecbd
commit
594290a96e
@ -8,12 +8,14 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"gsap": "^3.5.1",
|
"gsap": "^3.5.1",
|
||||||
"three": "^0.122"
|
"three": "^0.125",
|
||||||
|
"vue": "^3.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-buble": "^0.21.3",
|
"@rollup/plugin-buble": "^0.21.3",
|
||||||
"@rollup/plugin-replace": "^2.3.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": "^7.7.0",
|
||||||
"eslint-config-airbnb-base": "^14.2.0",
|
"eslint-config-airbnb-base": "^14.2.0",
|
||||||
"eslint-config-standard": "^14.1.1",
|
"eslint-config-standard": "^14.1.1",
|
||||||
@ -24,8 +26,7 @@
|
|||||||
"eslint-plugin-vue": "^6.2.2",
|
"eslint-plugin-vue": "^6.2.2",
|
||||||
"rollup-plugin-vue": "^6.0.0-beta.10",
|
"rollup-plugin-vue": "^6.0.0-beta.10",
|
||||||
"sass": "^1.26.10",
|
"sass": "^1.26.10",
|
||||||
"vite": "^1.0.0-rc.9",
|
"vite": "^2.0.0-beta.65"
|
||||||
"vue": "^3.0.2"
|
|
||||||
},
|
},
|
||||||
"main": "build/trois.js",
|
"main": "build/trois.js",
|
||||||
"module": "build/trois.module.js",
|
"module": "build/trois.module.js",
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<Slider1 :images="images" />
|
<Slider :images="images" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Slider1 from '../sliders/Slider1.vue';
|
import Slider from '../sliders/Slider1.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Slider1 },
|
components: { Slider },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
images: [
|
images: [
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<Slider2 :images="images" />
|
<Slider :images="images" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Slider2 from '../sliders/Slider2.vue';
|
import Slider from '../sliders/Slider2.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Slider2 },
|
components: { Slider },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
images: [
|
images: [
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
BufferGeometry,
|
BufferGeometry,
|
||||||
DoubleSide,
|
DoubleSide,
|
||||||
Face3,
|
Face3,
|
||||||
Geometry,
|
|
||||||
InstancedBufferAttribute,
|
InstancedBufferAttribute,
|
||||||
InstancedMesh,
|
InstancedMesh,
|
||||||
MathUtils,
|
MathUtils,
|
||||||
@ -13,6 +11,8 @@ import {
|
|||||||
Vector3,
|
Vector3,
|
||||||
} from 'three';
|
} from 'three';
|
||||||
|
|
||||||
|
import { Geometry } from 'three/examples/jsm/deprecated/Geometry.js';
|
||||||
|
|
||||||
export default class AnimatedPlane {
|
export default class AnimatedPlane {
|
||||||
constructor(params) {
|
constructor(params) {
|
||||||
Object.entries(params).forEach(([key, value]) => {
|
Object.entries(params).forEach(([key, value]) => {
|
||||||
@ -144,7 +144,7 @@ export default class AnimatedPlane {
|
|||||||
this.dy = this.wSize / 2;
|
this.dy = this.wSize / 2;
|
||||||
geometry.translate(-this.dx, -this.dy, 0);
|
geometry.translate(-this.dx, -this.dy, 0);
|
||||||
|
|
||||||
this.bGeometry = new BufferGeometry().fromGeometry(geometry);
|
this.bGeometry = geometry.toBufferGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
initAnimAttributes() {
|
initAnimAttributes() {
|
||||||
|
5
vite.config.js
Normal file
5
vite.config.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import vue from '@vitejs/plugin-vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
plugins: [vue()]
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user