-
Notifications
You must be signed in to change notification settings - Fork 31
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
August - December motherlode #265
Open
cppctamber
wants to merge
25
commits into
ccpgames:master
Choose a base branch
from
cppctamber:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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
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
- Added support for decorators - Added support for extending Error - Added support for class parameters - Added support for linting on newer babel features - Added `Tw2Error` base class in preparation for future Promise support - Moved all singly instantiated classes and objects to `/global` - All singly instantiated `Tw2` files moved into `/global/engine` - All singly instantiated `Tw2` classes are no longer exported - Removed `Tw2EventEmitter` constructor options so it can be used with `Object.assign(Constructor.prototype, Tw2EventEmitter.prototype` - Separated util functions into their own files - Added new type utility functions which now replace all typeof checks - Removed deprecated classes and the `/core/deprecated` folder - Moved `EveStarField` from `/eve/object` to `/eve/effect` - Fixed minor eslint errors - Fixed order of `Tw2VertexDeclaration` Declare function and added default gl type
- Added new error classes which will be used for future Promises support - Ran beautification rules - Reduced library size by a teeeeeny tiny bit :3
- Updated `EvePlanet.Create` so that it can now take an optional onload callback - Updated `ccpwgl.loadPlanet` so that it can now take an optional onload callback - Updated planet demo to include onload callbacks
Demos === - Added Vanilla Toasts https://github.com/AlexKvazos/Toasts - Added toasts for error and warning messages so users can see them without using the console - Fixed `camera.focus` so that it actually works (`ccpwgl.js`, `sof.html`, `typeids.html`) - Stopped camera focus from changing the camera's distance when you haven't changed hulls - Added `autoPlane` to `camera.focus` to fix visual issues where the target object is too big - Beautified code Tw2Device === - `Tw2Device` is now an event emitter so you can listen to events - Added `resize` event which is fired when the canvas is resized - Added `context` event which is fired when context is created - Added `tick` event which is fired per tick Tw2ResMan === - `Tw2ResMan` is now an event emitter so you can listen to events - Added `OnResError` which is fired on resource errors - Added `OnResEvent` which is fired on resource events - Replaced logs with errors in preparation for Promises - Added `Try/Catch` blocks in preparation for Promises - Added `onRejected` callback to `GetObject` so you can catch errors - Errors are now handled correctly in the resMan per frame update - Simplified per frame updates Tw2MotherLode === - Added `HasErrors` function which checks a path for errors - Updated `PurgeInactive` function so that it uses new resource methods - Updated `Tw2MotherLode` to normalize error data Tw2Resource === - Replaced logs with errors in preparation for Promises - Added `GetErrors` function which returns any resource errors - Added `HasErrors` function which checks if a resource has errors - Added `OnError` which is fired on errors - Added `OnResError` for notifications error handling - Added `OnUnloaded` which is fired when resources are purged or unloaded - Replaced `LoadStarted` with `OnRequested` - Replaced `LoadFinished` with `OnError` and `OnLoaded` - Replaced `PrepareFinished` with `OnError` and `OnPrepared` - Added `onRejected` callback to `Tw2LoadingObject` so you can catch errors Tw2Store === - `Tw2Store` is now an event emitter so you can listen to events - Replaced logs with events Tw2Logger === - Simplified `Tw2Logger` - Removed most direct references in preparation for user defined loggers EveSOF === - Updated `EveSOF` so it doesn't throw errors when trying to bind unsupported elements - Updated `EveSOF` to log a warning when an unsupported element cannot be bound Tw2ObjectReader === - Replaced logs with errors - Fixed `Tw2ObjectReader.DEBUG_ENABLED` mode so it actually works Misc === - Added `template` to utils and `Tw2Error` - Added `isError` to utils - Fixed error in `Tw2ParticleElement` - Fixed error in `EveMissile` - Beautified code
- Replaced all raw per object data per line declarations with a single declaration from a static object - Replaced all raw vertex data per line declarations with a single declaration from a static object - It is now much easier to read and share raw data - Fixed issue in `Tw2RawData` when a standard array was passed as a default value it would throw an error as Array's don't support `subarray` - Changed `Tw2RawData.DeclareFromObject` to take either an array of arrays or an array of objects. (Declarations need to be in arrays to ensure they're declared in the right order) - Moved some static class properties from outside their class to inside their class
Tw2TextureParameter --- - `Tw2TextureParameter`'s no longer apply samplers when overrides are allowed but `UpdateOverrides` has not been triggered - `Tw2TextureParameter`'s can now take rgba values instead of resource paths using `rgba:/0,0,0,0` format ``` // Create a solid red texture parameter const texture = new Tw2TextureParameter('Red', 'rgba:/255,0,0,1'); ``` Tw2Store --- - Paths registered without a trailing '/' are now allowed - `dynamic` and `rgba` are now restricted prefixes - Trying to register a restricted prefix now emits an error Tw2Effect --- - Added `AutoParameter` which automatically adds a shader's parameters utils --- - Corrected the `template` utility regex
- Added `Tw2Shader.HasConstant` which checks to see if a shader has support for a constant - Added `Tw2Shader.HasTexture` which checks to see if a shader has support for a texture - Added `Tw2Shader.HasSampler` which checks to see if a shader has support for a sampler
- Added `EveChildCloud` to stop errors when loading certain red files - Added `length` to `Tw2BatchAccumulator` which returns the current batch length - Added `partialImplementation` constructor flag to classes which haven't been fully implemented - Renamed `Tw2Store` constructor related functions to `class` - Added `Tw2Store` warning event which lets you know when a partially implemented class has been loaded - Stopped `Tw2TextureRes` which have been attached from being able to be reloaded - Added `Tw2PostProcess.IsGood` so you can check when this post process is good - Added `display` option to `Tw2PostProcess` so you can disable the effect - Changed `Tw2PostProcess.Render` to return a boolean like other render functions - Added `_id` and `name` properties to `Tw2PostProcess` so it will be inline with soon to be pushed `Tw2PostEffect` and `Tw2PostEffectStep` classes for custom post effects - Updated `ccpwgl.js` to use changes to `Tw2PostProcess` - Updated `ccpwgl.js` so that when `Tw2PostProcess` doesn't render anything the back buffer alpha channel is cleared - Added `Tw2Device.RM_DISTORTION` so that distortion effects can be accumulated - Moved `Tw2ParticleElementDeclaration` to it's own file
cppctamber
changed the title
Added support for new transpiler features and preparation for others
August/ September motherlode
Sep 18, 2018
- Custom post effects can now be created with json - Added new class `Tw2PostEffectManager` - Added new class `Tw2PostEffect` - Added new class `Tw2PostEffectStep` - Added `ccpwgl.post` instantiation of `Tw2PostEffectManager` - Updated `ccpwgl.js` to use new classes - Added `post.html` demo - Updated `index.html` demo to include post effect demo
- Fixed typo in perObjectData - Added JointMat data to perObjectData so that missile engine sprites work
- Not currently implemented in the post manager, but will allow post red objects to be loaded
- Some red files use trinity constructors `Tr2` which don't exist - The store will first look for the `Tr2` constructor and use it if found - The store will then look for a `Tw2` constructor and use that if found - If a substitution occurs a warning log is created - If a substitution occures a `substitution` event is emitted, with the details
- Preparation for decorators and private class properties
- Prefixed all custom errors with "Err" so they've obviously not object contructors - Added "emitOn" to `Tw2Error` so you can emit errors on a target emitter - Cleaned up `OnResEvent` error handling so its the same as other events - Changed the default logger to accept errors directly (returns an event log) - Added check in the sof for missing children to stop certain sof objects from failing
- Added optional throttling to logger to stop excessive log outputs - Simplified log inputs - Fixed `EveStarfield` name - Added `logger` and `resMan` options to `store.Register` - Added `isDna` type util - Increased library version
- Added optional throttling to logger to stop excessive log outputs - Simplified log inputs - Fixed `EveStarfield` name - Added `logger` and `resMan` options to `store.Register` - Added `isDna` type util - Increased library version
- D3D - CCP - GL - DDS - Browser vendor enums
- Added DDS support (Cube maps not yet supported) - Renamed new constants to be inline with existing ones - Fixed minor error in `Tw2TextureParameter` when adding a texture res - Added `OnDebug` method to `Tw2Resource` - Added `ErrResourceFormat` error which is thrown on resource format errors - Added missing property `magFilter` to `Tw2SamplerState` - Replaced static objects in `Tw2SamplerOverride` with constants - Removed unnecessary `_onResize` property in `Tw2Device` - Renamed `CompressedTexture` to `CompressedTextureS3TC` in `Tw2Device`
- Updated webpack - Updated all babel packages - Updated gl-matrix package - Updated eslint packages - Replaced `Uglifyjs` with `Terser` so es6 code can be minified - Added `.babelrc` and removed babel settings from `webpack.config.js` - Added `.browserslistrc` and included initial list of browsers which seem to support `ccpwgl` (requires some testing) - Updated `webpack.config.js` so it behaves the same as previously (currently only using 'production' mode)
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.
build
Uglifyjs
withTerser
so es6 code can be minified.babelrc
and removed babel settings fromwebpack.config.js
.browserslistrc
and included initial list of browsers which seem to supportccpwgl
(Some further testing is required to finalize this list)webpack.config.js
so it behaves the same as it did previously (currently only using 'production' mode)transpiler features
structure
src/global
Tw2
global classes moved fromsrc/core/global
intosrc/global/engine
Tw2
global classes are no longer exportedpartialImplementation
so classes that are partially implemented can be identified by hoomans and code/core/deprecated
folderEveStarfield
fromsrc/eve/object
tosrc/eve/effect
EveChildCloud
partial implementationTw2ParticleElementDeclaration
to it's own fileDemos
post.html
demo which contains an example of a custom post effectindex.html
demo to include post effect democamera.focus
so that it actually works (ccpwgl.js
,sof.html
,typeids.html
)autoPlane
tocamera.focus
to fix visual issues where the target object is too bigccpwgl.js
to use new planet callbackccpwgl.js
to use new post classesccpwgl.setResourcePath
to usestore.RegisterPath
Tw2Error
Tw2Error
base class and other custom errors in preparation for future Promise support and simplified loggingErr
so that it is clear that they aren't object constructorsTw2Device
Tw2Device
is now an event emitter so you can listen to it's eventsresize
event which is fired when the canvas is resizedcontext
event which is fired when context is createdtick
event which is fired per tickRM_DISTORTION
so that distortion effects can be accumulatedonResized
callbacks and properties, as you can not listen to an eventTw2ResMan
Tw2ResMan
is now an event emitter so you can listen to it's eventserror
event which is fired on any resource errorwarning
event which is fired on resource warningsrequested
event which is fired when a resource is requestedreloading
event which is fired when a resource is reloadedloaded
event which is fired when a resource is loadedprepared
event which is fired when a resource is preparedunloaded
event which is fired when a resource is unloadedpurged
event which is fired when a resource is purgeddebug
event which is fired when a resource is debuggingOnResError
method which is fired on resource errorsOnResEvent
method which is fired on resource eventsTry/Catch
blocks in preparation for PromisesonRejected
callback toGetObject
so developers can catch errorsTw2MotherLode
HasErrors
function which checks a path for errorsPurgeInactive
function so that it uses new resource methodsTw2MotherLode.AddError
so that standard errors getdata.path
resource valuesTw2Resource
GetErrors
function which returns any resource errorsHasErrors
function which checks if a resource has errorsOnError
which is fired on errorsOnResError
for notifications error handlingOnUnloaded
which is fired when resources are purged or unloadedOnDebug
which is fired when debuggingOnWarning
which is fired on warningsLoadStarted
withOnRequested
LoadFinished
withOnError
andOnLoaded
PrepareFinished
withOnError
andOnPrepared
onRejected
callback toTw2LoadingObject
so you can catch errorsTw2TextureRes
that have textures attached from being able to be reloadedTw2Store
Tw2Store
is now an event emitter so you can listen to it's eventsdynamic
andrgba
are now restricted prefixesTr2
andTri
named constructor first, and if that fails will try to get aTw2
variant insteadConstructor
methods to beClass
insteadregistered
event which fires when a new store value is registeredmissing
event which fires when a store value has been requested that doesn't existpartial
event which fires when a partially implemented class has been usedsubstitute
event which fires when aTw2
constructor is used when aTr2
constructor was requested but not founderror
events when stuff(tm) breaksTw2Logger
Tw2Logger
Tw2Logger
now emits log types as event namesEveSOF
EveSOF
so it doesn't throw errors when trying to bind unsupported elements, now a warning log is posted insteadEveSOF
so it doesn't throw errors when setting up children who are empty objects or are missing respaths, now a warning log is posted insteadTw2ObjectReader
Tw2ObjectReader.DEBUG_ENABLED
mode so it actually worksTw2RawData/ Tw2VertexDeclarations
Tw2RawData
when a standard array was passed as a default value it would throw an error as Array's don't supportsubarray
Tw2RawData.DeclareFromObject
to take either an array of arrays or an array of objects. (Declarations need to be in arrays to ensure they're declared in the right order)EveChild
classes perObject dataEveSet
classes perObject and vertex dataEveObject
classes perObject dataEveSpaceScene
per frame dataTw2Shader
Tw2Shader.HasConstant
which checks to see if a shader has support for a constantTw2Shader.HasTexture
which checks to see if a shader has support for a textureTw2Shader.HasSampler
which checks to see if a shader has support for a samplerTw2TextureParameter
Tw2TextureParameter
's no longer apply samplers when overrides are allowed butUpdateOverrides
has not been triggeredTw2TextureParameter
's can now take RGBA values instead of resource paths usingrgba:/0,0,0,0
formatSetTextureRes
EvePlanet
onload
callback which is fired when all planet parts have loadedEvePlanet.Create
so that it can now take an optional onload callbackccpwgl.loadPlanet
so that it can now take an optional onload callbackonload
callbacksTw2PostEffect
Tw2PostEffectManager
which manages post effectsTw2PostEffect
Tw2PostEffectStep
ccpwgl.js
to use new classesTw2PostProcess
partially implemented to stop errors when trying to load post .red files, but not used anywhere yetTw2Effect
Tw2Effect.AutoParameter
which automatically creates shader parameters if they don't already existTw2Effect.IsGood
so that it also keeps resources alive so that it is in line with other methods of the same nameTw2Effect.KeepAlive
which keeps all effect resources aliveMisc
DDS
texturesEveMissile
perobjectData so that missile's engine sprites workTw2BatchAccumulator.length
which returns the current batch countTw2EventEmitter
constructor options so it can be used withObject.assign(Constructor.prototype, Tw2EventEmitter.prototype)
Tw2VertexDeclaration.Declare
array parameter and added a default gl typetemplate
to utilsisError
to utilsTw2ParticleElement
EveMissile