Coder Social home page Coder Social logo

hilo3d's People

Contributors

06wj avatar dtysky avatar fanmingfei avatar royjang avatar steel1990 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hilo3d's Issues

docs request: GeometryData.get() returns reference to same object without any warning

Spent couple hours trying to get correct normals.
All was about data management:

//Works like that
 points[0].position.copy(data.vertices.get(0));
 points[1].position.copy(data.vertices.get(1));
 points[2].position.copy(data.vertices.get(2));
//Doesn't work like that
const p0 = data.vertices.get(0);
const p1 = data.vertices.get(1);
const p2 = data.vertices.get(2);
//p0 === p1 === p2
points[0].position.copy(p0);
points[1].position.copy(p1);
points[2].position.copy(p2);

All because get returns reference to same vector object. Please, add warning about that in docs, and, optionally, additional method getCopy which should return vector copy

Cannon example doesn't descriptive enough

Hi.

I experienced few problems when tried to use cannon by example and think it (example) should be extended:

  1. Cannon and Hilo worlds works in different axes: Cannon uses Z as vertical, Hilo Y. It isn't issue itself since you can just set gravity in any direction, but for some bodies like planes it is problem. All ground bodies has to be rotated:
world.gravity.set(0, GRAVITY, 0); //Hilo's gravity direction
const groundBody = new cannon.Body({
		mass: 0, // mass == 0 makes the body static
		quaternion: new cannon.Quaternion(0, 0, 0).setFromEuler(-Math.PI / 2, 0, 0) //hilo's ground rotation
	});

Also i think it would be better to let cannon work in Z direction as it was, but then we need to swap axes like hilomesh.setPosition(this.body.position.x, this.body.position.z, this.body.position.y); and rotation too.
2. Line geometry = new Hilo3d.BoxGeometry( 2, 2, 2 ); incorrect because BoxGeometry works with object argument, const geometry = new Hilo3d.BoxGeometry({ width: 2, height: 2, depth: 2 });
3. It doesn't clear from example that Hilo's bodies (Boxes) has to be twice bigger than cannon's

const geometry = new Hilo3d.BoxGeometry({ width: 2, height: 2, depth: 2 }); 
const shape = new cannon.Box(new cannon.Vec3(1, 1, 1)); //does it because cannon sets distance *from center*?

I don't sure is it problem exist only for boxes or whole cannon-hilo bind.

Thanks for your time!

Multi Stage support

Because WebGL resources cannot be shared in different contexts, some global classes need to be modified.

  • glType
  • Shader
  • extensions
  • capabilities

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.