Babylon 0.0.3

  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 25

Changelog

0.0.1

  • Initial version, created by Stagehand

example/main.dart

// Copyright (c) 2016, Cedware. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:Babylon/babylon.dart';
import 'dart:html';
import 'package:js/js.dart';

main() {
  print("lol");
  CanvasElement canvas = querySelector("#canvas");
  Engine engine = new Engine(canvas,true);
  Scene scene = new Scene(engine);
  Camera camera = new FreeCamera("cam1", new Vector3(0.0,5.0,-10.0),scene);
  camera.setTarget(Vector3.Zero());
  camera.attachControl(canvas,true);
  Mesh.createSphere("s1",30,1.0,scene);
  Light light = new HemisphericLight("light", new Vector3(0.0,1.0,0.0),scene);
  light.intensity=0.7;
  engine.runRenderLoop(allowInterop((){
    scene.render();
  }));
}

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  Babylon: "^0.0.3"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:Babylon/babylon.dart';

import 'package:Babylon/engine.dart';

import 'package:Babylon/scene.dart';

import 'package:Babylon/vector3.dart';
        
Version Uploaded Documentation Archive
0.0.3 Jun 1, 2016 Go to the documentation of Babylon 0.0.3 Download Babylon 0.0.3 archive

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
77 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
10 / 100
Overall score:
Weighted score of the above. [more]
25
Learn more about scoring.

Platforms

Detected platforms: web

Platform components identified in package: html, js.

Suggestions

  • Use constrained dependencies.

    The pubspec.yaml contains 2 dependencies without version constraints. Specify version ranges for the following dependencies: browser, js.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 10 hints.

    Run dartfmt to format lib/babylon.dart.

    Run dartfmt to format lib/camera/camera.dart.

    Similar analysis of the following files failed:

    • lib/camera/free_camera.dart (hint)
    • lib/engine.dart (hint)
    • lib/light/hermispheric_light.dart (hint)
    • lib/light/light.dart (hint)
    • lib/mesh/mesh.dart (hint)
    • lib/mesh/spehere.dart (hint)
    • lib/scene.dart (hint)
    • lib/vector3.dart (hint)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
browser >=0.10.0+2 0.10.0+3
js >=0.6.0 0.6.1
Dev dependencies
test >=0.12.0 <0.13.0