state of the batching branch / recent changes?

Hi,

I just upgraded my Open Aviation Map prototype codebase to reflect

the current state of the batching branch. (here is the current
state:
http://akos.maroy.hu/~akos/oam-WebGL/

  • it’s not a ‘built’ version, so takes a very long time to download
    at first)

    After the upgrade, I have some questions:

    what is the current state of the batching branch, and is it expected
    that it will be merged into master in a reasonable timeframe?

    geometries used to have a ‘pickData’ attribute, and the viewer
    widget used to have an onObjectSelected event, that would be called
    with a user-supplied callback, with pickData as a parameter. how
    would this work now?

    similarly, the viewer used to have drag&drop support - but now I
    don’t see that. but I see a vague reference to doing this with a
    mixin - are there more specific examples available?

    best regards,

    Akos

Hi Akos,

To answer some of your questions…

The batching branch is now in master. Expect several more pull requests as we add features like more extrusions and outlines. Also, pickData is now id. This is on the GeometryInstance, not a Geometry.

Patrick

A blog on the new Viewer is on my to-do list. What you want the viewerDragDropMixin. Here’s the example from the doc.

// Add basic drag and drop support and pop up an alert window on error.

var viewer = new Viewer(‘cesiumContainer’);

viewer.extend(viewerDragDropMixin);

viewer.onDropError.addEventListener(function(viewerArg, source, error) {

window.alert('Error processing ’ + source + ‘:’ + error);

});

To answer some of your questions...

The batching branch is now in master. Expect several more pull
requests as we add features like more extrusions and outlines.

thank you - I synced to the current master, and all seems to work the
same as with the batching branch. great!

Also, pickData is now id. This is on the GeometryInstance, not a
Geometry.

I see. but still, how do I catch the event of a primitive being clicked on?

previously widget.onObjectSelected this this job, but it doesn't seem to
work anymore :frowning:

yes, I saw this, but forgive my ignorance, but what would be a simple
value for viewerDragDropMixin? say if I just want it to call
console.log(event); ?

I’m sorry, I don’t know you mean by “simple value for viewerDragDropMixin”. Can you elaborate?

a specific example that show how this would work? whatever I tried to
'mix in' didn't work for me, e.g. passing a function to the mixin()
call, etc.

Hi Akos,

The drag-and-drop mixin is a class that we provide, in Source/Widgets/Viewer/viewerDragDropMixin.js.

A working example of its usage can be found in Apps/CesiumViewer/CesiumViewer.js.

–Ed.