topical media & game development

talk show tell print

graphic-o3d-samples-io-levels-all-actors.js / js



  /*
   * Copyright 2009, Google Inc.
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions are
   * met:
   *
   *     * Redistributions of source code must retain the above copyright
   * notice, this list of conditions and the following disclaimer.
   *     * Redistributions in binary form must reproduce the above
   * copyright notice, this list of conditions and the following disclaimer
   * in the documentation and/or other materials provided with the
   * distribution.
   *     * Neither the name of Google Inc. nor the names of its
   * contributors may be used to endorse or promote products derived from
   * this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   */
  
  
@fileoverview This file defines one level that our little game can run inside of. This file was auto-generated by io.rb from a SketchUp model.

  
  if (levels == undefined) {
    var levels = [];
  }
  
  levels.push({
    name: 'All Actors',
    colladaFile: 'all_actors.tgz',
  
    platforms: [
      {'left': {'mapX': 0},
       'z': 0, 'rotZ': 0.0,
       'right': {'adjacentID': 1, 'mapX': 1151}},
      {'left': {'adjacentID': 0, 'mapX': 1151},
       'z': 0, 'rotZ': 0.432710088213842,
       'right': {'adjacentID': 2, 'mapX': 2588}},
      {'left': {'adjacentID': 1, 'mapX': 2588},
       'z': 0, 'rotZ': 0.0,
       'right': {'adjacentID': 3, 'mapX': 3159}},
      {'left': {'adjacentID': 2, 'mapX': 3159},
       'z': 0, 'rotZ': 5.85194141379659,
       'right': {'adjacentID': 4, 'mapX': 3474}},
      {'left': {'adjacentID': 3, 'mapX': 3474},
       'z': 0, 'rotZ': 5.27977245408739,
       'right': {'adjacentID': 5, 'mapX': 4178}},
      {'left': {'adjacentID': 4, 'mapX': 4178},
       'z': 0, 'rotZ': 4.97548502987221,
       'right': {'adjacentID': 6, 'mapX': 4798}},
      {'left': {'adjacentID': 5, 'mapX': 4798},
       'z': 0, 'rotZ': 4.71238898038469,
       'right': {'mapX': 6726}},
      {'left': {'mapX': 3960},
       'z': 397, 'parentID': 4, 'rotZ': 5.27977245408739,
       'right': {'mapX': 4051}},
      {'left': {'mapX': 1308},
       'z': 45, 'parentID': 1, 'rotZ': 0.432710088213843,
       'right': {'obstacleHeight': 15, 'mapX': 1563}},
      {'left': {'mapX': 312},
       'z': 172, 'parentID': 0, 'rotZ': 0.0,
       'right': {'mapX': 524}},
      {'left': {'mapX': 2915},
       'z': 123, 'parentID': 2, 'rotZ': 0.0,
       'right': {'obstacleHeight': 64, 'mapX': 3066}},
      {'left': {'obstacleHeight': 72, 'mapX': 525},
       'z': 99, 'parentID': 0, 'rotZ': 0.0,
       'right': {'mapX': 545}},
      {'left': {'mapX': 2117},
       'z': 74, 'parentID': 1, 'rotZ': 0.432710088213842,
       'right': {'obstacleHeight': 76, 'mapX': 2441}},
      {'left': {'mapX': 514},
       'z': 365, 'parentID': 0, 'rotZ': 0.0,
       'right': {'mapX': 576}},
      {'left': {'mapX': 1377},
       'z': 115, 'parentID': 1, 'rotZ': 0.432710088213839,
       'right': {'mapX': 1433}},
      {'left': {'mapX': 1828},
       'z': 309, 'parentID': 1, 'rotZ': 0.432710088213842,
       'right': {'mapX': 1897}},
      {'left': {'obstacleHeight': 37, 'mapX': 6233},
       'z': 166, 'parentID': 6, 'rotZ': 4.71238898038469,
       'right': {'mapX': 6327}},
      {'left': {'mapX': 714},
       'z': 138, 'parentID': 0, 'rotZ': 0.0,
       'right': {'mapX': 869}},
      {'left': {'mapX': 1505},
       'z': 233, 'parentID': 1, 'rotZ': 0.432710088213845,
       'right': {'mapX': 1563}},
      {'left': {'obstacleHeight': 43, 'mapX': 4338},
       'z': 222, 'parentID': 5, 'rotZ': 4.97548502987221,
       'right': {'mapX': 4502}},
      {'left': {'mapX': 593},
       'z': 287, 'parentID': 0, 'rotZ': 0.0,
       'right': {'obstacleHeight': 24, 'mapX': 717}},
      {'left': {'mapX': 3377},
       'z': 326, 'parentID': 3, 'rotZ': 5.85194141379659,
       'right': {'obstacleHeight': 144, 'mapX': 4466}},
      {'left': {'mapX': 3704},
       'z': 194, 'parentID': 4, 'rotZ': 5.27977245408739,
       'right': {'mapX': 3862}},
      {'left': {'mapX': 4087},
       'z': 397, 'parentID': 4, 'rotZ': 5.27977245408739,
       'right': {'mapX': 4161}},
      {'left': {'mapX': 2699},
       'z': 351, 'parentID': 2, 'rotZ': 0.0,
       'right': {'mapX': 2705}},
      {'left': {'obstacleHeight': 22, 'mapX': 545},
       'z': 76, 'parentID': 0, 'rotZ': 0.0,
       'right': {'obstacleHeight': 22, 'mapX': 636}},
      {'left': {'mapX': 1678},
       'z': 309, 'parentID': 1, 'rotZ': 0.432710088213842,
       'right': {'mapX': 1767}},
      {'left': {'mapX': 4208},
       'z': 373, 'parentID': 5, 'rotZ': 4.97548502987219,
       'right': {'mapX': 4232}},
      {'left': {'mapX': 2441},
       'z': 150, 'parentID': 1, 'rotZ': 0.432710088213842,
       'right': {'adjacentID': 29, 'mapX': 2587}},
      {'left': {'adjacentID': 28, 'mapX': 2587},
       'z': 150, 'parentID': 2, 'rotZ': 0.0,
       'right': {'obstacleHeight': 200, 'mapX': 2705}},
      {'left': {'mapX': 4208},
       'z': 252, 'parentID': 5, 'rotZ': 4.97548502987219,
       'right': {'obstacleHeight': 30, 'mapX': 4238}},
      {'left': {'obstacleHeight': 107, 'mapX': -24},
       'z': 76, 'parentID': 0, 'rotZ': 0.0,
       'right': {'obstacleHeight': 42, 'mapX': 265}},
      {'left': {'mapX': 4239},
       'z': 282, 'parentID': 5, 'rotZ': 4.9754850298722,
       'right': {'mapX': 4301}},
      {'left': {'obstacleHeight': 38, 'mapX': 1433},
       'z': 76, 'parentID': 1, 'rotZ': 0.432710088213846,
       'right': {'obstacleHeight': 34, 'mapX': 1477}},
      {'left': {'obstacleHeight': 17, 'mapX': 4302},
       'z': 265, 'parentID': 5, 'rotZ': 4.97548502987222,
       'right': {'mapX': 4338}},
      {'left': {'mapX': 1505},
       'z': 148, 'parentID': 1, 'rotZ': 0.432710088213845,
       'right': {'mapX': 1563}},
      {'left': {'obstacleHeight': 30, 'mapX': 2441},
       'z': 43, 'parentID': 1, 'rotZ': 0.432710088213842,
       'right': {'mapX': 2587}},
      {'left': {'mapX': 1478},
       'z': 111, 'parentID': 1, 'rotZ': 0.432710088213837,
       'right': {'obstacleHeight': 37, 'mapX': 1504}},
      {'left': {'mapX': 1927},
       'z': 290, 'parentID': 1, 'rotZ': 0.432710088213842,
       'right': {'mapX': 2193}},
      {'left': {'mapX': 2706},
       'z': 351, 'parentID': 2, 'rotZ': 0.0,
       'right': {'mapX': 2738}},
      {'left': {'obstacleHeight': 37, 'mapX': 6136},
       'z': 203, 'parentID': 6, 'rotZ': 4.71238898038469,
       'right': {'mapX': 6232}},
      {'left': {'mapX': 4843},
       'z': 240, 'parentID': 6, 'rotZ': 4.71238898038469,
       'right': {'mapX': 6135}},
      {'left': {'mapX': 3921},
       'z': 222, 'parentID': 4, 'rotZ': 5.27977245408739,
       'right': {'adjacentID': 43, 'mapX': 4177}},
      {'left': {'adjacentID': 42, 'mapX': 4177},
       'z': 222, 'parentID': 5, 'rotZ': 4.97548502987222,
       'right': {'obstacleHeight': 30, 'mapX': 4207}},
      {'left': {'mapX': 1478},
       'z': 196, 'parentID': 1, 'rotZ': 0.432710088213837,
       'right': {'mapX': 1504}},
      {'left': {'obstacleHeight': 61, 'mapX': 870},
       'z': 76, 'parentID': 0, 'rotZ': 0.0,
       'right': {'adjacentID': 46, 'mapX': 1151}},
      {'left': {'adjacentID': 45, 'mapX': 1151},
       'z': 76, 'parentID': 1, 'rotZ': 0.432710088213843,
       'right': {'obstacleHeight': 38, 'mapX': 1377}},
      {'left': {'mapX': 4665},
       'z': 222, 'parentID': 5, 'rotZ': 4.97548502987221,
       'right': {'mapX': 4739}},
      {'left': {'obstacleHeight': 72, 'mapX': 1563},
       'z': 76, 'parentID': 1, 'rotZ': 0.432710088213843,
       'right': {'mapX': 2018}},
      {'left': {'mapX': 4769},
       'z': 222, 'parentID': 5, 'rotZ': 4.97548502987221,
       'right': {'adjacentID': 50, 'mapX': 4798}},
      {'left': {'adjacentID': 49, 'mapX': 4798},
       'z': 222, 'parentID': 6, 'rotZ': 4.71238898038469,
       'right': {'obstacleHeight': 18, 'mapX': 4843}},
      {'left': {'mapX': 312},
       'z': 234, 'parentID': 0, 'rotZ': 0.0,
       'right': {'mapX': 362}},
      {'left': {'mapX': 265},
       'z': 119, 'parentID': 0, 'rotZ': 0.0,
       'right': {'obstacleHeight': 53, 'mapX': 312}},
      {'left': {'mapX': 2642},
       'z': 326, 'parentID': 2, 'rotZ': 0.0,
       'right': {'obstacleHeight': 25, 'mapX': 2699}},
      {'left': {'obstacleHeight': 37, 'mapX': 6327},
       'z': 129, 'parentID': 6, 'rotZ': 4.71238898038469,
       'right': {'mapX': 6596}},
      {'left': {'obstacleHeight': 96, 'mapX': 6596},
       'z': 32, 'parentID': 6, 'rotZ': 4.71238898038469,
       'right': {'mapX': 6726}},
      {'left': {'mapX': 1352},
       'z': 155, 'parentID': 1, 'rotZ': 0.432710088213843,
       'right': {'mapX': 1388}},
      {'left': {'mapX': 4551},
       'z': 222, 'parentID': 5, 'rotZ': 4.97548502987221,
       'right': {'mapX': 4595}},
      {'left': {'mapX': 636},
       'z': 98, 'parentID': 0, 'rotZ': 0.0,
       'right': {'obstacleHeight': 39, 'mapX': 714}},
      {'left': {'obstacleHeight': 227, 'mapX': 2738},
       'z': 123, 'parentID': 2, 'rotZ': 0.0,
       'right': {'mapX': 2762}},
      {'left': {'mapX': 2642},
       'z': 247, 'parentID': 2, 'rotZ': 0.0,
       'right': {'obstacleHeight': 78, 'mapX': 2701}},
      {'left': {'mapX': 4401},
       'z': 394, 'parentID': 3, 'rotZ': 5.85194141379659,
       'right': {'obstacleHeight': 161, 'mapX': 4463}},
      {'left': {'mapX': 1561},
       'z': 309, 'parentID': 1, 'rotZ': 0.432710088213842,
       'right': {'mapX': 1623}},
      {'left': {'mapX': 3248},
       'z': 222, 'parentID': 3, 'rotZ': 5.85194141379659,
       'right': {'adjacentID': 64, 'mapX': 3473}},
      {'left': {'adjacentID': 63, 'mapX': 3473},
       'z': 222, 'parentID': 4, 'rotZ': 5.2797724540874,
       'right': {'mapX': 3607}},
      {'left': {'mapX': 400},
       'z': 270, 'parentID': 0, 'rotZ': 0.0,
       'right': {'mapX': 524}},
      {'left': {'mapX': 3066},
       'z': 188, 'parentID': 2, 'rotZ': 0.0,
       'right': {'adjacentID': 67, 'mapX': 3159}},
      {'left': {'adjacentID': 66, 'mapX': 3159},
       'z': 188, 'parentID': 3, 'rotZ': 5.85194141379659,
       'right': {'obstacleHeight': 33, 'mapX': 3248}}],
    actors: [
      new Avatar({ name: 'Avatar1', colladaID: 'Avatar1',
                   x: 23, y: 0, z: 77, mapX: 24, rotZ: 0.0628318530722379,
  
                   platformID: 31}),
      new Spikem({ name: 'Spikem1', colladaID: 'Spikem1',
                   x: 186, y: -1, z: 76, mapX: 186, rotZ: 0.0,
                   platformID: 31}),
      new Spikem({ name: 'Spikem2', colladaID: 'Spikem2',
                   x: 763, y: -2, z: 144, mapX: 762, rotZ: 0.0,
                   platformID: 17}),
      new Spikem({ name: 'Spikem3', colladaID: 'Spikem3',
                   x: 437, y: -1, z: 178, mapX: 436, rotZ: 0.0,
                   platformID: 9}),
      new Spikem({ name: 'Spikem4', colladaID: 'Spikem4',
                   x: 1819, y: 311, z: 80, mapX: 1886, rotZ: 0.0,
                   platformID: 48}),
      new Spikem({ name: 'Spikem5', colladaID: 'Spikem5',
                   x: 2861, y: 602, z: 130, mapX: 2992, rotZ: 0.0,
                   platformID: 10}),
      new Spikem({ name: 'Spikem6', colladaID: 'Spikem6',
                   x: 3830, y: -631, z: 228, mapX: 4704, rotZ: 0.0,
                   platformID: 47}),
      new Spikem({ name: 'Spikem7', colladaID: 'Spikem7',
                   x: 3854, y: -1682, z: 246, mapX: 5757, rotZ: 0.0,
                   platformID: 41}),
      new Spikem({ name: 'Spikem8', colladaID: 'Spikem8',
                   x: 3796, y: -507, z: 228, mapX: 4575, rotZ: 0.0,
                   platformID: 57}),
      new Spikem({ name: 'Spikem9', colladaID: 'Spikem9',
                   x: 3765, y: -390, z: 228, mapX: 4454, rotZ: 0.0,
                   platformID: 19}),
      new Spikem({ name: 'Spikem10', colladaID: 'Spikem10',
                   x: 3848, y: -2623, z: 22, mapX: 6699, rotZ: 0.0,
                   platformID: 55}),
      new Arrow({ name: 'Arrow1', colladaID: 'Arrow1',
                  x: 40, y: 3, z: 99, mapX: 40, rotZ: 0.0,
                   platformID: 31}),
      new Arrow({ name: 'Arrow2', colladaID: 'Arrow2',
                  x: 37, y: 0, z: 76, mapX: 37, rotZ: 0.0,
                   platformID: 31}),
      new Arrow({ name: 'Arrow3', colladaID: 'Arrow3',
                  x: 40, y: 3, z: 86, mapX: 40, rotZ: 0.0,
                  platformID: 31}),
      new HorizontalPad({ name: 'HorizontalPad1', colladaID: 'HorizontalPad1',
                  x: 1692, y: 247, z: 312, mapX: 1745, rotZ: -0.411897703470668,
                  platformID: 26}),
      new HorizontalPad({ name: 'HorizontalPad2', colladaID: 'HorizontalPad2',
                  x: 1926, y: 355, z: 292, mapX: 2003, rotZ: -0.411897703470668,
                  platformID: 38}),
      new Coin({ name: 'Coin1', colladaID: 'Coin1',
                 x: 342, y: -2, z: 247, mapX: 341, rotZ: 0.0,
                 platformID: 51}),
      new Coin({ name: 'Coin2', colladaID: 'Coin2',
                 x: 424, y: -2, z: 299, mapX: 423, rotZ: 0.0,
                 platformID: 65}),
      new Coin({ name: 'Coin3', colladaID: 'Coin3',
                 x: 461, y: -2, z: 303, mapX: 461, rotZ: 0.0,
                 platformID: 65}),
      new Coin({ name: 'Coin4', colladaID: 'Coin4',
                 x: 496, y: -2, z: 303, mapX: 495, rotZ: 0.0,
                 platformID: 65}),
      new Coin({ name: 'Coin5', colladaID: 'Coin5',
                 x: 1426, y: 121, z: 83, mapX: 1450, rotZ: 0.0,
                 platformID: 33}),
      new Coin({ name: 'Coin6', colladaID: 'Coin6',
                 x: 1659, y: 232, z: 344, mapX: 1709, rotZ: 0.0,
                 platformID: 26}),
      new Coin({ name: 'Coin7', colladaID: 'Coin7',
                 x: 1697, y: 254, z: 344, mapX: 1753, rotZ: 0.0,
                 platformID: 26}),
      new Coin({ name: 'Coin8', colladaID: 'Coin8',
                 x: 1971, y: 382, z: 304, mapX: 2055, rotZ: 0.0,
                 platformID: 38}),
      new Coin({ name: 'Coin9', colladaID: 'Coin9',
                 x: 2053, y: 419, z: 304, mapX: 2145, rotZ: 0.0,
                 platformID: 38}),
      new Coin({ name: 'Coin10', colladaID: 'Coin10',
                 x: 2015, y: 402, z: 305, mapX: 2103, rotZ: 0.0,
                 platformID: 38}),
      new Coin({ name: 'Coin11', colladaID: 'Coin11',
                 x: 2184, y: 475, z: 229, mapX: 2287, rotZ: 0.0,
                 platformID: 38}),
      new Coin({ name: 'Coin12', colladaID: 'Coin12',
                 x: 2184, y: 475, z: 256, mapX: 2287, rotZ: 0.0,
                 platformID: 38}),
      new Coin({ name: 'Coin13', colladaID: 'Coin13',
                 x: 2184, y: 475, z: 307, mapX: 2287, rotZ: 0.0,
                 platformID: 38}),
      new Coin({ name: 'Coin14', colladaID: 'Coin14',
                 x: 2184, y: 475, z: 282, mapX: 2287, rotZ: 0.0,
                 platformID: 38}),
      new Coin({ name: 'Coin15', colladaID: 'Coin15',
                 x: 546, y: -2, z: 422, mapX: 545, rotZ: 0.0,
                 platformID: 13}),
      new Coin({ name: 'Coin16', colladaID: 'Coin16',
                 x: 2590, y: 607, z: 371, mapX: 2721, rotZ: 0.0,
                 platformID: 39}),
      new Coin({ name: 'Coin17', colladaID: 'Coin17',
                 x: 2737, y: 606, z: 246, mapX: 2961, rotZ: 0.0,
                 platformID: 10}),
      new Coin({ name: 'Coin18', colladaID: 'Coin18',
                 x: 2737, y: 606, z: 273, mapX: 2868, rotZ: 0.0,
                 platformID: 39}),
      new Coin({ name: 'Coin19', colladaID: 'Coin19',
                 x: 3599, y: 21, z: 433, mapX: 4005, rotZ: 0.0,
                 platformID: 7}),
      new Coin({ name: 'Coin20', colladaID: 'Coin20',
                 x: 3665, y: -78, z: 429, mapX: 4125, rotZ: 0.0,
                 platformID: 23}),
      new Coin({ name: 'Coin21', colladaID: 'Coin21',
                 x: 4156, y: 77, z: 423, mapX: 4402, rotZ: 0.0,
                 platformID: 61}),
      new Coin({ name: 'Coin22', colladaID: 'Coin22',
                 x: 4182, y: 71, z: 418, mapX: 4428, rotZ: 0.0,
                 platformID: 61}),
      new Coin({ name: 'Coin23', colladaID: 'Coin23',
                 x: 4182, y: 71, z: 447, mapX: 4428, rotZ: 0.0,
                 platformID: 61}),
      new Coin({ name: 'Coin24', colladaID: 'Coin24',
                 x: 4156, y: 77, z: 452, mapX: 4402, rotZ: 0.0,
                 platformID: 61}),
      new Coin({ name: 'Coin25', colladaID: 'Coin25',
                 x: 4156, y: 77, z: 482, mapX: 4402, rotZ: 0.0,
                 platformID: 61}),
      new Coin({ name: 'Coin26', colladaID: 'Coin26',
                 x: 4182, y: 71, z: 477, mapX: 4428, rotZ: 0.0,
                 platformID: 61}),
      new VerticalPad({ name: 'VerticalPad1', colladaID: 'VerticalPad1',
                 x: 2663, y: 603, z: 221, mapX: 2794, rotZ: 0.0,
                 platformID: 60}),
      new VerticalPad({ name: 'VerticalPad2', colladaID: 'VerticalPad2',
                 x: 2799, y: 603, z: 152, mapX: 2930, rotZ: 0.0,
                 platformID: 10})]
  });
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.