1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
This commit is contained in:
Kevin Levron 2020-10-05 23:09:55 +02:00
parent 3b807fdb0f
commit b800071f93
3 changed files with 6 additions and 48 deletions

View File

@ -31,9 +31,12 @@ Thanks to VueJS/ViteJS, **TroisJS use watchers and HMR to update ThreeJS objects
- [ ] Materials - [ ] Materials
- [x] Basic - [x] Basic
- [x] Lambert - [x] Lambert
- [x] Mapcat
- [x] Phong - [x] Phong
- [x] Standard
- [x] Physical - [x] Physical
- [x] Standard
- [x] SubSurface
- [x] Toon
- [ ] ... - [ ] ...
- [ ] Geometries - [ ] Geometries
- [x] Box - [x] Box
@ -52,34 +55,14 @@ Thanks to VueJS/ViteJS, **TroisJS use watchers and HMR to update ThreeJS objects
- [x] TorusKnot - [x] TorusKnot
- [x] Tube - [x] Tube
- [ ] ... - [ ] ...
- [ ] Meshes
- [x] Box
- [x] Circle
- [x] Cone
- [x] Cylinder
- [x] Dodecahedron
- [x] Icosahedron
- [x] Image
- [x] InstancedMesh
- [x] Lathe
- [x] Octahedron
- [x] Plane
- [x] Polyhedron
- [x] Ring
- [x] Sphere
- [x] Sprite
- [x] Tetrahedron
- [x] Text
- [x] Torus
- [x] TorusKnot
- [x] Tube
- [ ] ...
- [ ] Post Processing - [ ] Post Processing
- [x] EffectComposer - [x] EffectComposer
- [x] BokehPass - [x] BokehPass
- [x] FilmPass - [x] FilmPass
- [x] FXAAPass
- [x] HalftonePass - [x] HalftonePass
- [x] Renderpass - [x] Renderpass
- [x] SMAAPass
- [x] UnrealBloomPass - [x] UnrealBloomPass
- [ ] ... - [ ] ...
- [ ] ... - [ ] ...

View File

@ -14,7 +14,6 @@ export default {
}, },
methods: { methods: {
createMaterial() { createMaterial() {
console.log(this.$props);
this.material = new MeshPhongMaterial(propsValues(this.$props, ['id'])); this.material = new MeshPhongMaterial(propsValues(this.$props, ['id']));
}, },
addWatchers() { addWatchers() {

View File

@ -1,24 +0,0 @@
import { CubeRefractionMapping } from 'three';
import CubeTexture from '../core/CubeTexture';
export default {
extends: CubeTexture,
inject: ['material'],
props: {
refractionRatio: { type: Number, default: 0.98 },
},
created() {
this.texture.mapping = CubeRefractionMapping;
this.material.setRefractionMap(this.texture, this.refractionRatio);
},
unmounted() {
this.material.setEnvMap(null);
},
methods: {
refreshTexture() {
this.createTexture();
this.material.setRefractionMap(this.texture, this.refractionRatio);
},
},
__hmrId: 'RefractionMap',
};