Closed aminubakori closed 9 years ago
Hello I have been doing some experiments and I used this code for add custom 3D objects, but the object not disappear when the marker is not on tracking like the others 3D objects.
awe.projections.add({
id: 'projection_1',
geometry: {
path: 'resources/Lander.obj',
x: 120,
y: 120,
z: 120
},
scale: {
x: 10,
y: 10,
z: 10
},
position: {
x: 150,
y: 150,
z: 50,
},
material: {
type: 'phong',
color: 0xFFFFFF
},
texture: {
path: 'resources/Lander_D.png'
},
},
{
poi_id: 'poi_1'
});
Hi @aminubakori - the example that @magiraldooc has posted should give you what you need.
However, the geometry shouldn't really have the x/y/z keys as this definition is meant to be taken from the .obj file itself.
@magiraldooc see my comment in #8 in response to your question here - please post any comments about that in that issue thread.
Hello, What is this .obj format? I'm using MeshLab to create a mesh in .obj format (the Alias Wavefront Object), but I get a "not well formed" error.
Hello, i'm trying to add a custom object to my scene, but i doesnt work. I'm following the same steps that @magiraldooc explained on his post...And i'm sure that the problem is loading my object , because if i change it to 'shape:cube' it works perfectly. Any ideas ? Thank you very much!
awe.projections.add({ id: 'star1', geometry: { path: './cube.obj', x: 60, y: 30, z: 5 }, scale: { x: 1, y: 1, z: 1 }, material: { type: 'phong', color: 0x000000 } }, {poi_id: 'marker'});
I receive the same error with custom obj: "not well formed" The obj is standard, created with Blender.
Hi Guys I have been looking for how to add custom 3d objects to awe.js but haven't found any useful information. Please urgent help is needed on this.