Skip to content

Commit e0330c1

Browse files
committed
updated the usage.txt file
1 parent f2fc232 commit e0330c1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ Some basic ideas:
3131
* Node extends Spatial
3232
* Mesh extends Node
3333
* Nodes can contain child nodes and they inherit their parents transformation.
34+
35+
See doc/usage.txt for usage infos.
36+

doc/usage.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11

22
create a new Dart web project, add this as a pubspec.yaml dependency:
33
dependencies:
4-
ChronosGL: any
4+
chronosgl: any
55

6+
(The package name has switched to all lowercase!)
67

78
create a HTML page and add a canvas similar to this:
89
<body style="height:100%; margin: 0; padding: 0">
@@ -12,19 +13,21 @@ in your dart file add this:
1213
import 'package:chronosgl/chronosgl.dart';
1314

1415
void main() {
15-
ChronosGL chronosGL = new ChronosGL('#webgl-canvas', false);
16-
ShaderProgram prg = chronosGL.createProgram( 'FixedVertexColor', chronosGL.getShaderLib().createFixedVertexColorShader());
16+
ChronosGL chronosGL = new ChronosGL('#webgl-canvas');
17+
ShaderProgram prg = chronosGL.createProgram( createDemoShader());
1718
Camera camera = chronosGL.getCamera();
1819
camera.setPos( 0.0, 0.0, 56.0 );
1920
Mesh m = chronosGL.getUtils().createTorusKnotMesh();
2021
prg.add( m);
2122
chronosGL.run();
2223
}
2324

25+
Press play to test.
26+
2427
If you need dart:html, it is recommended to add dart:html as HTML like this, due to a naming conflict regarding Node:
2528
import 'dart:html' as HTML;
2629

27-
Some other useful imports:
30+
Some other imports you might find useful:
2831

2932
import 'dart:web_gl';
3033
import 'dart:math' as Math;

0 commit comments

Comments
 (0)