Comments (7)
The Terrain.ShorelinesUpgraded
one is especially annoying (because of the popup). I think the defaults should be implemented in rbx-dom
as well.
from rbx-dom.
A few more questions:
- Should rbx-dom populate all properties with their defaults, or only some?
- Should rbx_dom_weak populate properties?
- This is a little hairy, because then rbx_dom_weak needs access to reflection
- Or should the rbx_xml and rbx_binary (de)serializers populate properties instead?
- This would be more straightforward since rbx_xml and rbx_binary already have access to reflection
from rbx-dom.
I think populating all default properties is probably a bad idea since it would massively increase the memory consumption for some Instances (I'm thinking about Part, as an example).
Having the parsers do it is weird because it means that they become opinionated instead of neutral. I'm thinking we may want a method or two in rbx_dom_weak to apply the default properties of an Instance when given a reflection database. That means the DOM would only need rbx_reflection
as a dependency, which we update far less frequently than we do rbx_reflection_database
and doesn't complicate things too much.
from rbx-dom.
Having the parsers do it is weird because it means that they become opinionated instead of neutral. I'm thinking we may want a method or two in rbx_dom_weak to apply the default properties of an Instance when given a reflection database. That means the DOM would only need rbx_reflection as a dependency, which we update far less frequently than we do rbx_reflection_database and doesn't complicate things too much.
This sounds reasonable and would work alright, but I remain concerned about correctness, and making the pit of success as wide and easy to fall into as possible. Model.NeedsPivotMigration
shows that some properties must be present, or else Roblox won't load the file properly. It's probably not the only property like this. The fact that rbx-dom's implementation can leave out properties is a divergence from Roblox. Populating all properties would not just be our opinion - it's Roblox's standard. Also, I think it's just a little strange for consumers to have to call a special method for everything to work, just as it's strange to have to insert obscure properties.
I think populating all default properties is probably a bad idea since it would massively increase the memory consumption for some Instances (I'm thinking about Part, as an example).
Considering that rbx-dom is predominantly used to read files saved by Roblox Studio - which does include all the properties - I'm not sure if this is an actual problem. As far as I know, it is not possible to get Roblox to save files that have missing properties, and you must use a tool like Rojo or Lune (or rbx-dom manually, of course). I guess we can measure the real impact, combine this with the previous observation, and go from there?
from rbx-dom.
I've ran into an instance while implementing Syncback for Rojo where information on 'correctness' would be useful. I'm curious what your thoughts would be on including properties like MeshPart.InitialSize
and Model.ScaleFactor
which are important to the actual function of these Instances?
For syncback, I'm stripping out as many properties as possible to ease diffing two DOMs, but there's no easy metric for this. Right now I'm just using "scriptable" and "not scriptable" but I would like to differentiate between "important" and "not important" too since there are a fair few unscriptable properties that are critical to being able to build a place file correctly.
from rbx-dom.
from rbx-dom.
My concern with that strategy is that I imagine a lot of people will want to run syncback on their game and then just use the output for serving into Studio. If there's a bunch of properties that can't be scripted, it's a bad UX, especially for services like Lighting and Workspace, which have a fair few unscriptable properties. These are important if you're using the project for rojo build
, but they aren't important if you're just syncing and having a bunch of sync errors obscures actual problems.
I'm also trying to avoid blacklisting or whitelisting properties because it isn't sustainable and feels out of place in Rojo. I'd ideally like rbx-dom to track the information I need for this implementation instead, even if that information is written manually.
from rbx-dom.
Related Issues (20)
- Concretely define and use terms like `alias`, `canonical`, etc.
- Support more than one root-level Instance in rbx_dom_weak
- rbx_reflector is inconsistent with storing default values for properties HOT 1
- rbx_reflector does not read Studio saving the default place file correctly sometimes
- Releases should be more automated HOT 1
- rbx_dom_lua should be a Wally package HOT 1
- Memory leak in SharedString HOT 10
- `TerrainMaterials` should implement `FromStr`
- Support for `SecurityCapabilities` tag in XML files HOT 1
- Add support for `Enum`-typed attributes HOT 2
- `Model.WorldPivotData` needs a custom property setter/getter HOT 2
- Failed to deserialize Configuration.AttributesSerialize HOT 1
- Property write failure warning should include the instance's full name
- Humanoid instances should be serialized last in files
- Serve still incorrectly changes WorldPivotData HOT 1
- Defining the Archivable property on an instance causes binary serializer to write false for Archivable properties on all other instances of the same class HOT 4
- `WriteUnknown` behavior in rbx_xml does not respect serialization of known properties
- Small Inconsistency with float & double in Attributes encoding HOT 2
- Documenting the CollisionGroupData property format
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 rbx-dom.