Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Prepareing for 1.0RC release #533

Merged
merged 121 commits into from
Dec 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
e792d45
fix: Removed dependency for Node.EventEmitter
kyasbal Jul 19, 2017
6605b2d
fix: Readme
kyasbal Aug 3, 2017
6062b6b
Merge pull request #511 from GrimoireGL/fix/readme
kyasbal Aug 3, 2017
5359d2f
fix: add library-loading event to handle by message event on window
kyasbal Aug 12, 2017
1d6b671
Merge branch 'master' into fix/readme
kyasbal Aug 12, 2017
29a4acf
fix: lint problem
kyasbal Aug 12, 2017
5fdc8bc
Merge branch 'fix/readme' of github.com:GrimoireGL/GrimoireJS into fi…
kyasbal Aug 12, 2017
14bc599
Merge pull request #515 from GrimoireGL/fix/readme
kyasbal Aug 12, 2017
38c49ad
fix: add root-node-added event on GOML loader
kyasbal Aug 14, 2017
d7b50d2
Merge branch 'master' into fix/readme
kyasbal Aug 14, 2017
fbaf9fb
feat: Changed initializing event timing
kyasbal Aug 14, 2017
8632b16
Merge branch 'master' into feat/initializing-event-bug
kyasbal Aug 14, 2017
0b62aa0
fix: document
kyasbal Aug 21, 2017
150fea9
Merge branch 'fix/readme' of github.com:GrimoireGL/GrimoireJS into fi…
kyasbal Aug 21, 2017
f4cacdd
Merge pull request #522 from GrimoireGL/fix/readme
kyasbal Aug 21, 2017
3a0b5d2
Merge branch 'master' into feat/initializing-event-bug
kyasbal Aug 21, 2017
74f54ef
Merge pull request #517 from GrimoireGL/feat/initializing-event-bug
kyasbal Aug 21, 2017
c550b9a
Update README.md
kyasbal Aug 21, 2017
4aef57f
Update README.md
kyasbal Aug 21, 2017
d596796
Merge pull request #523 from GrimoireGL/kyasbal-1994-patch-1
kyasbal Aug 21, 2017
5cb5ca1
fix: webpack script
kyasbal Aug 23, 2017
6ca9d25
Merge branch 'master' into feat/promise-attribute
kyasbal Aug 23, 2017
cc34443
Merge pull request #524 from GrimoireGL/feat/promise-attribute
kyasbal Aug 23, 2017
914cbfc
Merge remote-tracking branch 'origin/master' into develop
moajo Sep 14, 2017
d3e790a
fix bug
moajo Sep 14, 2017
15c11e0
[fix] remove unnecessary exports
moajo Sep 15, 2017
d374967
[refactor] change directory structure
moajo Sep 15, 2017
8bc1130
[refactor] change test directory structure
moajo Sep 15, 2017
626de1a
[add] string converter test
moajo Sep 15, 2017
a4c7319
fix: expose XMLReader dependency on DOMParser
moajo Sep 15, 2017
0fe87b1
fix: refactor AttributeManagerTest
moajo Sep 16, 2017
8b52a10
fix: refactor test structure
moajo Sep 16, 2017
7642703
fix: remove unuse files.
moajo Sep 16, 2017
314a9e4
fix: refacor Namespace
moajo Sep 16, 2017
3f76cdd
fix: refactor NSIdentity test
moajo Sep 16, 2017
c1240ee
fix: add AttributeTest
moajo Sep 17, 2017
38e66dd
fix: refactor test
moajo Sep 17, 2017
3d1bfdd
fix: add ComponentDeclarationTest
moajo Sep 17, 2017
55d334b
fix: add ComponentTest
moajo Sep 17, 2017
b908d88
fix: replace GrimoireInterface.ns()
moajo Sep 18, 2017
592327b
fix: add Environment manager
moajo Sep 18, 2017
19d8f4d
fix: refactor test
moajo Sep 19, 2017
018999c
fix: add test
moajo Sep 24, 2017
7244573
fix: refactor test
moajo Sep 24, 2017
8a81439
fix: add dependency on xmlserializer for test env
moajo Sep 24, 2017
4a9d1b4
fix: Allow to call addRootNode without specifying scriptTag element
moajo Sep 24, 2017
2076bb3
fix: add test
moajo Sep 24, 2017
802e154
fix: remove GomlInterface.getNodeById()
moajo Sep 25, 2017
6083928
fix: fix test
moajo Sep 25, 2017
2a1947e
fix: merge NodeUtility into Utility
moajo Sep 25, 2017
b44f315
fix: convert from Array on NumberConverter tobe deprecated
moajo Sep 25, 2017
68c681a
fix: add GomlLoader test
moajo Sep 25, 2017
6174270
fix: add devDependencies @types/sinon
moajo Sep 26, 2017
1b98ad7
fix: recursive import problem
moajo Sep 29, 2017
103e22d
fix: change arguments of XMLReader.parseXML()
moajo Sep 29, 2017
dd3aff2
fix: refactor test
moajo Sep 29, 2017
579543e
fix: change directory structure/rename identity
moajo Oct 7, 2017
ad04250
fix: update tslint.json
moajo Oct 7, 2017
f9740ce
fix: lint
moajo Oct 10, 2017
74dc1b3
fix: use common submodule
moajo Oct 10, 2017
d08580f
[fix] test
moajo Oct 12, 2017
724653f
[fix] replace 'snake-case' to 'kebab-case'
moajo Oct 12, 2017
1415acc
[fix] message reciever to be protected
moajo Oct 12, 2017
a64731e
[fix] refactor code
moajo Oct 12, 2017
61162cc
[fix] rename function
moajo Oct 12, 2017
97cf84e
fix: remove unuse files
moajo Oct 15, 2017
d68fffb
fix: getAtribute() to take type parameter
moajo Oct 15, 2017
39c1479
fix: remove Component.__addAtribute()
moajo Oct 15, 2017
fb41a38
fix: implement Component.__setCompanionWithSelfNS()
moajo Oct 15, 2017
125e618
fix: Check DOMContentLoaded was fired before calling waiting for DOMC…
kyasbal Oct 18, 2017
43366b2
Merge pull request #536 from GrimoireGL/fix-wait-for-dom-contentload
kyasbal Oct 18, 2017
6fc0163
feat: Accepting library preference as a object on global that is init…
kyasbal Oct 18, 2017
5bd0b8c
feat: Implemented postponeLoading
kyasbal Oct 19, 2017
f46346d
Merge branch 'master' into feat-postpone-Loading
kyasbal Oct 19, 2017
e0569a8
Merge pull request #537 from GrimoireGL/feat-postpone-Loading
kyasbal Oct 19, 2017
eb6b0fe
fix: Add staging javascript upload shell command
kyasbal Oct 20, 2017
7da1cf7
fix: use npm instead of yarn
kyasbal Oct 20, 2017
deee900
fix: change signature IdentityMap.get()
moajo Oct 15, 2017
9d3669d
fix: component constructor can be used as requiredComponents for regi…
moajo Oct 20, 2017
4da9baa
fix: component test
moajo Oct 20, 2017
f3af541
fix: add default argument value to GomlNode#addChildByName
moajo Oct 20, 2017
288a725
fix: add assertion to Attribute#bindTo
moajo Oct 21, 2017
beb70f9
feat: Attribute generics
moajo Oct 21, 2017
710e9e9
feat: use converter generics
moajo Oct 21, 2017
9eea312
fix: update gitignore
moajo Oct 21, 2017
2a5b214
fix: refactor GomlParser
moajo Oct 21, 2017
2145f75
feat: implement template node
moajo Oct 21, 2017
461fc56
Merge branch 'master' into develop
moajo Oct 21, 2017
f749107
Merge branch 'develop' into refactor
moajo Oct 21, 2017
c91c8a9
fix: change directory name
moajo Oct 22, 2017
aba0bac
feat:implement goml mutation observeing
moajo Oct 22, 2017
e19d24e
fix: refactor
moajo Oct 22, 2017
6bd3c98
feat: implement clearMessageRecieverCache
moajo Oct 22, 2017
29b6164
fix: add e2e testing
kyasbal Nov 5, 2017
27c2eb0
fix: add region code
kyasbal Nov 5, 2017
e6eb89b
fix: Removed noUnusedLocals temporary. This rise some build error
kyasbal Nov 5, 2017
02e180e
fix: for lint
kyasbal Nov 5, 2017
d40a32b
trigger e2e
kyasbal Nov 5, 2017
2e3fafb
trigger e2e
kyasbal Nov 5, 2017
9298762
Merge pull request #542 from GrimoireGL/chore/ci-staging-e2e
kyasbal Nov 5, 2017
e3644eb
fix: remove unuse variables
moajo Nov 21, 2017
beecaf5
Merge branch 'master' into refactor
moajo Nov 21, 2017
7ebd84f
fix(package): update eventemitter3 to version 3.0.0
greenkeeper[bot] Nov 29, 2017
d943767
chore(package): update ts-loader to version 3.2.0
greenkeeper[bot] Nov 29, 2017
1ba1665
chore(package): update sinon to version 4.1.3
greenkeeper[bot] Dec 7, 2017
382b817
chore(package): update condition-circle to version 2.0.1
greenkeeper[bot] Dec 14, 2017
9877e1e
chore: rename properties
moajo Dec 16, 2017
a0a788a
chore: update common-configuration
moajo Dec 16, 2017
b5e09c9
update common configurations
moajo Dec 16, 2017
15f7f64
update circle.yaml
moajo Dec 16, 2017
e86b3ea
update dependencies
moajo Dec 16, 2017
c13fab3
Merge remote-tracking branch 'origin/greenkeeper/sinon-4.1.3' into re…
moajo Dec 16, 2017
1134b4e
Merge remote-tracking branch 'origin/greenkeeper/condition-circle-2.0…
moajo Dec 16, 2017
712f917
Merge remote-tracking branches 'origin/greenkeeper/ts-loader-3.2.0' a…
moajo Dec 16, 2017
7d2bb3c
chore: update event emitter
moajo Dec 16, 2017
43b7dee
chore: replace babel-preset-es2015 with babel-preset-env
moajo Dec 18, 2017
2aaddb2
feat: add overload to Component#setAttribute
moajo Dec 18, 2017
6c3877d
feat: add loadFromGOML method to GomlLoader
moajo Dec 18, 2017
63a1f1c
feat: implement TemplateNode.src
moajo Dec 18, 2017
278cc33
change lint script
moajo Dec 19, 2017
6062f52
add overload to GomlNode#append
moajo Dec 19, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ yarn.lock
docs
test-lib
test-lib-es5
src/metaInfo.ts
package-lock.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "common"]
path = common
url = [email protected]:GrimoireGL/common-configurations.git
17 changes: 0 additions & 17 deletions .jsbeautifyrc

