Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Node dynamic config callbacks should execute on Node's scope

#139

Nodes can be configured with callbacks, like this Rotate node that gets it's angle property off the data scope:

    SceneJS.rotate(function(data) {
        return { angle: data.get('pitch'), 1.0 };
    }

The mechanism within the nodes for converting the callback's result into properties is actually a bit of a runtime bottleneck on each node. Plus, it's no quite clear that whats going on in terms of what properties are actually being set on the node.

We could just call the callback on the Node scope, then just drive the node's setters inside of it, like this:

    SceneJS.rotate(function(data) {
         this.setAngle(data.get('pitch'));
         this.setX(1.0);
    },

Here we can see exactly where on the node each element of the data is going. Plus, we can flag node state updates inside node setters.

Reported by lindsay.kay (at xeolabs) · August 7th, 2010 @ 02:50 AM

State: invalid
Milestone: V0.7.7

Activity

  1. lindsay.kay (at xeolabs)
    lindsay.kay (at xeolabs)
    • State changed from new to resolved

    This is part of the plan for on-demand FPS : #137 FPS on demand to reduce CPU load by idling scene graph

    The idea is to more clearly define those channels through which scene state changes occur so we can determine need for the next frame render.

    August 7th, 2010 @ 03:39 AM

  2. lindsay.kay (at xeolabs)
    lindsay.kay (at xeolabs)
    • State changed from resolved to invalid

    August 31st, 2010 @ 10:41 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.