Skip to content

Commit 637d65e

Browse files
author
Sascha Braun
committed
update samples and readme
1 parent c03f5e2 commit 637d65e

15 files changed

+157
-328
lines changed

README.md

Lines changed: 82 additions & 205 deletions
Large diffs are not rendered by default.
-23 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-97.9 KB
Binary file not shown.

samples/views/HoverBehaviour.ts renamed to samples/components/behaviours/HoverBehaviour.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, Mixins, Prop } from "vue-property-decorator";
22

3-
import { BehaviourComponent } from "../../src";
3+
import { BehaviourComponent } from "../../../src";
44

55
@Component
66
export class HoverBehaviour extends Mixins(BehaviourComponent) {

samples/views/MyBehaviour.ts renamed to samples/components/behaviours/OrbitBehaviour.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as THREE from "three";
22
import { Component, Mixins, Prop } from "vue-property-decorator";
33

4-
import { BehaviourComponent } from "../../src";
4+
import { BehaviourComponent } from "../../../src";
55
import { OrbitControls } from "./OrbitControls";
66

77
interface Vec3 {
@@ -11,7 +11,7 @@ interface Vec3 {
1111
}
1212

1313
@Component
14-
export class MyBehaviour extends Mixins(BehaviourComponent) {
14+
export class OrbitBehaviour extends Mixins(BehaviourComponent) {
1515
@Prop()
1616
public data!: {
1717
position: Vec3;
@@ -23,7 +23,7 @@ export class MyBehaviour extends Mixins(BehaviourComponent) {
2323

2424
public created() {
2525
if (!this.data) {
26-
throw new Error("Could not initialize MyBehaviour: data is missing");
26+
throw new Error("Could not initialize OrbitBehaviour: data is missing");
2727
}
2828
this.camera = new THREE.PerspectiveCamera();
2929
this.controls = new OrbitControls(this.camera);

samples/views/StandardMaterial.ts renamed to samples/components/materials/StandardMaterial.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { MeshStandardMaterial, Texture } from "three";
22
import { Component, Prop, Vue } from "vue-property-decorator";
33

4-
import { Application, components, MaterialFactory } from "../../src";
4+
import { Application, components } from "../../../src";
55

66
const { Material } = components;
77

@@ -36,21 +36,4 @@ export default class StandardMaterial extends Vue {
3636
mat.map = texture as Texture;
3737
return mat;
3838
}
39-
40-
public created() {
41-
console.log("standard material created", this.name);
42-
// this.factory = async (app: Application) => {
43-
// let texture;
44-
// if (this.map) {
45-
// texture = await app.assets.textures.get(this.map);
46-
// }
47-
// const mat = new MeshStandardMaterial({
48-
// color: this.color,
49-
// metalness: this.metalness
50-
// });
51-
// mat.map = texture as Texture;
52-
// console.log("standard material created");
53-
// return mat;
54-
// };
55-
}
5639
}

0 commit comments

Comments
 (0)