This file was deleted.

3 changes: 0 additions & 3 deletions .jshintrc

This file was deleted.

158 changes: 111 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,87 +5,151 @@
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jThreeJS/jThree/blob/develop/LICENSE)
[![Dependency Status](https://david-dm.org/GrimoireGL/GrimoireJS.svg)](https://david-dm.org/GrimoireGL/GrimoireJS)
[![devDependency Status](https://david-dm.org/GrimoireGL/GrimoireJS/dev-status.svg)](https://david-dm.org/GrimoireGL/GrimoireJS#info=devDependencies)
[![Greenkeeper badge](https://badges.greenkeeper.io/GrimoireGL/GrimoireJS.svg)](https://greenkeeper.io/)

## Overview

[![Greenkeeper badge](https://badges.greenkeeper.io/GrimoireGL/GrimoireJS.svg)](https://greenkeeper.io/)
**Grimoire.js provide a bridge between Web engineers and CG engineers**

Why virtual DOM needs to be only for actual DOM?
Logics like drawing formulas for canvas even needs DOM for easier way.
There were big gap between the development flows used for each.

* **DOM based** ・・・The way that Web engineers can work most effectively.
* **jQuery like API** ・・・No more complex procedural WebGL logics, just operate attributes with the API.
* **Web development friendly**・・・Use with the other Web front-end frameworks. Very easy to coop with them.
* **No more redundant codes**・・・Include only `tag`s you actually need.
Web engineers have typically used `event driven` javascript programs for daily works. And they mutate DOM APIs to make Web pages dynamic.

## Download
However, CG engineers has typically used `loop based` programs for daily works. These are mostly build with a programming language with strong type like C++ or C#. And recently CG engineers more like to use strongly structured engines like Unity.

This is why these 2 engineers have so much different flow for workings. This is why it is hard to learn CG stuff by Web engineers. And CG engineers are also hard to make suitable APIs for Web engineers working with.

**Grimoire.js is a javascript(Typescript) framework to solve this problem with strong architecture**

The file you might want to download is not included this repository since even set of WebGL operations are treated as plugins.
Basic set for using Grimoire.js is bundled and published here([unpkg](https://unpkg.com/[email protected]/register/grimoire-preset-basic.min.js)).
This file includes `grimoirejs`,`grimoirejs-math` and `grimoirejs-fundamental`.
## Features

## First Interact
You can see several feature of Grimoire.js providing in this section.

**HTML file**
**We strongly recommend to see our [top page](http://grimoire.gl) to learn these features. Most of written things are same as this README.md. But our samples on the top pages are working!!.**

### HTML like markup

We provides a syntax like XML to compose WebGL canvas. This is kind of HTML for Web engineers.
You can create 360 degree image viewer on browser only by writing the code below.(See official page to see working example)

```xml
<html>
<head>
<script src="grimoire-preset-basic.js"></script>
</head>
<body>
<script type="text/goml" src="./index.goml">
</body>
</html>
<goml>
<scene>
<camera></camera>
<mesh geometry="sphere" cull="front" texture="360.jpg">
<mesh.components>
<Rotate speed="0.1" />
</mesh.components>
</mesh>
</scene>
</goml>
```

**GOML file(Canvas DOM we defined)**
### DOM operation API

Web engineers typically write javascript to mutate DOM structures or attributes. All that kinds things are same at Grimoire. Web engineers can use query-based operation API to changing attributes, modifying structures of DOM or registering event handlers.

These are codes to co-work WebGL canvas and Web UIs that made with ordinal web development way. (You can see working example on our official top page)

```xml
<goml>
<scene>
<camera>
<camera.components>
<!-- Attaching component to move the camera with mouse-->
<MouseCameraControl/>
</camera.components>
</camera>
<mesh geometry="cube" color="red"/>
<camera></camera>
<mesh texture="logo.png" geometry="cube">
<mesh.components>
<Rotate speed="0,0.1,0" />
</mesh.components>
</mesh>
</scene>
</goml>
```

## Purpose
```js
gr(function() {
var mesh = gr('#simple .canvas')('mesh')
$('#simple .red').on('click', function () {
mesh.setAttribute('color', 'red')
})
$('#simple .blue').on('click', function () {
mesh.setAttribute('color', 'blue')
})
mesh.on('mouseenter', function () {
mesh.setAttribute('scale', '2.0')
$("#simple .bigger").addClass("bold-label");
$("#simple .smaller").removeClass("bold-label");
})
mesh.on('mouseleave', function () {
mesh.setAttribute('scale', '1.0')
$("#simple .smaller").addClass("bold-label");
$("#simple .bigger").removeClass("bold-label");
})
})
```

**WebGL is not only for games, but also for web services.**
### Simple and powerful architecture, Typescript ready

If you really want to make WebGL stuff on your page, it is hard to make only by Web engineers if that contents requires highly customized representation. In this situation, Web engineers and CG engineers need to co-work.

CG engineers can write a component. And these are reusable.

And these are able to be written by Typescript. Safe and effective environment for development.

This is a sample to make objects waving movement. (You can see full comprehensive this sample at our top page)

```ts
import Component from "grimoirejs/ref/Core/Component";
import ISceneUpdateArgument from "grimoirejs-fundamental/ref/SceneRenderer/ISceneUpdateArgument";
import TransformComponent from "grimoirejs-fundamental/ref/Components/TransformComponent";
import Vector3 from "grimoirejs-math/ref/Vector3";
import gr from "grimoirejs";
class Wave extends Component{
public static attributes = {
amp:{
default:1.0,
converter:"Number"
},
speed:{
default:1.0,
converter:"Number"
}
};

public amp:number;

public speed:number;

private transform: TransformComponent;

public $mount():void{
this.transform = this.node.getComponent(TransformComponent);
this.__bindAttributes(); // bind component attributes to fields
}
public $update(t:ISceneUpdateArgument):void{
this.transfrom.position = new Vector3(this.transform.position.X,Math.sin(this.speed * t.timer.timeInSecound) * this.amp,this.transform.position.Z);
}
}
gr.registerComponent("Wave",Wave);
```

After WebGL feature being implemented with modern browsers, many impressive Web3D libraries are appeared. However, most of them are just imported from 3D development culture that was grown in the environments very apart from web development culture.
## Download

There should be good way of mixing these cultures. Grimoire.js is one of solution of that future.
Please see official site and [Download page](https://grimoire.gl/guide/1_essentials/01_installation.html).

## Useful Links

* **Official Site**・・・http://grimoire.gl

## Extensions

You can try these plugins with just downloading them. Or, If you are npm user, you can install them with `npm install` easily.

### Major Plugins
### API Reference

Plugin is a necessary feature to use Grimoire.js. Most of features are separated as plugin. This repo is core of Grimoire.js not containing any WebGL codes.
See [here](https://api.grimoire.gl/core).

|Name|Purpose|Dependency|
|:-:|:-:|:-:|
|grimoirejs-math| Defining math related class and converters| None|
|grimoirejs-fundamental| Defining basement system for WebGL and defines basic tags|grimoirejs-math|
|grimoirejs-gltf|glTF model loader plugin defines the tags to populate glTF model in the scene|grimoirejs-math,grimoirejs-fundamental|
This document is automatically generated.

### Major Presets
<!--DOCUMENT STAMP-->

It is hard work to download all depends plugins and links with script tag. So, there are presets containing multiple plugins.
Make sure the API reference is only containing core stuff(Mutating goml stuff, operating attributes, methods being available on Component instance and so on).

* grimoirejs-preset-basic・・・containing grimoirejs,grimoirejs-fundamental,grimoirejs-math
If you want to see WebGL related feature of API, you should see [renderer plugin page](https://api.grimoire.gl/grimoirejs-fundamental).

## LICENSE

Expand Down
30 changes: 12 additions & 18 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
machine:
node:
version: 6.9.5

post:
- curl -o- -L https://yarnpkg.com/install.sh | bash

dependencies:
cache_directories:
- "~/.cache/yarn"

pre:
- yarn --version

override:
- yarn install

version: 9.3.0
test:
post:
- sh release.sh
- aws s3 cp ./coverage/ s3://coverage.grimoire.gl/core/$CIRCLE_BRANCH --recursive --region ap-northeast-1 --acl public-read
- >-
aws s3 cp ./coverage/ s3://coverage.grimoire.gl/core/$CIRCLE_BRANCH
--recursive --region ap-northeast-1 --acl public-read
override:
- npm run lint && npm run build && npm run coverage

- sh -x shell/e2e.sh
checkout:
post:
- git submodule init
- git submodule update
deployment:
deploy:
branch: master
commands:
- npm run doc
- aws s3 cp ./docs/ s3://api.grimoire.gl/core --recursive --region ap-northeast-1 --acl public-read
- >-
aws s3 cp ./docs/ s3://api.grimoire.gl/core --recursive --region
ap-northeast-1 --acl public-read
1 change: 1 addition & 0 deletions common
Submodule common added at 7cb3fe
24 changes: 24 additions & 0 deletions doc-timestamp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const fs = require("fs");

fs.readFile("./package.json","utf8",(err,data)=>{
if(err){
console.error(err);
process.exit(1);
}else{
const version = JSON.parse(data).version;
fs.readFile("./README.md","utf8",(err,original)=>{
if(err){
console.error(err);
process.exit(1);
}else{
const replaced = original.replace("<!--DOCUMENT STAMP-->",`* Update date: \`${new Date()}\`\n* Build version: \`${version}\``);
fs.writeFile("./README.md",replaced,(err,data)=>{
if(err){
console.error(err);
process.exit(1);
}
});
}
});
}
});
Loading