Macro Three v1.2 Released

Hi everyone!

The first stable version of the Macro Three is now released and available for download. Now you can easily load and display 3D objects in XWiki!

Link to the extension: https://extensions.xwiki.org/xwiki/bin/view/Extension/MacroThree/

You can find the usage instructions and documentation on the extension page. The instructions and demos are also available on the page Macros.ThreeMacro upon extension installation in your wiki.

If you find any bugs or have any feature requests, add them as issues on http://jira.xwiki.org/projects/THREE.

Thanks and hope you like the macro. :slight_smile:

Best,
Fawad

Great @ginpachi! Congrats

Idea for improvement: regroup the 4 parameters file, files, document, attachment into 1 :slight_smile:

In your macro you just need a single references parameters of type ResourceReference (see for example https://github.com/xwiki/xwiki-platform/blob/ba0430d06ff9e637189c78a53205d30cb20c64d6/xwiki-platform-core/xwiki-platform-office/xwiki-platform-office-macro/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java#L65). See also https://extensions.xwiki.org/xwiki/bin/view/Extension/Office%20Macro#HFromWikiSyntax

I think a List<ResourceReference> should work automatically too.

This gives you even more power and is future-proof since new resource type can be added in the future without a change to your macro code.

Nice. I didn’t know about this. This would definitely work great.

One question though. Can we use generics like java.util.List<org.xwiki.rendering.listener.reference.ResourceReference> as parameter type?

It seems generics work.

I had one more question. How exactly can we use ResourceReference to get a URL of the resource directly in velocity?