Comments (4)
the material component stores the texture path directly, making it hard to update
In theory, this should not happen. Only if user change the parameters of the materials on the scene manually. or the component data was changed in the Js code during scene initialization. Because I made a check in json-utils that if the component information is present in the mixin
that is applied to the element, then do not save it in JSON. But it seems that this does not always work correctly, I can see this example with markup
from 3dstreet.
should we consider letting users modify scenes only through a higher level street component that stores data in the same form as streetmix json with segment type and variants on those segments? that would empower us to make updates to textures or other elements of a segment without needing to modify user scene data to support the updates.
But what if the user wants to change the segment elements - any of the components - position, rotaion, material, etc? Then this information still needs to be saved in JSON.
But we can make a high-level component for streets/segments and use information from it to initially load the scene. And store information in JSON only for elements that have been changed or added by the user. I'm still thinking about how this can be done, but it would greatly reduce the JSON size. Maybe we don’t even have to create additional components, but use streetmix data.
And there is also a question - what to do with animated elements that move around the scene. We can offer random animation if it is enabled. That is, do not save the position of all animated objects, but generating them randomly while scene load
from 3dstreet.
the material component stores the texture path directly, making it hard to update
In theory, this should not happen. Only if user change the parameters of the materials on the scene manually. or the component data was changed in the Js code during scene initialization. Because I made a check in json-utils that if the component information is present in the
mixin
that is applied to the element, then do not save it in JSON. But it seems that this does not always work correctly, I can see this example with markup
No, in this case with dividers saving data works correctly. Alternatively, to fix it on older scenes, we could add repeat
information in material
to the divider
mixin rather than aframe-streetmix-parser.js.
...No, I tried adding data to the mixin inside assets.js, but the data is applied to the element from JSON. In the case of divider, the material:repeat
property is calculated based on the street length.
I can add a check to json-utils when loading from JSON - if the property is present in the mixin, then use the value from the mixin. Then using repeat in the mixin inside assets for the default street length can make a better display option for the divider
from 3dstreet.
But we can make a high-level component for streets/segments and use information from it to initially load the scene. And store information in JSON only for elements that have been changed or added by the user. I'm still thinking about how this can be done, but it would greatly reduce the JSON size. Maybe we don’t even have to create additional components, but use streetmix data.
I think it's a good idea to do this. This will eliminate the need for versioning in many cases
from 3dstreet.
Related Issues (20)
- add new cablecar object to replace legacy tram HOT 1
- sometimes an svg layer will load 90º incorrect on one rotation axis HOT 15
- Consider adding objects from UO team by Luke
- remove date and hash from console log
- new scene function - reference layer is not removed when loading new scene HOT 2
- bevel option on svg extrude HOT 7
- issue: cannot open streetmix url with unsupported segment variants HOT 2
- change representation for variantString 'median' for 'divider' segment type
- add people for outdoor-dining occupied variant
- add variants car-with-bus, car-with-bike, sharrow, truc and anothers for drive-lane segment
- add shared bus and bike variant support for bus-lane segment
- add two-way variant for bike-lane segment
- streetplan-loader component HOT 6
- map diagram for forms (idea for later)
- remove rigging from vehicles HOT 1
- docs for passing data to 3DStreet via hash
- svg extrude bevel uses bevelColor instead of color when bevelEnabled is false HOT 2
- when releasing mouse button (click up) while using transform controls on a currently selected entity, do not select another item
- ability to choose new stencil mixins
- ability to change street component parameters without scene reloading HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 3dstreet.