3D Framework v0.48h +timings

22,275
0
Publicado 2014-01-05
More 3d info & demos: http://scratch.mit.edu/studios/202972
*******************************************************************
Latest base for 3D Framework, plus example scripts to create numerous structures (incl. by other users).
==== Lots of objects, so plenty of lag expected! ====
(And, no, I don't know why there's a Christmas tree in space...)
---------------------------------------------------------
SEEING LAG? If so, try playing project in phosphorus:
http://phosphorus.github.io/#16205373
---------------------------------------------------------
UPDATE v0.48h: fixed broken point transformation caching
UPDATE v0.48g: cache component rotation matrix (helps maybe?)
UPDATE v0.48f: bit better exclusion of objects out of view
UPDATE v0.48e: added FPS counter, fixed bug in text shading
UPDATE v0.48d: detailed timer list (press L to show/hide), so I can see where it tends to spend most time. Surface wireframe mode (press F to toggle). Other minor tweaks.
UPDATE v0.48c: minor tweaks
UPDATE v0.48b: fixed slight off-screen surface drawing bug
UPDATE v0.48: avoided all the "stop this script" blocks
UPDATE v0.47c: fixed a couple of minor bugs
UPDATE v0.47b: removed effects to avoid ex-beta player
UPDATE v0.47: slightly faster globe component render
UPDATE v0.46: Fixed bug with lighting vector when resetting camera rotation, or setting camera rotation to fixed angles.
UPDATE v0.45: Added Globe component (plus new object to show it off); Fixed centroids for some components; Fixed saturation for dot components; Extra features for line components; Changed a few variable names.
UPDATE v0.41: Fixed text shading; Slight efficiency improvements; Forced refresh every 1/2sec of render; Improved startup speed (plus new status report); Timers (hit T to show/hide).
---------------------------------------------------------
Lots of changes since the v0.3 framework base project.
Here's a selection of important ones...
– New 3D TEXT component (well-used in this demo).
– New custom blocks to manipulate & interrogate styles (see "Styles" sprite).
– New custom blocks to extract & move points within a structure (e.g. see the snowflakes structure in this demo).
– Now refer to surfs by number (like points) rather than ID when adding closed volume and single surface components.
– Renaming of some sprites (e.g. "MakeStructs" contains blocks for building structures, while "MoveStructs" contains blocks for manipulating them).
– Renaming of all variables used as part of 3D framework itself (all returned values start with "~zfReturn", settings start with "~zfSetting", internal variables start with "~~zfg" or "~~zfl").
– Numerous minor fixes & efficiency tweaks.

Must get on with documentation a.s.a.p...