Sha256: 01522d89bd8fe1a7d3be62fd83c619d5a783274de06ada443388c906dbab5fa0

Contents?: true

Size: 733 Bytes

Versions: 2

Compression:

Stored size: 733 Bytes

Contents

Jax.Controller.create "cones",
  update: (tc) ->
    objs = @world.getObjects()
    for obj in objs
      obj.camera.yaw tc * 0.4
    null

  index: ->
    @world.ambientColor = '#fff'
    
    # @world.addLight new Jax.Light.Directional
    #   shadows: false
    #   direction: [0, -1, 0]

    @world.addObject new Jax.Model
      mesh: new Jax.Mesh.Cone(sides: 3, size: 0.5, material: new Jax.Material.Wire)
      position: [-1, 0, -3]

    @world.addObject new Jax.Model
      mesh: new Jax.Mesh.Cone(sides: 4, size: 0.5, material: new Jax.Material.Wire)
      position: [0, 0, -3]

    @world.addObject new Jax.Model
      mesh: new Jax.Mesh.Cone(sides: 8, size: 0.5, material: new Jax.Material.Wire)
      position: [1, 0, -3]

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jax-3.0.0.rc2 app/assets/jax/controllers/cone.js.coffee
jax-3.0.0.rc1 app/assets/jax/controllers/cone.js.coffee