friendsofspatial / floatingorigin Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Initially, this component was designed for Cloud Workers. Cloud Workers can, currently, not be partitioned on the Y axis, only in X and Z. But Clients could go further up or down on the Y axis than is convenient. It will also simplify the code as some provisions have been made to ignore the Y axis.
Foreach in the Mono version used by Unity leaks memory continuously. As such it is recommended to avoid the usage of foreach but instead use normal for loops. In this code we use a ForEach LINQ construct but it should be investigated whether this causes similar memory leaks
This one is kind of obvious; there are no unit tests for this component at the moment. These should be added to ensure stability. In addition, the README is kind of empty right now and there is a lot more to tell about this technique
Currently, the floating origin can only change the position of the environment but to support a larger range of effects it should also be nice if you can scale the local coordinates. This can be convenient in cases where you want to keep precision but do want to zoom into minute detail or zoom out to get a huge overview. By scaling coordinates instead of actually zooming in or out you retain a higher precision
On cloud workers it is not relevant where the origin is as long as the given game objects are within the given Dimensions. For Clients it would however be better if the centre of the new position tries to match an anchor (usually the Camera or player object) as much as possible.
This is nice because floating point imprecisions may be visible at the edges of the dimensions (depending on how large of an area you set) and by preferring the anchor to be in the center of the shift area it will have the least jitter.
At the moment the component moves the origin of all unparented game objects matching the LayerMask that you have provided. This means that when objects are pooled that it will move the entire pool instead of the individual (active) items.
This behaviour should be changed to move active objects inside of the pool instead of the pool itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.