-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Engine in Webpack #481
Open
trusktr
wants to merge
29
commits into
Famous:master
Choose a base branch
from
trusktr:infamous/webpack
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Engine in Webpack #481
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This refactor solves a number of issues ans subtle bugs that are present in the current implementation. No breaking changes have been made. * Usage of defaultGeometry: Previously a single defaultGeometry has been used for all Meshes that didn't have a geometry set on them. Since it was possible to retrieve and mutate the geometry, mutating the geometry of one Mesh would have resulted into unexpected results (since the geometry was shared among all Meshes). * Primitives inherit from Geometry: Although the methods were documented as constructors, they actually instantiated a new Geometry and returned it. This resulted into confusing `instanceof` and `constructor` checks. The new keyword is still optional, there this is not a breaking change. * Deprecate Mesh#setGeometry's geometry register: Accepting geometries as strings is problematic, since it means that **all** geometries will be required and included in the bundled file (as pointed out on phabricator). Currently a console.warn is used for printing the deprecation notice.
Previously wasn't an issue, since: 1. There were no registries 2. Meshes were never being removed
In the current implementation a new typed array is being instantiated on every subData call using `concat`. This should be factored out by sending the data as a transferable ArrayBuffer through postMessage, resulting into a zero-copy transfer. For the time being, we can at least remove the obsolete cloning of the array using concat.
* throws an error instead of console.error when WebGL is not supported otherwise this.gl is undefined and the errors would be pretty confusing for users in either case) * WebGLRenderer#getContext returns the previously retrieved GL context if available
This change is intended to make the behavior of Dispatch#dispatch more intuitive behavior by dispatching the event on the original "source node" (the passed in node).
Dispatch#dispatch was not calling onReceive on the nodes' components.
Equivalent of f6b1dde Needed for nesting DOMElements within Meshes
…glslify working with Webpack.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Discussion, don't merge)
This PR makes Engine work in Webpack, but breaks browserify support.
The solution will be to keep the current syntax (not the one shown in this PR), then use Webpack's
transform-loader
to apply theglslify
transform to files in Webpack builds, but that won't work until the following issue is solved: webpack/webpack#1373cc: @talves