From c60b97617fa3ca9372bad84d6c443202491d2d7c Mon Sep 17 00:00:00 2001 From: Cathy Date: Sun, 21 Feb 2010 15:27:05 -0500 Subject: [PATCH] add docs, release script and updated the front page demo --- .gitignore | 1 + canvas3dapi-dev/J3DXplorer/J3DXplorer.html | 2 +- canvas3dapi-dev/J3DXplorer/J3DXplorer.js | 8 +- documentation/2.0_user_docs/index.html | 112 ++++++++++----------- release.sh | 88 ++++++++++++++++ 5 files changed, 150 insertions(+), 61 deletions(-) create mode 100644 .gitignore create mode 100755 release.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/canvas3dapi-dev/J3DXplorer/J3DXplorer.html b/canvas3dapi-dev/J3DXplorer/J3DXplorer.html index cde35f6..e814837 100755 --- a/canvas3dapi-dev/J3DXplorer/J3DXplorer.html +++ b/canvas3dapi-dev/J3DXplorer/J3DXplorer.html @@ -9,8 +9,8 @@ - + diff --git a/canvas3dapi-dev/J3DXplorer/J3DXplorer.js b/canvas3dapi-dev/J3DXplorer/J3DXplorer.js index 06338ec..69c267d 100755 --- a/canvas3dapi-dev/J3DXplorer/J3DXplorer.js +++ b/canvas3dapi-dev/J3DXplorer/J3DXplorer.js @@ -31,11 +31,11 @@ function J3DXplorer_main(canvasName) scn.setRenderer(renderer); scn.init(canvasName); if(!renderer.isReady()){ + var imgtag=document.getElementById("screenshot"); + imgtag.style.display="block"; var canvas=document.getElementById(canvasName); - var ctx=canvas.getContext('2d'); - var img=new Image(); - img.src="frontpagess.png"; - ctx.drawImage(img,0,0); + canvas.style.display="none"; + } else{ var j=0; diff --git a/documentation/2.0_user_docs/index.html b/documentation/2.0_user_docs/index.html index 7caab7b..00ae780 100644 --- a/documentation/2.0_user_docs/index.html +++ b/documentation/2.0_user_docs/index.html @@ -182,65 +182,65 @@
-
Class Index -| File Index
+
Class Index +| File Index

Classes


@@ -251,57 +251,57 @@

Class Index

-

_global_

+

_global_


-

c3dl

+

c3dl

Prevent name conflicts by placing c3dl variables and functions in a javascript 'namespace'.

-

c3dl.Actor

+

c3dl.Actor

c3dl.Actor is a base class for 3D objects.

-

c3dl.Camera

+

c3dl.Camera

c3dl.Camera is a base class for c3dl.OrbitCamera and c3dl.FreeCamera.

-

c3dl.Collada

+

c3dl.Collada

c3dl.Collada represents the model data from a collada file.

-

c3dl.debug

+

c3dl.debug

used to output error, warning and information to either the page or firebug.

-

c3dl.DirectionalLight

+

c3dl.DirectionalLight

A DirectionalLight inherits from Light.

-

c3dl.Effect

+

c3dl.Effect

c3dl.Effect specifies exactly how a geometric object should be rendered.

-

c3dl.effects

+

c3dl.effects

If a parameter's type is followed by square braces, it means the parameter has a default value, therefore setting that parameter is optional. @@ -309,66 +309,66 @@

c3dl.effects


-

c3dl.EffectTemplate

+

c3dl.EffectTemplate

An EffectTemplate is a template for creating many Effects which have similar rendering results.


-

c3dl.FreeCamera

+

c3dl.FreeCamera

c3dl.FreeCamera A camera which can be freely moved around in a scene.

-

c3dl.Geometry

+

c3dl.Geometry

c3dl.Geometry is a container for the primitiveSets of a geometric object.

-

c3dl.Light

+

c3dl.Light

This is an 'abstract' class which should not be instantiaed.

-

c3dl.Line

+

c3dl.Line

c3dl.Line represents a line segment in 3D space.

-

c3dl.Material

+

c3dl.Material

c3dl.Material contains values which describe the behaviour of an object when light illuminates it.

-

c3dl.OrbitCamera

+

c3dl.OrbitCamera

c3dl.OrbitCamera is a camera which is restricted to orbiting a point in space.

-

c3dl.ParticleSystem

+

c3dl.ParticleSystem

ParticleSystem is used to simulate phenomena such as fire, smoke, rain, etc.

-

c3dl.PickingResult

+

c3dl.PickingResult

c3dl.PickingResult is contains the result of the user picking something in the scene.

-

c3dl.Point

+

c3dl.Point

c3dl.Point is an object with a position and color which will be rendered using OpenGL's built-in point rendering (either as a circle or square depending on smoothing) or rendered as sphere meshes. @@ -376,32 +376,32 @@

c3dl.Point


-

c3dl.PositionalLight

+

c3dl.PositionalLight

A PositionalLight inherits from Light.


-

c3dl.PrimitiveSet

+

c3dl.PrimitiveSet

c3dl.PrimitiveSet represents a set of primitives within a geometric class.

-

c3dl.Renderer

+

c3dl.Renderer

base class for OpenGLES20.

-

c3dl.RenderingObject

+

c3dl.RenderingObject

c3dl.RenderingObject is an object which is created dynamically and passed to the callback function defined within an effect when rendering objects. @@ -409,20 +409,20 @@

c3dl.RenderingObject


-

c3dl.Scene

+

c3dl.Scene

A Scene should be thought of as a scene on a movie set.

-

c3dl.SpotLight

+

c3dl.SpotLight

A spotlight is a PositionalLight which can have a 'cone' of light used to restrict what objects or parts of an object get lit.

-

c3dl.WebGL

+

c3dl.WebGL

WebGL context.

diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..6dfde74 --- /dev/null +++ b/release.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +SRCNAME=canvas3dapi +ZIPFILENAME=$SRCNAME-$1.zip +UNCZIPFILENAME=$SRCNAME-$1-uncompressed.zip + +if [ $# -ne 1 -o ! -d $SRCNAME ] +then + echo "Usage: ./release.sh releasenumber (in the canvas3d directory)" + echo "e.g.: ./release.sh 0.5" + exit 1 +fi + +if [ -f $ZIPFILENAME ] +then + echo "$ZIPFILENAME already exists, giving up" + exit 1 +fi + +if [ -f $UNCZIPFILENAME ] +then + echo "$UNCZIPFILENAME already exists, giving up" + exit 1 +fi + +rm -rf /tmp/$SRCNAME + +# don't need all the .svn files +svn export $SRCNAME /tmp/$SRCNAME +if [ $? -ne 0 ] +then + echo "svn export failed, giving up" + exit 1 +fi + +OLDDIR=`pwd` +cd /tmp + +# create 'uncompressed' zip +zip -r $UNCZIPFILENAME $SRCNAME +if [ $? -ne 0 ] +then + echo "Failed to create zip file, giving up" + exit 1 +fi + +mv $UNCZIPFILENAME $OLDDIR +if [ $? -ne 0 ] +then + echo "Something weird happened, giving up" + exit 1 +fi + +cc $OLDDIR/jsmin.c -o jsmin +if [ $? -ne 0 ] +then + echo "Failed to compile jsmin, giving up" + exit 1 +fi + +# creat 'compressed' (normal) zip +for NAME in `find $SRCNAME` +do + if echo $NAME | grep -E ".js$" > /dev/null + then + echo "Compressing $NAME" + ./jsmin < $NAME > $NAME.min + mv $NAME.min $NAME + fi +done + +zip -r $ZIPFILENAME $SRCNAME +if [ $? -ne 0 ] +then + echo "Failed to create zip file, giving up" + exit 1 +fi + +mv $ZIPFILENAME $OLDDIR +if [ $? -ne 0 ] +then + echo "Something weird happened, giving up" + exit 1 +fi + +echo "Release zip files $ZIPFILENAME and $UNCZIPFILENAME created" + +echo "Don't forget to look at releases/Release Commands.txt to make a branch"