summaryrefslogtreecommitdiffstats
path: root/o3d/samples
Commit message (Collapse)AuthorAgeFilesLines
* remove bad trailing commagman@google.com2009-09-041-2/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25547 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a no-binary path to the o3dConvertergman@google.com2009-09-041-40/+85
| | | | | | | | | | | | | | | | and deserializer. This CL still creates a o3dtgz file, it's just that buffers, skins and curves are stored in JSON instead of binary. I'm not sure how useful this is but it seemed like a possible short cut to testing out some stuff. Another CL will add some flag so there is no gzipped tar file, just the json. Review URL: http://codereview.chromium.org/189003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25523 0039d316-1c4b-4281-b951-d872f2087c98
* This adds in targets for selenium and updated several other problems,gspencer@google.com2009-09-042-188/+235
| | | | | | | | | | | including some problems with the samples and idl generation. Selenium targets launch selenium on all platforms, but the tests don't pass anywhere but Windows yet because the plugin isn't found. I'll work on that next. Review URL: http://codereview.chromium.org/197014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25467 0039d316-1c4b-4281-b951-d872f2087c98
* Beginnings of direct manipulator support in o3djs library. Addedkbr@google.com2009-09-024-5/+1202
| | | | | | | | | | | | | Translate1 manipulator, which implements dragging along a line, and helper and base classes. This is a work in progress; feedback appreciated. Fixed problem in recently changed documentation in primitives.js. Minor documentation cleanup in primitives.html. Review URL: http://codereview.chromium.org/178044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25152 0039d316-1c4b-4281-b951-d872f2087c98
* Update samples to use more utility functions wheregman@google.com2009-09-0127-627/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate. A few places used pseudoRandom. That is in math.js now so they use that. Other places there is now o3djs.material.createBasicMaterial and o3djs.material.createMaterialFromFile that save 10-20 lines per sample. This CL will require new reference images. There are 2 other things I'd like to consider. #1) Changing every sample that uses shaders/texture-only.shader to use o3djs.material.createConstantMaterial or some variation. The problem with o3djs.material.createConstantMaterial is it requires you pass it a texture if you want a constant textured material. All the samples create the material first, then later add the texture. So, I could add a new o3djs.material.createTextureOnlyMaterial. At the same time that would mean changing those samples from setting stuff on 'texSampler0' to 'emissive' #2) I'd like to change the shader builder so it stops adding "Sampler" to textured materials. As it is if the material uses a color it makes the param called "diffuse" but if it's a texture it makes it "diffuseSampler". That sucks because it means the code has to do crap like var param = material.getParam('diffuse'); if (param) { // it's a color } else { param = material.getParam('diffuseSampler'); if (param) { // it's a texture. } } If we stopped that silliness we could just do var param = material.getParam('diffuse'); if (param) { if (param.isA('o3d.ParamTexture')) { // it's textured. } else { // it's not. } } Unfortunately to fix this requires changing the o3dConverter as well since it uses those conventions. Should we do this? Review URL: http://codereview.chromium.org/182024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25015 0039d316-1c4b-4281-b951-d872f2087c98
* Bump version to 0.1.42gman@google.com2009-08-281-1/+1
| | | | | | | | | | This is partly so video can distinguish between 0.1.41 which they pushed internally and 0.1.42 which will be our next push. Review URL: http://codereview.chromium.org/179015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24782 0039d316-1c4b-4281-b951-d872f2087c98
* bug fixgman@google.com2009-08-271-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24592 0039d316-1c4b-4281-b951-d872f2087c98
* fix commentgman@google.com2009-08-251-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24354 0039d316-1c4b-4281-b951-d872f2087c98
* fix typogman@google.com2009-08-251-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24294 0039d316-1c4b-4281-b951-d872f2087c98
* docs fixes for simple.jsgman@google.com2009-08-211-5/+12
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24018 0039d316-1c4b-4281-b951-d872f2087c98
* update deps to grab new pdiff and mac reference imagesgman@google.com2009-08-211-43/+320
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24014 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the Windows backbuffer to RGBA mode.gman@google.com2009-08-211-3/+0
| | | | | | | | | | Note: This requires all new sample reference files which are in another CL and that requires a new pdiff which is in yet another CL Review URL: http://codereview.chromium.org/173182 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23983 0039d316-1c4b-4281-b951-d872f2087c98
* Add IO functions for Bitmap and change other utilitesgman@google.com2009-08-212-25/+142
| | | | | | | | | to use them. Review URL: http://codereview.chromium.org/174236 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23982 0039d316-1c4b-4281-b951-d872f2087c98
* Updates the bitmap and skinning samples and gets the gman@google.com2009-08-216-45/+61
| | | | | | | | latest reference images. Review URL: http://codereview.chromium.org/173183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23977 0039d316-1c4b-4281-b951-d872f2087c98
* Added o3djs.util.getElementsByTagAndId andgman@google.com2009-08-211-52/+127
| | | | | | | | | | | | | | | | o3djs.util.getO3DContainerElements which encasplulates the way we were finding elements to make O3D tags in. I also put an example of how to make your own failure callback in the docs. This also brought up a known issue in the doc generator so that fix is included here. Review URL: http://codereview.chromium.org/173178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23976 0039d316-1c4b-4281-b951-d872f2087c98
* Generalized cylinder code in primitives.js to handle truncated cones.kbr@google.com2009-08-202-32/+203
| | | | | | | | | | | | o3djs.primitives.createCylinderVertices now delegates to createTruncatedConeVertices. Updated primitives.html. Added o3djs.primitives.VertexInfo.append to allow multiple VertexInfos to be placed in a single Shape for efficiency; this functionality has been tested but is not yet demonstrated in a sample. Review URL: http://codereview.chromium.org/174186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23917 0039d316-1c4b-4281-b951-d872f2087c98
* Remove references to pack.createTextureFromRawDatagman@google.com2009-08-191-6/+6
| | | | | | | | as it has been deprecated. Review URL: http://codereview.chromium.org/173071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23727 0039d316-1c4b-4281-b951-d872f2087c98
* Additions of minor utility functions.kbr@google.com2009-08-191-0/+37
| | | | | | Review URL: http://codereview.chromium.org/173041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23689 0039d316-1c4b-4281-b951-d872f2087c98
* A bunch more docs fixesgman@google.com2009-08-199-107/+72
| | | | | | Review URL: http://codereview.chromium.org/171070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23679 0039d316-1c4b-4281-b951-d872f2087c98
* expose Bitmap to JavaScript.gman@google.com2009-08-199-25/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also added Texture.drawImage(canvas...) There's still the big question of whether we should flip textures by default in the o3d code. Currently I'm flipping them by default in o3djs.texture.createTextureFromRawData and I'm flipping them by default in o3djs.canvas.CanvasQuad.updateTexture. I'm torn whether or not I should be flipping them. I feel like 2d examples and examples of displaying images, like a picasa viewer, would be simpler if we didn't flip by default but the problem then is if you load some textures through a collada scene they'll be flipped the opposite of any textures you load by hand. Review URL: http://codereview.chromium.org/171060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23678 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing performance.js to MANIFESTgman@google.com2009-08-141-0/+1
| | | | | | | | | This is for the trunk. The previous CL was for the release branch. Review URL: http://codereview.chromium.org/170009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23477 0039d316-1c4b-4281-b951-d872f2087c98
* Add usual cleanup code for this sample, fixing breakage with Firefox's ↵kbr@google.com2009-08-081-0/+11
| | | | | | | | backward / forward cache. Review URL: http://codereview.chromium.org/164174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22852 0039d316-1c4b-4281-b951-d872f2087c98
* A step in exposing Bitmap to JavaScript.gman@google.com2009-08-061-20/+12
| | | | | | | | | | | | | | | | | | | | | The plan is to make pack.createBitmapFromRawData return an array of bitmaps. 1 bitmap if it's a standard 2d image 6 bitmaps if it's a cubemap N bitmaps if it's a volume map. The bitmaps will have a semantic so you can look at them and tell they were from a volumemap, a cubemap or a 2d image. On the way I'm attempting to clean up the code. Moving stuff out of Bitmap the did not belong there and Refactoring Bitmap so there are less If Format = stuff. Review URL: http://codereview.chromium.org/164034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22583 0039d316-1c4b-4281-b951-d872f2087c98
* Added default values to property documentation.gman@google.com2009-08-054-9/+9
| | | | | | | | Fixed a few more docs issues. Review URL: http://codereview.chromium.org/159894 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22463 0039d316-1c4b-4281-b951-d872f2087c98
* This adds splitting of samples for the interactive sampler,gspencer@google.com2009-08-035-19/+250
| | | | | | | | and docs building to the GYP build. Review URL: http://codereview.chromium.org/159825 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22348 0039d316-1c4b-4281-b951-d872f2087c98
* Asynchronous tick now uses NPN_PluginAsyncCall.URL streaming callbacks are ↵apatrick@google.com2009-08-032-3/+2
| | | | | | | | now also asynchronous.Implemented NPN_PluginAsyncCall for IE.Allowed WM_PAINT handler to be reentered because it no longer calls into the browser (except to schedule an asynchronous tick if none is pending).Fixed a bug where the EventManager would crash if an event callback called cleanUp on the client.Cleanup destroys all the packs. Doing this in NPP_Destroy seems to make Chrome timeout and fail to load the next page.Tar and GZ decoding happens on a new thread. Review URL: http://codereview.chromium.org/155733 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22305 0039d316-1c4b-4281-b951-d872f2087c98
* This adds the sample conversion to the GYP build, at least on Windows.gspencer@google.com2009-07-302-0/+173
| | | | | | | | | It also fixes some small problems with the build (naming of plugin DLL and activex host dll) Review URL: http://codereview.chromium.org/160428 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22122 0039d316-1c4b-4281-b951-d872f2087c98
* Change <script id="o3d" to <script id="o3dscript"gman@google.com2009-07-2871-71/+71
| | | | | | | | | so that document.getElementById('o3d') will work for finding the o3d div. Review URL: http://codereview.chromium.org/159556 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21924 0039d316-1c4b-4281-b951-d872f2087c98
* Change box2d to use compiled verison of box2d.js fromgman@google.com2009-07-2867-11535/+1039
| | | | | | | | | | author http://code.google.com/p/o3d/issues/detail?id=10 Review URL: http://codereview.chromium.org/159396 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21828 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to picking example to show how to getgman@google.com2009-07-283-15/+148
| | | | | | | | | | | the surface normal for the spot picked. Apparently no screenshots are taken for picking so no deps files need up be updated Review URL: http://codereview.chromium.org/159442 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21805 0039d316-1c4b-4281-b951-d872f2087c98
* This change fixes the issue that if you usegman@google.com2009-07-2470-127/+139
| | | | | | | | | | | | | | | | | | | | | | o3djs.util.setMainEngine(...V8) in any sample and you use scripts that you don't want run in V8, for example Adsense, Google Analyitics, Wave, Google WebElements then the o3djs would attempt to pull in that javascript and execute it in V8. Specifically this refers to inline <script> tags instead HTML. Not <script src="url"> tags. The solution is we add an id to the tags we want o3djs to pull in. Any script with an id that starts with "o3d" will get pulled in. This CL changes our samples to have that id on their script tags. Review URL: http://codereview.chromium.org/159339 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21585 0039d316-1c4b-4281-b951-d872f2087c98
* Modified the hud-2d-overlay sample to reset the icon transforms and preventvangelis@google.com2009-07-221-8/+13
| | | | | | | them from moving when running the selenium tests in order to get consistent snapshots. Review URL: http://codereview.chromium.org/155928 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21325 0039d316-1c4b-4281-b951-d872f2087c98
* Modified generate-texture to turn off texture filtering when run in seleniumvangelis@google.com2009-07-211-0/+14
| | | | | | | | so that we get consistent results. Also bumped up the pdiff threshold for 2d sample on the mac to its previous number to get the test to pass until we fix it. Review URL: http://codereview.chromium.org/155885 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21223 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for keys not working when plugin has focus in pingpong sample.apatrick@google.com2009-07-211-15/+4
| | | | | | | | http://code.google.com/p/o3d/issues/detail?id=67 Review URL: http://codereview.chromium.org/155872 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21208 0039d316-1c4b-4281-b951-d872f2087c98
* o3djs.utils.makeClients checks that Renderer has been initialized.apatrick@google.com2009-07-211-1/+5
| | | | | | | | Prevents case where init callback is called before NPP_SetWindow (which initializes the renderer). Review URL: http://codereview.chromium.org/155716 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21188 0039d316-1c4b-4281-b951-d872f2087c98
* The compiled version of the o3djs libs WORK!gman@google.com2009-07-201-0/+8
| | | | | | | | | | | | | | | | | | | Sadly there is some really strange voodoo to make it work. util.js was using document.getElementsByTagName('script') and it was not returning all the scripts. Lots of dump() lines later the voodoo of calling document.getElementsByTagName('script').length (the length is important) in some place earlier in the code fixes the issue. Also, added the copyright to the compiled file Added parameter docs Review URL: http://codereview.chromium.org/159049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21085 0039d316-1c4b-4281-b951-d872f2087c98
* Shader in shadow-map.html constructed a float4 with a single argument. ↵petersont@chromium.org2009-07-171-1/+2
| | | | | | | | Avoiding that so the shader compiles as hlsl. Review URL: http://codereview.chromium.org/155718 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21016 0039d316-1c4b-4281-b951-d872f2087c98
* Added a new sample which implements basic shadow mapping.petersont@chromium.org2009-07-173-4/+648
| | | | | | Review URL: http://codereview.chromium.org/155401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21000 0039d316-1c4b-4281-b951-d872f2087c98
* JSCompiler fixesgman@google.com2009-07-164-39/+137
| | | | | | | | | | | | | | | | | *) Generate goog.exportSymbol for all o3djs classes, methods and properties so the JSCompiler does not delete them *) Remove goog.exportSymbol from the compiled result. *) Remove o3djs.require from the compiled result. *) Add docs to undocumented items in o3djs. Review URL: http://codereview.chromium.org/155665 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20919 0039d316-1c4b-4281-b951-d872f2087c98
* Fix createCheckerMaterial to use same colors as it original used.gman@google.com2009-07-152-4/+4
| | | | | | | | | and increase timeout for Google IO step14ex. Also make old-school-shadows use createCheckerMaterial Review URL: http://codereview.chromium.org/155554 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20800 0039d316-1c4b-4281-b951-d872f2087c98
* expose bitmap in js.yux@google.com2009-07-154-0/+236
| | | | | | Review URL: http://codereview.chromium.org/150058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20700 0039d316-1c4b-4281-b951-d872f2087c98
* minor fix for docsgman@google.com2009-07-131-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20556 0039d316-1c4b-4281-b951-d872f2087c98
* Change NULL to null in rendergraph.js.yux@google.com2009-07-131-1/+1
| | | | | | Review URL: http://codereview.chromium.org/155450 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20551 0039d316-1c4b-4281-b951-d872f2087c98
* Old School Shadow example.gman@google.com2009-07-135-105/+566
| | | | | | | | | | | | | | | | Shows how to use PolygonOffset to bring the shadows forward. Also shows how to set up a quick drawpass using some new o3djs functions so the shadows all get drawn last. The reference screenshot CL is here. http://codereview.appspot.com/91103 I'll add DEPS and DEPS_gpy in this CL once this is approved. Review URL: http://codereview.chromium.org/149507 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20514 0039d316-1c4b-4281-b951-d872f2087c98
* Various docs fixes.gman@google.com2009-07-133-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out we weren't documenting o3djs.math.matrix4 because it was missing an @namespace tag. I tried to find a way to flag this as an error but as far as can tell there, in jsdoctoolkit there is nothing I can use to distinguish between a function with no parameters and returns nothing and an un tagged namespace. In other words /** * no tag here */ o3djs.foo.someNamespace = { }; ..and.. /** * Some func. */ o3djs.foo.someFunc = function() { }; Look exactly the same when they get to the doc generation part of jsdoctoolkit. Both are members of o3djs.foo. Both have no params and no return type. So I can't tell that the first one is an error (a non function with no tags) and the second one is not. I guess we just have to be vigilant. Also, a BIG error was I wasn't generated o3djs docs at all in build_docs.py. Fixed that. Finally I changed the format some. My opinion was the summary docs at the top of each module/class were hard to read so I put them in tables. Will have to check with Josie once it's checked it now they actually appear on her test server. Also made it so for module methods and properties they get documented as o3djs.module.method o3djs.module.property but for object methods and properties they get documented ObjectName.method ObjectName.property Both used to be documented as just method property Which I found hard to read since there is no context. Review URL: http://codereview.chromium.org/149523 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20511 0039d316-1c4b-4281-b951-d872f2087c98
* Added o3djs.material.createCheckerMaterial.gman@google.com2009-07-135-17/+196
| | | | | | | | | | | | | | | | It seems pretty useful for lots of samples. Added o3djs.effect.createCheckerEffect to support that. Also put pseudoRandom into math since so many samples use it. Will consider switching samples to use it. Review URL: http://codereview.chromium.org/149509 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20510 0039d316-1c4b-4281-b951-d872f2087c98
* Add a billboard and imposter sample.gman@google.com2009-07-117-3/+522
| | | | | | | The reference screenshot is in another CL git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20465 0039d316-1c4b-4281-b951-d872f2087c98
* add ignore for thumbs.dbgman@google.com2009-07-111-0/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20461 0039d316-1c4b-4281-b951-d872f2087c98
* fix sample names to be compatible with selenium scripts.gman@google.com2009-07-1115-14/+14
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20446 0039d316-1c4b-4281-b951-d872f2087c98
* Add Google IO sample.gman@google.com2009-07-1020-2/+4895
| | | | | | Review URL: http://codereview.chromium.org/149438 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20437 0039d316-1c4b-4281-b951-d872f2087c98