Blender - three.js export - Linked Groups - export

I have a blender scene containing an Instance of a Linked Group.
When exporting to three.js, the geometry for the elements of that group are not being exported as separate files.
If I append (not link) the group to the scene and then select "Embed meshes" when exporting the json files contains all the geometries from the referenced .blender file that stores the group.
However, duplicating the group adds another identical set of meshes doubling the size of the file.
What would be the best practice workflow for this scenario:
lib.blender - containing a group (like a tree with branches and leaves)
forest.blender - the scene with several instances of the same tree.
export from blender to three.js and loading the scene using SceneLoader.

Related

Randomly set point on model's surface (Not sphere)

I am creating a React project with React Three fiber to add a 3D model that the user can interact with.
Following the documentation, I imported my model (GLB format) I configured my camera.
Now I want to add random points on the surface of the model (like on this example => example )
Unfortunately, I cannot find the method to be applied in the Three Fiber documentation.
Anyone can tell me how to do that ?
Thank you for your time !

How to specify facilityId for a tileset in Azure IndoorMaps?

I've followed the Azure Indoor Maps Creator tutorial here but used a python script from another repository here to make it simpler to upload the map files. No PostMan required basically.
The sample wires up a levelchanged event handler and outputs the event data to console. The event's data for facilityId is always FCL13. I cannot find where this data is specified anywhere. Not in the python script, the sample data zipfile manifest.json, nor in the DWG files (with my limited ability to view those).
I assume I should be able to specify which facility I am uploading data for so would either expect the API calls to be provided this (from the python script), or it should be some metadata within the DWG files.
My intention was to upload more than one building's floor maps so need the facilityId to be configurable. Having specific tilesets associated to different facilityIds allows me to know which facility had its level changed during a levelchanged event.
Where is the facilityId data specified for a specific map data upload?
All Ids (facilityId, levelId, unitId, etc.) are generated when you create a dataset. These Ids are not meant to be set manually.
It is possible to list facilityIds loaded in the map, along with their names, address info, etc. that was provided in manifest.json.
Note: It looks like the 'indoorTiles' source lacks the getShapes() method so a workaround is required to query the underlying mapbox.
map._getMap().querySourceFeatures('indoorTiles', {sourceLayer: 'Indoor facility'});
From Mapbox's documentation on querySourceFeatures():
Because features come from tiled vector data or GeoJSON data that is converted to tiles internally, feature geometries may be split or duplicated across tile boundaries and, as a result, features may appear multiple times in query results.

Qlik Sense - create a list or graph that will load a table (QVD Object) when clicking the item

I'm very new into Qlik sense and I want to know if this is possible. So I did a data connection load to load a data into QVD objects (for example 60 tables of districts). When editing a sheet, is it possible to create a list that displays all districts and, when i click on a district, it will load that District table (object) which will expand more graphs that associate to that table? I hope this make sense. Please let me know if i should revise it.
If I understand correctly. You want to load new data when some condition is met (in your case when on district value is selected) right?
If this is the case then I think that you can use Dynamic Views.
Dynamic Views allow you to load specific objects from a template app. So the workflow will be:
prepare template app with all the objects that can be used in another apps. Including the script with placeholders where the selections will be passed
in your main app - include these objects and set a threshold (in your case will be something like count(distinct District) = 1
make selection in the District filed
if the threshold is reached Qlik will pass the selections to the template app, it will reload it and the objects will be populated (how fast the objects will be populated depends on the script reload time of the template app)
Documentation
Video demonstration
P.S.0 Just to mention that Dynamic Views are "subset" of On-Demand App Generation (ODAG). The difference here is that ODAG will produce a new temporary app (again based on the template app) that the user can interact with and dispose whenever is needed (or Qlik will delete if after some specified time)
P.S.1 If your data is not too big and you can allow yourself to load all the data for all Districts then you can use calculation condition for the charts that require only one District to be selected

ARKit RealityKit WorldMap Persistence

So I have a RealityKit app, in it I add variousEntities.
I looked for inspiration for persistence at Apple's SceneKit example with the code, which I implemented only to find out missing Entities upon WorldMap Load
I'm assuming you are able to save and load the worldMap from the ARView's session, but the problem is that this only persists the old styler ARAnchors, and not the cool new Entity objects from the new RealityKit features.
The work around that I did, was to initialize my AnchorEntities, using the constructor that takes an ARAnchor. So, from my hitTest, or RayCast, I take the world transform and save it as an ARAnchor, then use that to initialize an AnchorEntity. I gave this ARAnchor a unique name, to be used later to re-map to an entity upon loading a persisted world map, since this map still only has ARAnchors.
let arAnchor = ARAnchor(name: anchorId, transform: rayCast.worldTransform) // ARAnchor with unique name or ID
let anchorEntity = AnchorEntity(anchor: arAnchor)
That's what it looks like before adding the anchors to the scene for the first time. After you save your world map, close, and reload, I then loop over the loaded or persisted ARAnchors, and associate each anchor with their respective Entities, which maps to the name in the ARAnchor.
let anchorEntity = AnchorEntity(anchor: persistedArAnchor) // use the existing ARAnchor that persisted to construct an Entity
var someModelEntity: Entity = myEntityThatMatchesTheAnchorName // remake the entity that maps to the existing named ARAnchor
anchorEntity.addChild(someModelEntity)
arView.scene.addAnchor(anchorEntity)
It's indirect, but taking advantage of that association between AnchorEntity and ARAnchor was the first solution I could find, given the limitation of only knowing how to persists ARAnchors, and not Entities in the worldMap.

Draft.js how to represent list of items?

In order to create image carousel, I thought creating nested blocks as following
image_carousels
image
image
image
Then I found draft.js doesn't support nested blocks. (https://github.com/facebook/draft-js/issues/143 they say draft.js is flat)
But on the other hand, there's UL/OL and LI , that's like group and element structure.
Is there a way to group elements/components/blocks so that we can render the whole + individual (such as we render carousel with individual images)
Draft.js doesn’t actually support ul/ol and li as separate blocks – these are just implemented as ordered-list-item and unordered-list-item blocks, stored as a flat list in the editor.
The nesting is "faked" by having those blocks’ depth set to values above 0, and using wrappers to wrap sequences of those blocks into a parent element. See the docs: Advanced topics – Custom block wrappers
.
If it works for you, you could follow a similar model and have a single block type image-carousel-item, that contains the contents of each "slide", then use a wrapper to render carousels with multiple items however you want, both in the editor and when exporting HTML.

Resources