Domanda

Lessons 07 tended to give me the idea that we can load one object in many renderers to see it from different views. However I've many issues with it : the property dirty is a property of the object and its attributes and is not a function of the renderer : so when the first renderer is finished he puts all the properties to true and the following renderers have nothing to do.

For example if my object (root) is an empty object with 2 children (child1,child2) which contains not empty objects : - the first renderer works fine (i.e. it adds root, child1 and child2), but the others only add the empty objects because root.dirty==false (see renderer3D.hs, line 591) - the first renderer computes a bounding box fitting the scene, the other don't because root/child1/child2.points.dirty==false (see renderer3D.js at line 793)

So my question is : is it possible to have 1 complex object and manage it in different renderers (while every object has a property which depends of the renderer : dirty) ? Or should I copy it and link events so the transformations in 1 render are reported in the other ones ? Or should I do more modifications ?

È stato utile?

Soluzione

I just created a jsfiddle to create a scenario like you said

http://jsfiddle.net/haehn/ZdzeR/

It all works fine:

scene is an X.object which holds a mesh and a cube. adding it to all the 3 renderers works fine and shows both objects.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top