Closed cppctamber closed 6 years ago
I've already converted the /core/
folder but have to confirm source of errors in my refactored eve/item/
folder before I can push it.
Also, do you mind if I move all the extensions
, paths
, contructors
, and a new dynamicResources
objects from the Tw2ResMan
to Tw2VariableStore
? It will help with reducing some dependencies and enable people to detach the resMan
from a specific ccpwgl instantiation more easily and/or to introduce their own resMan (ie. for people like @Robbilie who have multiple ccpwgl_ints, and for myself when using a webworker based resMan).
Might be better to break PRs like this down into smaller ones. This PR is almost impossible to review.
that is quite a PR :D
Its mostly cosmetic, don't want to burn fillipp out too quickly :3
@filipppavlov I'll break this down into seperate pull requests to make it easier to review
src/eve
EveObject
,EveChild
,EveItem
,EveSet
andEveSetItem
base classeschild
,effect
andobject
folder files to classes/es6 and fixed lintingEveSpaceScene
to es6EveSOF
as my version is vastly differentitem
folder asEveBoosterSetItem
failed testingEveMissileWarhead
into theEveMissile
folderEveMissile
store.Register({ uuid: true })
Update
method argument order for some classes so they're now the same as others, ie.EveChild.prototype.Update(dt, parentTransform)
rather than the reverse.KeepAlive
method toEveSpaceScene
so all of a scenes resources can be kept alive manually (helpful when you have multiple scenes)EveSpaceScene
and replaced with per frame updates (helpful when you have multiple scenes)EveSpaceScene
EveSpaceScene
Tw2VariableStore
variables to a single place (src/index.js
)src/core
Tw2VariableStore
has new properties and methods.Tw2VariableStore
instantiation name has been renamed tostore
.variableStore._variables[name]
tostore.GetVariable(name)
RegisterVariable
which can handle all three variations and a new onestore.RegisterVariable(name:string, value:*, Type:string|Function)
Tw2VariableStore
now stores Types, and all Parameters/ Types are registered withTw2VariableStore.RegisterType(name:string, Constructor:Class
). Custom user Types should also use this method.is
static method), or 'type' as a string or 'Type' as a Constructor. This will be useful for theautoRegister
parameter inTw2Effect
when they are added :3Tw2VariableStore.GetType(name)
the first Type that returns true will be returned.Tw2VariableStore
Variables can now only be defined once, if you try to register it again the original will be returned.data
folder, and put all per object data methods in it and converted them to classesEveBasicPerObjectData
now extends fromTw2PerObjectData
although I'm not sure why there isn't just one of them that has vertex, pixel and fixed function declarations?Tw2PerObjectData
,Tw2RawData
andEveBasicPerObjectData
can now take an object for declarations as an instantiation argument (ie.let ffeData = new Tw2PerObjectData(perObjectDataDecl)
), rather than having to type out each declaration line by lineTw2VertexElement
can now take declarations as an instantiation argument (an array of arrays, or an array of objects) so that you don't have to type out each declaration line by line (ie.let vDecl = new Tw2VertexElement(vertexDecl)
)Tw2VertexElement
enums and put them into an objectsrc/particle
src/curves
src/math
mat4.lookAtGL
mat4.perspectiveGL
vec3.project
andvec3.unproject
EveCurveSetLineItem
methods to vec3 libraryutil
file which contains methods the library uses elsewhere multiple times (haven't removed the duplicates yet)util.generateUUID
by three.js andutil.generateObjectID
) which are used for upcoming intersection, serialization and search methods.util.generateID
method which usesutil.generateObjectID
by default, but can be changed toutil.generateUUID
withstore.Register({ uuid: true })